Re: [PATCH] Send SIGHUP to libvirt in notify on all hosts, not just buildhw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Apr 2015 21:47:03 -0400
Colin Walters <walters@xxxxxxxxxx> wrote:

> *black candles lit, incantations mumbled, thread is resurrected *

ha. 
> 
> On Tue, Oct 28, 2014, at 10:04 AM, Matthew Miller wrote:
> 
> > In the meantime, any time iptables is restarted or reloaded, libvirt
> > needs a SIGHUP. (I suppose this means: ansible playbooks and also
> > added to any manual procedures.)
> 
> This patch (not tested as I'm not aware of an easy way to do so)
> should hopefully help me use libvirt on atomic01.qa.

ok, but it's not complete. When you change an handler name, it needs to
be changed where it's called too. Also, the reason we had the 'when' in
there was so it didn't fail on every non virthost when reloading
iptables, etc. 

So, I commited the following, can you see if it meets your needs and if
not we can adjust it further?

kevin
--
diff --git a/handlers/restart_services.yml
b/handlers/restart_services.yml index 1d2e964..b4371e9 100644
--- a/handlers/restart_services.yml
+++ b/handlers/restart_services.yml
@@ -149,10 +149,10 @@
 - name: restart bridge
   shell: /usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge
 
-- name: hup libvirtd
-  command: pkill -HUP libvirtd
+- name: reload libvirtd
+  service: name=libvirtd state=reloaded
   ignore_errors: true
-  when: inventory_hostname.startswith('buildhw')
+  when: ansible_virtualization_role == 'host'
 
 - name: restart fcomm-cache-worker
   service: name=fcomm-cache-worker state=restarted
diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml
index 744ab53..669d028 100644
--- a/roles/base/tasks/main.yml
+++ b/roles/base/tasks/main.yml
@@ -117,7 +117,7 @@
   when: not inventory_hostname.startswith('fed-cloud09')
   notify:
   - restart iptables
-  - hup libvirtd
+  - reload libvirtd
   tags:
   - iptables
   - config
@@ -141,7 +141,7 @@
   when: not inventory_hostname.startswith('fed-cloud09')
   notify:
   - restart ip6tables
-  - hup libvirtd
+  - reload libvirtd
   tags:
   - ip6tables
   - config

Attachment: pgpoQahsM8E9I.pgp
Description: OpenPGP digital signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux