Ask Your Question
0

What is missing commit 9d06520645f28d96ef905a709f8ff0c27842b58b in nova-docker master branch ?

asked 2015-03-07 06:02:05 -0500

dbaxps gravatar image

updated 2015-03-07 06:06:08 -0500

Consider commit 9d06520645f28d96ef905a709f8ff0c27842b58b in nova-docker master branch https://git.openstack.org/cgit/stackf...
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 a kind of :-

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

edit retag flag offensive close merge delete

Comments

View also original patch "Add Open vSwitch vif driver" written by Aaron Rosen
https://review.openstack.org/#/c/85913/

dbaxps gravatar imagedbaxps ( 2015-03-08 04:56:42 -0500 )edit

Just a sample how ifconfig works

# ifdown enp5s1
# ifconfig | grep enp5s1
# ifconfig  enp5s1 192.168.10.7
# ifconfig | grep enp5s1
enp5s1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
dbaxps gravatar imagedbaxps ( 2015-03-08 12:20:59 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-07 08:24:54 -0500

dbaxps gravatar image

updated 2015-03-10 23:29:35 -0500

UPDATE as of 03/11/2015
Patch merged upstream
https://review.openstack.org/#/c/163022/
https://git.openstack.org/cgit/stackf...
END UPDATE

Just finished testing my patch , it works fine. Am I supposed to submit patch to upstream ?
No more git revert 9d06520645f28d96ef905a709f8ff0c27842b58b. Just add one line of code to vifs.py.

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',

edit flag offensive delete link more

Comments

I would file a bug report and put the patch in the report, too.

smaffulli gravatar imagesmaffulli ( 2015-03-10 08:22:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-07 06:02:05 -0500

Seen: 278 times

Last updated: Mar 10 '15