<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Hi list,<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">I'm working under CentOS 6.4 + Havana.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">I noticed there're some command support such as :<br>
nova add-fixed-ip nova interface-attach<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Also, in neutron,<br>
neutron port-create<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">So, I guess it should be possible to add a new virtual NIC port on a running instances, right ?<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">But, after I run command: nova add-fixed-ip ${instance_name} ${net-id}<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">I get error in nova-compute.log:<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">2013-11-06 14:16:14.816 11803 DEBUG qpid.messaging.io.ops [-] SENT[28db2d8]: SessionCompleted(commands=[0-39]) write_op /usr/lib/python2.6/site-packages/qpid/messaging/driver.py:686 2013-11-06
14:16:14.818 11803 ERROR nova.openstack.common.rpc.amqp [req-fdb9abd1-f952-4e90-afb9-5803d3200810 c4633e89685d41c4a2d20a2234b5025e 45c69667e2a64c889719ef8d8e0dd098] Exception during message handling 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp
Traceback (most recent call last): 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp
*args) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp result = getattr(proxyobj,
method)(ctxt, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 90, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp payload) 2013-11-06
14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 73, in wrapped 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return f(self, context, args, *kw) 2013-11-06 14:16:14.818
11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 243, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp pass 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 229, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 271, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp e, sys.exc_info()) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py",
line 258, in decorated_function 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py",
line 3169, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp network_id, conductor_api=self.conductor_api) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/api.py",
line 49, in wrapper 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp res = f(self, context, args, *kwargs) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py",
line 513, in add_fixed_ip_to_instance 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp instance_id=instance['uuid']) 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp NetworkNotFoundForInstance: Network could not be found
for instance 27d1f715-cec2-4514-83e2-1066842a745a. 2013-11-06 14:16:14.818 11803 TRACE nova.openstack.common.rpc.amqp<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Then I checked "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py" function add_fixed_ip_to_instance, find the value for data = neutronv2.get_client(context).list_ports(**search_opts)
is empty.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">So, I run command to create the port:<br>
neutron port-create --tenant-id ${tenant-id} --device-id ${instance_id} ${net-name}<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">But the value for data = neutronv2.get_client(context).list_ports(**search_opts) is still empty.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Then I get into database and find the new port created by "neutron port-create" do not have "device_owner":<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">mysql> select * from ports where device_id='27d1f715-cec2-4514-83e2-1066842a745a';<br>
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+<br>
| tenant_id | id | name | network_id | mac_address | admin_state_up | status | device_id | device_owner |<br>
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+<br>
| 45c69667e2a64c889719ef8d8e0dd098 | d2e64bc6-29b3-476e-8caf-74b0420529c1 | | 316215a2-e514-4dea-a061-6b335e89ccd7 | fa:16:3e:0c:b7:cd | 1 | ACTIVE | 27d1f715-cec2-4514-83e2-1066842a745a | compute:None |<br>
| 45c69667e2a64c889719ef8d8e0dd098 | ece1fa2d-bf8d-4c04-933e-ffadc447bfd2 | | 8232d0b8-4204-4751-ba42-04345c2dbe5a | fa:16:3e:59:3c:61 | 1 | DOWN | 27d1f715-cec2-4514-83e2-1066842a745a | |<br>
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------+<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Anyone know why this happens ????<br>
How to add device_owner to the port ???<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.2in;margin-left:0in;line-height:13.5pt;background:white;max-width: 45em;orphans: auto;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Thanks.<br>
-chen<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>