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

Check contents of the system.devices file after config-lvm-filter #278

Open
aesteve-rh opened this issue Jul 7, 2022 · 0 comments
Open
Labels

Comments

@aesteve-rh
Copy link
Member

aesteve-rh commented Jul 7, 2022

/etc/lvm/devices/system.devices is created by vdsm-tool config-lvm-filter
when vgimportdevices is run. Once created, it does a sanity check with
lvmdevices --check, but this is too weak, as it only checks that the format and
the contents, but it does not check that it matches the system state.

The contents should look similar the result of running: pvs -o pv_device_id_type,pv_device_id,name,uuid,
but only for the relevant devices.

In lvmdevices we receive the VGs that we want to configure in the devicesfile,
so we can run something like pvdisplay -C -o vg_name,pv_name and see which
pvs are expected, and ensure they appear in the devicesfile.

If it does not match, print an error with the missing devices. Note that printing needs
to be done from the tool side, internal logging is hidden.

We may also want to raise or exit with error code from the tool.
So in fact we should return a boolean in the lvmdevices.configure,
in case the configuration check fails, the tool does not end with a
Configuration completed successfully! message.

Related bug:

@aesteve-rh aesteve-rh added this to the ovirt-4.5.2 milestone Jul 7, 2022
@sandrobonazzola sandrobonazzola removed this from the ovirt-4.5.2 milestone Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants