Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
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?
Solved! See The Solution
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,
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
That did the trick, thanks a lot!