Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Manual] Add and update volume related manual test case for issue 5383 #1413

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
title: Delete single vm all disks (e2e_be)
---
1. Delete VM
1. Select whether you want to delete disks
1. Create a VM
1. Make sure VM have started in running state with IP address
1. Delete the VM
1. Select the option `Select the volume you want to delete` (delete volume)

## Expected Results
1. You should check amount of used space on Server before you delete the VM
1. Machine should delete
1. VM should be deleted
1. It should not show up in the Virtual Machine list
1. Disks should be listed/or not in Volumes list as appropriate
1. All volumes attached to the VM should be deleted on the volume page
1. Verify the cleaned up the space on the disk on the node.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ title: Delete volume that is not attached to a VM (e2e_be_fe)
1. Verify that volume is removed from list
1. Check the volume object doesn't exist anymore.

1. Create a VM
1. Make sure VM have started in running state with IP address
1. Delete the VM
1. Do not select the option `Select the volume you want to delete` (Keep volume)
1. Click the Delete button
1. Open Volumes page
1. Delete the volume remains for the VM

## Expected Results
1. Volume should create
1. It should show in volume list
1. Volume crd should have correct info.
1. Volume should delete.
1. Volume should be removed from list

1. VM should be removed correctly
1. The remains volume can also be deleted on volumes page
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Edit volume to increase size when vm is running
---
1. Create a VM
1. Make sure VM have started in running state with IP address
1. Open the `Edit config` page of the VM
1. Change the volume size of the disk on the Volumes page
1. Click Save
1. Check the prompt error message
1. Open the Volumes page
1. Edit config of the volume attached to the VM
1. Change the volume size of the disk
1. Click Save
1. Check the prompt error message

## Expected Results
1. VM volume page should display error message
```
admission webhook "validator.harvesterhci.io" denied the request: please stop the VM before resizing volumes
```
1. Volume page should display error message
```
admission webhook "validator.harvesterhci.io" denied the request: resizing is only supported for detached volumes. The volume is being used by VM default/vm1. Please stop the VM first.
```
34 changes: 34 additions & 0 deletions docs/content/manual/volumes/prevent-attached-volume-to-other-vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: A volume can't be attached to another VM (Yaml)
---

* Related issues: [#5383](https://github.com/harvester/harvester/issues/5383) [ENHANCEMENT] Refactor harvesterhci.io/owned-by annotation on PVC

## Category
* Volume

## Verification Steps
1. Create two VMs (vm1 and vm2)
1. Create a data volume `vol-001`
1. Click the `add volume` menu option for `vm1` to attach `vol-001` to vm1
1. Ensure `vol-001` can correctly been attached to `vm1`
1. Click the `add volume` menu option for `vm2` and find available volume

1. Edit the yaml of vm2
1. Try to attach the data volume yaml content from vm1 to vm2 spec.volume
```
- name: data-vol
persistentVolumeClaim:
claimName: vol-001
hotpluggable: true
```
1. Click Save
1. Check the failure message prompt

## Expected Results
1. No volume can't be found in the list when click the `add volume` menu option for `vm2`
1. 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
```
{{< image "images/volumes/5383-image-01.png" >}}
Binary file added docs/static/images/volumes/5383-image-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.