From 584bb1aad8647872cb8722beeb84e9ec08abc208 Mon Sep 17 00:00:00 2001 From: Adelina Tuvenie Date: Thu, 24 Sep 2015 06:17:06 -0700 Subject: [PATCH] Fixes 'ovs-agent fails to start on Windows beacause of SIGHUP' Change Ic0cf8a9ca7f3a16b556a6825e2979471ae136c33 has added the handling of SIGHUP in neutron_ovs_agent. This does not work on Windows as there is no SIGHUP signal on windows. The fix consists in checking if signal has SIGHUP attr before setting the handler for SIGHUP. Change-Id: I08258580252d68db222cbb9db7812ff1dfb37a56 Closes-Bug: #1499345 --- .../plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py index ee54f3e01..022b5d38c 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -1784,7 +1784,8 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin, # Start everything. LOG.info(_LI("Agent initialized successfully, now running... ")) signal.signal(signal.SIGTERM, self._handle_sigterm) - signal.signal(signal.SIGHUP, self._handle_sighup) + if hasattr(signal, 'SIGHUP'): + signal.signal(signal.SIGHUP, self._handle_sighup) with polling.get_polling_manager( self.minimize_polling, self.ovsdb_monitor_respawn_interval) as pm: -- 2.45.2