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 d8eb42f1ea)
(cherry picked from commit eb1d0313d0)
This commit is contained in:
Rodolfo Alonso Hernandez 2019-09-23 17:43:44 +00:00 committed by Slawek Kaplonski
parent 2d0adf4a05
commit 9dc499da2b
1 changed files with 4 additions and 1 deletions

View File

@ -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()