From 9dc499da2bb7515ed19204ab4d46e34c7abd1ee3 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 23 Sep 2019 17:43:44 +0000 Subject: [PATCH] Configure keepalived interfaces according to config file "keepalived" process stops running if it does not find any of the tracked interfaces correctly configured. To prevent this in "KeepalivedManagerTestCase" test cases, "eth0" is set up and an IP address is assigned. Change-Id: Ibd4ef7b0db5b6830383fffcac685b9c709aae350 Closes-Bug: #1845150 Related-Bug: #1830232 (cherry picked from commit d8eb42f1eaaa3747691cbb91db49292c66732073) (cherry picked from commit eb1d0313d0dddb5e93f4d91ae28390946edab149) --- neutron/tests/functional/agent/linux/test_keepalived.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neutron/tests/functional/agent/linux/test_keepalived.py b/neutron/tests/functional/agent/linux/test_keepalived.py index e9c534f0868..1215e40519d 100644 --- a/neutron/tests/functional/agent/linux/test_keepalived.py +++ b/neutron/tests/functional/agent/linux/test_keepalived.py @@ -52,7 +52,10 @@ class KeepalivedManagerTestCase(base.BaseLoggingTestCase, # neutron.tests.unit.agent.linux.test_keepalived module dev_names = ['eth0', 'eth1', 'eth2', 'eth4', 'eth6', 'eth10'] for name in dev_names: - self.ip_wrapper.add_dummy(name) + ip_device = self.ip_wrapper.add_dummy(name) + if name == 'eth0': + ip_device.link.set_up() + ip_device.addr.add('169.254.201.1/16') def _spawn_keepalived(self, keepalived_manager): keepalived_manager.spawn()