Some classes require nova::compute::libvirt but there is no need to
put that class into dependencies because resource orders are defined
by deps or explicit definitions. Also, the base libvirt class is not
really required.
This change removes these dependencies, to avoid enforcing orders as
much as possible.
Change-Id: Icbb2fa209effd355cef36f35662bfdcf18d8b090
Last build of libvirt in CentOS9 has removed default config files in
/etc/sysconfig . This is making some file_line resources to fail as
the original files no longer exist.
This patch is creating empty files if the target files don't exist, so
that this is compatible with centos8 and centos9 (before and after
default config files removal).
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2042529
Closes-Bug: #1959601
Change-Id: Iff9daf3d284c725d40ecfb85500d77951c3fefcd
Currently the os_package_type fact is used to distinguish Ubuntu and
Debian but it's redundant and built-in $::operatingsystem should be
enough. What is worse the custom fact is not injected while composing
facts data in unit tests and has never been tested properly.
Change-Id: Ie1d6006020970ade3e1597dc9f68f9a5503283b4
When there is a config change the service gets notfied to be
restarted, which is not required as /usr/libexec/libvirt-guests.sh
sources /etc/sysconfig/libvirt-guests on each run. As a side
effect of the service restart, instances get stopped which is bad.
In addition manage_service was bound to the enabled parameter.
This introduces manage_service to be able to manage start/stop
independent from enabled parameter.
Change-Id: Icf52a2272601401c423ae07f7b10474bdc190574
Closes-Bug: #1849264
If resume_guests_state_on_host_boot is set in nova.conf also
libvirt-guests need to be configured in the right way to shutdown
running instances on a compute reboot.
Closes-bug: 1778216
Change-Id: I2766cdd66ff17756daaf1a75ad516a7af6eebddc