def ceph_joined(): pkgs = filter_installed_packages(['ceph-common']) if pkgs: status_set('maintenance', 'Installing ceph-common package') apt_install(pkgs, fatal=True) # Bug 1427660 if not is_unit_paused_set() and config('virt-type') in LIBVIRT_TYPES: service_restart(libvirt_daemon())
def post_series_upgrade(): log("Running complete series upgrade hook", "INFO") service_stop('nova-compute') service_stop(libvirt_daemon()) # After package upgrade the service is broken and leaves behind a # PID file which causes the service to fail to start. # Remove this before restart if os.path.exists(LIBVIRTD_PID): os.unlink(LIBVIRTD_PID) series_upgrade_complete(resume_unit_helper, CONFIGS)
def test_libvirt_daemon_preyakkety(self): self.os_release.return_value = 'diablo' self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'} self.assertEqual(utils.libvirt_daemon(), utils.LIBVIRT_BIN_DAEMON)
def test_libvirt_daemon_yakkety(self): self.lsb_release.return_value = {'DISTRIB_CODENAME': 'yakkety'} self.assertEqual(utils.libvirt_daemon(), utils.LIBVIRTD_DAEMON)
def test_libvirt_daemon_preyakkety(self): self.lsb_release.return_value = { 'DISTRIB_CODENAME': 'xenial' } self.assertEqual(utils.libvirt_daemon(), utils.LIBVIRT_BIN_DAEMON)
def ceph_joined(): status_set('maintenance', 'Installing apt packages') apt_install(filter_installed_packages(['ceph-common']), fatal=True) # Bug 1427660 if not is_unit_paused_set(): service_restart(libvirt_daemon())