Skip to content

Conversation

@ekakhrom-orionsoft
Copy link

Problem:
When creating a disk on a block storage domain (for example, FibreChannel), links to the disk are created on all active hosts that belong to the StoragePool of the disk being created. Further, when deleting a created disk, links to the disk are deleted only on the host with the SPM role, while incorrect links to the deleted disk remain on the other hosts.

Playback:
Environment: SA oVirt Engine, 2 hosts (Host 1 with the SPM role), a FibreChannel storage domain.
Actions:

  1. Create two disks in the FibreChannel storage domain.
  2. Links to these two disks are immediately created on Host 1 (SPM)
[root@host1 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
…
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:50 7c451669-9d44-4994-9711-389d5026ff36
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:50 e394da48-7cf3-413a-b22c-7a9fc56d8985
  1. After some time, links to the created disks are created on Host 2.
[root@host2 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
…
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:51 7c451669-9d44-4994-9711-389d5026ff36
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:51 e394da48-7cf3-413a-b22c-7a9fc56d8985
  1. Delete both created disks.
  2. Disk links have been deleted on Host 1 (SPM).
[root@host1 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
drwxr-xr-x. 4 vdsm kvm 94 Apr 11 08:52 .
drwxr-xr-x. 5 vdsm kvm 48 Apr 10 13:30 ..
  1. There are still links to deleted disks on the Host 2, but they are now incorrect:
[root@host2 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
…
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:51 7c451669-9d44-4994-9711-389d5026ff36
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:51 e394da48-7cf3-413a-b22c-7a9fc56d8985

Solution:
Added an API method on VDSM to remove unused links. When deleting a disk, the command to delete unused links is invoked for all active hosts that are associated with the StoragePool of the disk being deleted.

Playback (after solved issue):
Environment: SA oVirt Engine, 2 hosts (Host 1 with the SPM role), a FibreChannel storage domain.
Actions:

  1. Create two disks in the FibreChannel storage domain.
  2. Links to these two disks are immediately created on Host 1 (SPM)
[root@host1 ~]#  ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
…
drwxr-xr-x. 2 vdsm kvm  50 Apr 15 07:18 2a1bff81-1474-44a1-8cd2-ca39b0b498e7
drwxr-xr-x. 2 vdsm kvm  50 Apr 15 07:18 311450d6-854c-4a56-84fe-4ce7bb432b86
  1. After some time, links to the created disks are created on Host 2
 [root@host2 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
…
drwxr-xr-x. 2 vdsm kvm  50 Apr 15 07:18 311450d6-854c-4a56-84fe-4ce7bb432b86
drwxr-xr-x. 2 vdsm kvm  50 Apr 15 07:18 2a1bff81-1474-44a1-8cd2-ca39b0b498e7
  1. Delete both created disks.
  2. Disk links have been deleted on Host 1 (SPM).
[root@host1 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
drwxr-xr-x. 4 vdsm kvm 94 Apr 11 08:52 .
drwxr-xr-x. 5 vdsm kvm 48 Apr 10 13:30 ..
  1. Disk links have been deleted on Host 2.
 [root@host2 ~]# ls -la /rhev/data-center/77b48f64-1484-11f0-9d8c-566fd2810d4a/ab643bd9-8753-4375-8c6c-eb1fbedcf6b4/images/
total 0
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 08:52 .
drwxr-xr-x. 2 vdsm kvm  50 Apr 11 13:30 ..

Attention!
This PR should be applied only after applying PR on the VDSM:
oVirt/ovirt-engine#1009

Are you the owner of the code you are sending in, or do you have permission of the owner?

Yes

Problem:
When creating a disk on a block storage domain (for example, FibreChannel), links to the disk are created on all active hosts that belong to the StoragePool of the disk being created. Further, when deleting a created disk, links to the disk are deleted only on the host with the SPM role, while incorrect links to the deleted disk remain on the other hosts.

Solution:
Added an API method on VDSM to remove unused links. When deleting a disk, the command to delete unused links is invoked for all active hosts that are associated with the StoragePool of the disk being deleted.

Signed-off-by: Ekaterina Khromova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant