<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Consider commit 9d06520645f28d96ef905a709f8ff0c27842b58b
in nova-docker master branch <a href="https://git.openstack.org/cgit/stackforge/nova-docker/" target="_blank">https://git.openstack.org/cgit/stackforge/nova-docker/</a><br><br>It does :-<br><br><pre class="prettyprint"><code><span class="pun">-</span><span class="pln"> utils</span><span class="pun">.</span><span class="pln">execute</span><span class="pun">(</span><span class="str">'ip'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'netns'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'exec'</span><span class="pun">,</span><span class="pln"> container_id</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ifconfig'</span><span class="pun">,</span><span class="pln">
</span><span class="pun">-</span><span class="pln"> if_remote_name</span><span class="pun">,</span><span class="pln"> ip</span><span class="pun">,</span><span class="pln"> run_as_root</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)</span><span class="pln">
</span><span class="pun">+</span><span class="pln"> utils</span><span class="pun">.</span><span class="pln">execute</span><span class="pun">(</span><span class="str">'ip'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'netns'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'exec'</span><span class="pun">,</span><span class="pln"> container_id</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ip'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'addr'</span><span class="pun">,</span><span class="pln">
</span><span class="pun">+</span><span class="pln"> </span><span class="str">'add'</span><span class="pun">,</span><span class="pln"> ip</span><span class="pun">,</span><span class="pln"> </span><span class="str">'dev'</span><span class="pun">,</span><span class="pln"> if_remote_name</span><span class="pun">,</span><span class="pln"> run_as_root</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)<br><br></span></code></pre>The last statement should be followed by<br><br><pre class="prettyprint"><code><span class="pln">utils</span><span class="pun">.</span><span class="pln">execute</span><span class="pun">(</span><span class="str">'ip'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'netns'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'exec'</span><span class="pun">,</span><span class="pln"> container_id</span><span class="pun">,</span><span class="pln"> </span><span class="str">'ip'</span><span class="pun">,</span><span class="pln"> </span><span class="str">'link'</span><span class="pun">,</span><span class="pln">
</span><span class="str">'set'</span><span class="pun">,</span><span class="pln"> if_remote_name</span><span class="pun">,</span><span class="str">'up'</span><span class="pun">,</span><span class="pln">run_as_root</span><span class="pun">=</span><span class="kwd">True</span><span class="pun">)<br><br><br></span></code></pre>otherwise containers interface is still down versus call with <code>"ifconfig"<br><br>Patch bellow<br><br></code><pre>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',
</pre><br>has been tested OK . Applying it allows to build Nova Docker Driver having network alive for both floating and private IPs. <br><br>Boris.<br> </div></body>
</html>