[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]

 



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

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.

From 3d08ba991ebdd3f5c50e36354b6275587b17adcd Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@xxxxxxxxxx>
Date: Mon, 27 Apr 2015 21:24:17 -0400
Subject: [PATCH] Send SIGHUP to libvirt in notify on all hosts, not just
 buildhw

I'm using libvirt on atomic01, and the firewall rules for the NAT
table kept getting blown away and breaking networking.  There was an
earlier thread on this here:

https://lists.fedoraproject.org/pipermail/infrastructure/2014-October/015077.html

We had a tag restricting the reload to the build HW which is using
ImageFactory-in-Koji, but other hosts can be using libvirt too.

While we're here, switch to using systemd via ansible's `service`
module for the reload, which is more reliable and accurate than the
old school `pkill` method of string matching the entire process table.
---
 handlers/restart_services.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/handlers/restart_services.yml b/handlers/restart_services.yml
index 1d2e964..7a5e908 100644
--- a/handlers/restart_services.yml
+++ b/handlers/restart_services.yml
@@ -149,10 +149,9 @@
 - 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')
 
 - name: restart fcomm-cache-worker
   service: name=fcomm-cache-worker state=restarted
-- 
1.8.3.1

_______________________________________________
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