Upgrades, add logging to debug the problem with inter-container communication
Change-Id: I4bc91b9c35cc915de435ab2d9a86f46ba5761192 Related-bug: #1349287
This commit is contained in:
parent
306a2f7d5e
commit
3b5a6a333d
@ -512,6 +512,15 @@ class DockerUpgrader(UpgradeEngine):
|
||||
# Remove -A (add) prefix and use -D (delete) instead
|
||||
utils.exec_cmd('iptables -t nat -D {0}'.format(rule[2:]))
|
||||
|
||||
# NOTE(eli): Run list of rules again,
|
||||
# it's required to debug the problem
|
||||
# with inter-container communication
|
||||
# https://bugs.launchpad.net/fuel/+bug/1349287
|
||||
utils.exec_cmd('iptables -t nat -S')
|
||||
utils.exec_cmd('iptables -S')
|
||||
utils.exec_cmd('cat /etc/sysconfig/iptables')
|
||||
utils.exec_cmd('cat /etc/sysconfig/iptables.save')
|
||||
|
||||
def stop_container(self, container_id):
|
||||
"""Stop docker container
|
||||
|
||||
|
@ -367,7 +367,11 @@ class TestDockerUpgrader(BaseTestCase):
|
||||
'--to-destination 172.17.0.7:1'),
|
||||
mock.call(
|
||||
'iptables -t nat -D DOCKER -p tcp -m tcp --dport 2 -j DNAT '
|
||||
'--to-destination 172.17.0.3:2')]
|
||||
'--to-destination 172.17.0.3:2'),
|
||||
mock.call('iptables -t nat -S'),
|
||||
mock.call('iptables -S'),
|
||||
mock.call('cat /etc/sysconfig/iptables'),
|
||||
mock.call('cat /etc/sysconfig/iptables.save')]
|
||||
|
||||
self.assertEqual(exec_cmd_mock.call_args_list, expected_calls)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user