[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Rdo-list] What is missing commit "vifs: replace 'ifconfig' usage with 'ip'" from nova docker master branch ?



Consider commit 9d06520645f28d96ef905a709f8ff0c27842b58b in nova-docker master branch https://git.openstack.org/cgit/stackforge/nova-docker/

It does :-

- utils.execute('ip', 'netns', 'exec', container_id, 'ifconfig',
- if_remote_name, ip, run_as_root=True)
+ utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'addr',
+ 'add', ip, 'dev', if_remote_name, run_as_root=True)

The last statement should be followed by

utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'link',
  'set', if_remote_name,'up',run_as_root=True)


otherwise containers interface is still down versus call with "ifconfig"

Patch bellow

diff --git a/novadocker/virt/docker/vifs.py b/novadocker/virt/docker/vifs.py
index a2e7b23..1d159f7 100644
--- a/novadocker/virt/docker/vifs.py
+++ b/novadocker/virt/docker/vifs.py
@@ -248,6 +248,8 @@ class DockerGenericVIFDriver(object):
                           run_as_root=True)
             utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'addr',
                           'add', ip, 'dev', if_remote_name, run_as_root=True)
+            utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'link',
+                          'set', if_remote_name,'up',run_as_root=True)
             if gateway is not None:
                 utils.execute('ip', 'netns', 'exec', container_id,
                               'ip', 'route', 'replace', 'default', 'via',

has been tested OK  .  Applying it allows to build Nova Docker Driver having network alive for both floating and private IPs.

Boris.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]