You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
Currently, policy is successfully deleted even if it is being used by a volume.
See the below example where a policy named poltest is created and a volume vol_poltest is created using this policy. The admin ls command indicates that the volume vol_poltest is using poltest policy.
But the admin policy rm command runs successfully.
The volume still indicates it uses poltest policy.
[root@sc-rdops-vm07-dhcp-208-78:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy create --name poltest --content '(("proportionalCapacity" i0)("hostFailuresToTolerate" i0))'
Successfully created policy: poltest
[root@sc-rdops-vm07-dhcp-208-78:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Volume Datastore Created By VM Created Attached To VM (name/uuid) Policy Capacity Used Disk Format Filesystem Type Access Attach As
------------- ------------- ------------- ------------------------ -------------------------- -------------- -------- ---- ----------- --------------- ---------- ----------------------
vol_poltest vsanDatastore photo.rc Wed Feb 22 01:49:06 2017 detached poltest 100MB 40MB thin ext4 read-write independent_persistent
[root@sc-rdops-vm07-dhcp-208-78:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy rm poltest
Successfully removed policy: poltest
[root@sc-rdops-vm07-dhcp-208-78:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Volume Datastore Created By VM Created Attached To VM (name/uuid) Policy Capacity Used Disk Format Filesystem Type Access Attach As
------------- ------------- ------------- ------------------------ -------------------------- -------------- -------- ---- ----------- --------------- ---------- ----------------------
vol_poltest vsanDatastore photo.rc Wed Feb 22 01:49:06 2017 detached poltest 100MB 40MB thin ext4 read-write independent_persistent
[root@sc-rdops-vm07-dhcp-208-78:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy ls
Policy Name Policy Content Active
--------------------- ---------------------------------------------------------- ------
bad_policy (("proportionalCapacity" i0)("hostFailuresToTolerate" i3)) Unused
pol1 (("proportionalCapacity" i0)("hostFailuresToTolerate" i0) Unused
wrong_string_policy (("proportionalCapacity" i0)("hostFailuresToTolerate" i0) Unused
notSatisfiable_policy (("proportionalCapacity" i0)("hostFailuresToTolerate" i5)) Unused
The text was updated successfully, but these errors were encountered:
1. Minor change to use list_volumes_and_policies()
instead of list_vmdks() to find vmdks using a policy
Testing:
1. Manual testing done
2. Adding test cases to cover policy ls and policy rm
functionality in vmdk_ops_test
Resolves: #948
Currently, policy is successfully deleted even if it is being used by a volume.
See the below example where a policy named poltest is created and a volume vol_poltest is created using this policy. The admin ls command indicates that the volume vol_poltest is using poltest policy.
But the admin policy rm command runs successfully.
The volume still indicates it uses poltest policy.
The text was updated successfully, but these errors were encountered: