- Related issues: #5383 [ENHANCEMENT] Refactor harvesterhci.io/owned-by annotation on PVC
Category
- Volume
Verification Steps
-
Create two VMs (vm1 and vm2)
-
Create a data volume
vol-001
-
Click the
add volume
menu option forvm1
to attachvol-001
to vm1 -
Ensure
vol-001
can correctly been attached tovm1
-
Click the
add volume
menu option forvm2
and find available volume -
Edit the yaml of vm2
-
Try to attach the data volume yaml content from vm1 to vm2 spec.volume
- name: data-vol
persistentVolumeClaim:
claimName: vol-001
hotpluggable: true
- Click Save
- Check the failure message prompt
Expected Results
- No volume can’t be found in the list when click the
add volume
menu option forvm2
- Should prompt the error message to prevent
admission webhook "validator.harvesterhci.io" denied the request: the volume vol-001 is already used by VM default/vm1