oVirt / vdsm

The Virtual Desktop Server Manager
GNU General Public License v2.0
162 stars 200 forks source link

lvm: check VG autoactivation attribute after updating the LVMCache #237

Open aesteve-rh opened 2 years ago

aesteve-rh commented 2 years ago

VGs in LVM are created with disabled autoactivation in Vdsm to avoid unwanted activation of VG/LVs when the autoactivation option (-aay) is used. Autoactivation is used, e.g., during system boot.

However, this configuration can be overridden, either in the lvm.conf or by manually invoking a command that overwrites the VG settings. Vdsm must ensure that all VGs keep this attribute disabled.

When we update the VGs in the LVMCache, we should check for the setautoactivation attribute of the VGs. If any VG has the attribute enabled, log a warning and deactivate it.

nirs commented 2 years ago

Changing VGs can be done only the SPM host. Other hosts should not check or warn about the VG since they cannot fix this issue.

We need to add a flow on the SPM checking VG configuration and fixing it, maybe when starting the SPM, or when activating a storage domain.