This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
'policy ls' command does not show the name of the volume using that policy #853
Labels
Comments
I have narrowed down the root cause to be in vmdk_utils.list_vmdks() method. Please focus on this method to fix the issue. |
pshahzeb
pushed a commit
that referenced
this issue
Feb 22, 2017
1. Using get_volumes() in list_volumes_and_policies() instead of list_vmdks() to properly walk in dockvols directory which contain tenant-uuid based subdirectories This fixes output by admin policy ls command 2. Fixing update_vsan_objects_with_policy to make proper use of list_volumes_and_policies() Testing: Porting the update_vsan_policy test to tenant based Vmdk ops test suite Manual testing of admin policy ls command done Resolves: #853
shuklanirdesh82
pushed a commit
that referenced
this issue
Feb 24, 2017
* Fixing list_volumes_and_policies() to correctly list volumes 1. Using get_volumes() in list_volumes_and_policies() instead of list_vmdks() to properly walk in dockvols directory which contain tenant-uuid based subdirectories This fixes output by admin policy ls command 2. Fixing update_vsan_objects_with_policy to make proper use of list_volumes_and_policies() Testing: Porting the update_vsan_policy test to tenant based Vmdk ops test suite Manual testing of admin policy ls command done Resolves: #853 * Prohibiting policy delete if it is in use by a volume 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 * Removing unused resources in policy usage test case and adding additional checks * Making use if vsan datastore as default
2 tasks
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
'policy ls' command does not show the name of the volume using that policy
========================================
Steps are as follows:
/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy create --name some-policy --content '(("proportionalCapacity" i0)("hostFailuresToTolerate" i0)'
[root@sc2-rdops-vm03-dhcp-97-99:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy ls
Policy Name Policy Content Active
some-policy (("hostFailuresToTolerate" i0) ("forceProvisioning" i0)) Unused
Active column shows unused since no volume is using this policy.
docker volume create --driver=vmdk --name=some-vol -o vsan-policy-name=some-policy
Docker inspect for the created volume shows name of the policy used by the volume
root@photon-TX4FfW2ET [ ~/docker-volume-vsphere ]# docker volume inspect some-vol | grep "Name|vsan-policy-name"
"Name": "some-vol",
"vsan-policy-name": "some-policy"
[root@sc2-rdops-vm03-dhcp-97-99:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py policy ls
Policy Name Policy Content Active
some-policy (("hostFailuresToTolerate" i0) ("forceProvisioning" i0)) Unused
==================================
Ideally we should see the name of the virtual disks using the policy should show up in the Active column.
The text was updated successfully, but these errors were encountered: