<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
        {font-family:inherit;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1586190247;
        mso-list-type:hybrid;
        mso-list-template-ids:-851792268 134807569 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Adhi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Very interesting.  I suspect that  self._get_vif_ref, below, is returning None.  This appears to be when the VM does not exist on the
 host - perhaps the VM was renamed, deleted, or it has been migrated to a different host and Nova’s records didn’t get updated?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I believe the issue is most likely occurring at
<a href="http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vif.py?h=15.0.4#n246">
http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vif.py?h=15.0.4#n246</a> where we attempt to detect the VM based on the instance’s name in Nova’s database.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Do you have VMs on this host? They don’t have to be running (for example if the host rebooted then the VMs may exist but in a shutdown
 state)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Could you check that the VMs that are on the host still have the name associated with them according to Nova?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">For example:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">root@host~/openrc# openstack server show 3662f9b8-1303-496a-8c21-97bba312432c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">| OS-EXT-SRV-ATTR:instance_name        | instance-0000914e                                                                                                            
                                               |<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">| name                                 | dsvm-devstack-citrix-mia-nodepool-683420                                                                                                                              
      |<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">In this case, the server has the name dsvm-devstack-citrix-mia-nodepool-683420 but on the hypervisor the VM itself has the name  instance-0000914e<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Bob<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Adhi Priharmanto [mailto:adhi.pri@gmail.com]
<br>
<b>Sent:</b> 18 May 2017 10:34<br>
<b>To:</b> openstack <openstack@lists.openstack.org><br>
<b>Subject:</b> [Openstack] [Ocata-Xenserver] Nova-compute wouldn't start<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi all, <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have openstack RDO ocata using xenserver as Hypervisor, setup manually. It works fine about 2 weeks, today my nova-compute wouldn't start and when I check the nova-compute log :<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal"><span style="font-family:"Courier New"">2017-05-18 16:29:24.769 10764 INFO nova.service [-] Starting compute node (version 15.0.0-1.el7)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service [req-f29142ce-c68a-4d0a-b6ff-ba5b0a67ec6a - - - - -] Error starting thread.<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service Traceback (most recent call last):<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 722, in run_service<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     service.start()<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/service.py", line 144, in start<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     self.manager.init_host()<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1152, in init_host<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     self._init_instance(context, instance)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 949, in _init_instance<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     self.driver.plug_vifs(instance, net_info)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/virt/xenapi/driver.py", line 309, in plug_vifs<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     self._vmops.plug_vifs(instance, network_info)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 1959, in plug_vifs<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     self.vif_driver.plug(instance, vif, device=device)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/virt/xenapi/vif.py", line 250, in plug<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     vif_ref = self._get_vif_ref(vif, vm_ref)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/nova/virt/xenapi/vif.py", line 42, in _get_vif_ref<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     vif_refs = self._session.call_xenapi("VM.get_VIFs", vm_ref)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/os_xenapi/client/session.py", line 200, in call_xenapi<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     return session.xenapi_request(method, args)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/os_xenapi/client/XenAPI.py", line 130, in xenapi_request<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     result = _parse_result(getattr(self, methodname)(*full_params))<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     return self.__send(self.__name, args)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 1581, in __request<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     allow_none=self.__allow_none)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 1086, in dumps<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     data = m.dumps(params)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 633, in dumps<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     dump(v, write)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 655, in __dump<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     f(self, value, write)<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service   File "/usr/lib64/python2.7/xmlrpclib.py", line 659, in dump_nil<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service     raise TypeError, "cannot marshal None unless allow_none is enabled"<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service TypeError: cannot marshal None unless allow_none is enabled<br>
2017-05-18 16:29:24.847 10764 ERROR oslo_service.service </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Anyone can help me with this problem ?<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif">Cheers,</span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-color:currentcolor;outline:0px none;border-spacing:0px">
<tbody>
<tr style="height:22.5pt;border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit">
<td width="0" valign="bottom" style="width:.3pt;padding:0cm 0cm 0cm 0cm;height:22.5pt;border-color:currentcolor;outline:0px none;font-style:inherit">
<p class="MsoNormal" style="line-height:13.65pt"><span style="font-size:1.0pt;font-family:"inherit",serif;color:#333333"> <o:p></o:p></span></p>
</td>
</tr>
<tr style="border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit">
<td width="0" valign="bottom" style="width:.3pt;padding:0cm 0cm 0cm 0cm;border-color:currentcolor;outline:0px none;font-style:inherit">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit;border-spacing:0px">
<tbody>
<tr style="border-color:currentcolor;outline:0px none;font-style:inherit">
<td width="0" valign="top" style="width:.3pt;padding:0cm 0cm 0cm 0cm;border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit;display:inline-block">
<p class="MsoNormal"><span style="font-family:"inherit",serif"><o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="vertical-align:baseline"><b><span style="font-size:13.5pt;font-family:"Helvetica",sans-serif;color:#333333">Adhi Priharmanto<o:p></o:p></span></b></p>
</div>
<div style="margin-top:2.25pt;border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit">
<p class="MsoNormal" style="vertical-align:baseline"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:#2B82AD">about.me/a_dhi<o:p></o:p></span></p>
</div>
</td>
</tr>
<tr style="border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit">
<td width="0" valign="top" style="width:.3pt;padding:6.0pt 0cm 0cm 0cm;border-color:currentcolor;outline:0px none;font-style:inherit">
<p class="MsoNormal" align="right" style="text-align:right;background:#C5D0E0;vertical-align:baseline">
<span style="font-family:"inherit",serif"><img border="0" width="88" height="4" id="_x0000_i1025" src="http://d13pix9kaak6wt.cloudfront.net/signature/colorbar.png"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height:0%;vertical-align:baseline"><span style="font-size:10.5pt;font-family:"inherit",serif;color:#333333"> 
<o:p></o:p></span></p>
</td>
</tr>
<tr style="height:15.0pt;border-color:currentcolor;outline:0px none;font-weight:inherit;font-style:inherit">
<td width="0" valign="bottom" style="width:.3pt;padding:0cm 0cm 0cm 0cm;height:15.0pt;border-color:currentcolor;outline:0px none;font-style:inherit">
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif">+62-812-82121584</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>