The community will be undergoing maintenance soon, requiring Read-Only mode. Click to learn more.

Active IQ Unified Manager Discussions

WFA reservations for export rules are not cleared on acquisition

moep

I am building workflows for creating/deleting export rules. I need reservations to make newly created rules available for deletion immediately.

 

I used the script for creating export rule reservations in another thread: https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/How-to-create-export-rules-and-add-reservations-while-using-the-row-...

 

The reservation appears and is working, but it doesn't get cleared during cache acquisition. What am I doing wrong?

1 ACCEPTED SOLUTION

cbauernf

moep,

 

in order to cancel reservations, you have to have a verification rule that matches the reservation against the OCUM DB.  In the case of export rules, it's a bit tricky since you can't reliably predict the rule index, but something like this should work (untested):

 

SELECT export_rule.id

FROM cm_storage.export_rule

JOIN cm_storage.export_policy ON export_rule.policy_id = export_policy.id

JOIN cm_storage.vserver ON export_policy.vserver_id = vserver.id

JOIN cm_storage.cluster ON vserver.cluster_id = cluster.id

WHERE

(cluster.name = '${Cluster}' OR cluster.primary_address = '${Cluster}')

AND vserver.name = '${VserverName}'

AND export_policy.name = '${PolicyName}'

AND export_rule.clientmatch = '${ClientMatch}'

AND export_rule.protocol = '${Protocol}'

AND export_rule.ro_rule = '${RoRule}'

AND export_rule.rw_rule = '${RwRule}'

AND export_rule.super_user = '${Superuser}'

 

Regards,

 

Christian

 

 

View solution in original post

2 REPLIES 2

cbauernf

moep,

 

in order to cancel reservations, you have to have a verification rule that matches the reservation against the OCUM DB.  In the case of export rules, it's a bit tricky since you can't reliably predict the rule index, but something like this should work (untested):

 

SELECT export_rule.id

FROM cm_storage.export_rule

JOIN cm_storage.export_policy ON export_rule.policy_id = export_policy.id

JOIN cm_storage.vserver ON export_policy.vserver_id = vserver.id

JOIN cm_storage.cluster ON vserver.cluster_id = cluster.id

WHERE

(cluster.name = '${Cluster}' OR cluster.primary_address = '${Cluster}')

AND vserver.name = '${VserverName}'

AND export_policy.name = '${PolicyName}'

AND export_rule.clientmatch = '${ClientMatch}'

AND export_rule.protocol = '${Protocol}'

AND export_rule.ro_rule = '${RoRule}'

AND export_rule.rw_rule = '${RwRule}'

AND export_rule.super_user = '${Superuser}'

 

Regards,

 

Christian

 

 

View solution in original post

moep

That did the trick, thanks a lot!

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public