Missing -l option for starting libvirt-bin
Instance live migration stop to work due to missed -l option for
starting libvirt-bin
Change-Id: I9f164984c683531ca46157497557e7ebe64cb745
Closes-bug: PROD-9809
diff --git a/nova/compute.sls b/nova/compute.sls
index 995bd6a..315d53b 100644
--- a/nova/compute.sls
+++ b/nova/compute.sls
@@ -183,6 +183,18 @@
- pkg: nova_compute_packages
- watch_in:
- service: {{ compute.libvirt_service }}
+
+{%- if grains.get('init', None) == 'systemd' %}
+
+libvirt_restart_systemd:
+ module.wait:
+ - name: service.systemctl_reload
+ - watch:
+ - file: {{ compute.libvirt_bin }}
+ - require_in:
+ - service: {{ compute.libvirt_service }}
+
+{%- endif %}
{%- endif %}
/etc/libvirt/qemu.conf:
diff --git a/nova/files/mitaka/libvirt.Debian b/nova/files/mitaka/libvirt.Debian
index 1704dc4..b80fab0 100644
--- a/nova/files/mitaka/libvirt.Debian
+++ b/nova/files/mitaka/libvirt.Debian
@@ -5,8 +5,15 @@
start_libvirtd="yes"
# options passed to libvirtd, add "-l" to listen on tcp
+{%- if grains.get('init', None) != 'systemd' %}
libvirtd_opts="-d -l"
LIBVIRTD_ARGS="--listen"
+{%- else %}
+# Don't use "-d" option with systemd
+libvirtd_opts="-l"
+LIBVIRTD_ARGS="--listen"
+{%- endif %}
# pass in location of kerberos keytab
-#export KRB5_KTNAME=/etc/libvirt/libvirt.keytab
\ No newline at end of file
+#export KRB5_KTNAME=/etc/libvirt/libvirt.keytab
+
diff --git a/nova/map.jinja b/nova/map.jinja
index b13868b..a8baab8 100644
--- a/nova/map.jinja
+++ b/nova/map.jinja
@@ -41,7 +41,8 @@
'pkgs': ['nova-compute-kvm', 'python-novaclient', 'pm-utils', 'sysfsutils', 'sg3-utils', 'libvirt-bin', 'python-memcache', 'qemu-kvm','python-guestfs', 'gettext-base'],
'services': ['nova-compute'],
'libvirt_config': 'libvirtd.conf',
- 'libvirt_service': 'libvirtd',
+ 'libvirt_bin': '/etc/default/libvirt-bin',
+ 'libvirt_service': 'libvirt-bin',
'bind': compute_bind_defaults,
'debug': false,
'notification': false,
@@ -72,9 +73,4 @@
},
'heal_instance_info_cache_interval': '60',
},
-}, merge=salt['grains.filter_by']({
- 'trusty': {
- 'libvirt_bin': '/etc/default/libvirt-bin',
- 'libvirt_service': 'libvirt-bin',
- },
-}, grain='oscodename', merge=pillar.nova.get('compute', {}))) %}
+}, merge=pillar.nova.get('compute', {})) %}