NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

WFA reservations for export rules are not cleared on acquisition

moep
3,931 Views

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
3,819 Views

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
3,820 Views

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

 

 

moep
3,744 Views

That did the trick, thanks a lot!

Public