<div dir="ltr">Last spam for tonight!<div><br></div><div>This seems to be the spec from Mitaka - the code with None dates from 6 years ago.</div><div><br></div><div><a href="https://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/virt-device-role-tagging.html">https://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/virt-device-role-tagging.html</a><br></div><div><br></div><div>I think my comprehension is wrong, but the intent is around exposing non regular devices (VF, PCI drives). I don't have a way to try that in my lab, so I'll need to check elsewhere.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 8:37 PM Laurent Dumont <<a href="mailto:laurentfdumont@gmail.com">laurentfdumont@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">After adding some POTATO debugs, it seems that meta_data generation does not actually happen for the instances I have tested.<div><br></div><div> vif_vfs_trusted_supported = self._check_os_version(ROCKY, version)<br> <b>LOG.info('POTATO -3 CHECKING IF WE HAVE DEVICE_METADATA| '+str(self.instance.device_metadata))</b><br> if self.instance.device_metadata is not None:<br> <b>LOG.info('device_metadata is not None| '+str(self.instance.device_metadata))</b><br> for device in self.instance.device_metadata.devices:<br> device_metadata = {}<br> bus = 'none'<br></div><div><br></div><div>In my logs</div><div>2022-04-06 00:33:08.541 30 INFO nova.api.metadata.base [req-15612a39-649f-4598-b588-ebcceedd49b1 - - - - -] POTATO -3 CHECKING IF WE HAVE DEVICE_METADATA| None<br><br></div><div>device_metadata = None so the condition is False so it skips all that code. It seems a bit strange, since None would mean there is nothing so let's add some data?</div><div><br></div><div>I am not clear on how self.instance.device_metadata is expected to behave. I'll have to dig a little deeper.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 7:58 PM Laurent Dumont <<a href="mailto:laurentfdumont@gmail.com" target="_blank">laurentfdumont@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Trying to trace the code that I dont fully grasp :D <div><br></div><div>We start in nova/base.py</div><div><a href="https://github.com/openstack/nova/blob/stable/ussuri/nova/api/metadata/base.py" target="_blank">https://github.com/openstack/nova/blob/stable/ussuri/nova/api/metadata/base.py</a><br></div><div><br></div><div>We seem to generate a device array with a bunch of stuff inside</div><div><br></div><div> if self._check_os_version(NEWTON_ONE, version):<br> metadata['devices'] = self._get_device_metadata(version)<br></div><div><br></div><div>(but only if the version is higher than NEWTON_ONE? I dont think we generate the file every single time someone calls the API so it's probably at VM creation only?)</div><div><br></div><div>Looking at the code for <span style="color:rgb(130,80,223);font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap">_get_device_metadata</span></div><div><br></div><div><a href="https://github.com/openstack/nova/blob/184a3c976faed38907af148a533bc6e9faa410f5/nova/api/metadata/base.py#L367" target="_blank">https://github.com/openstack/nova/blob/184a3c976faed38907af148a533bc6e9faa410f5/nova/api/metadata/base.py#L367</a><br></div><div><br></div><div>It seems we try to build an array for Metadata specifically. It's not expected to be a full list of all the actual devices (ports + disks).</div><div><br></div><div>I'll see if I add a tag to a port, does it now show up?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 7:29 PM Laurent Dumont <<a href="mailto:laurentfdumont@gmail.com" target="_blank">laurentfdumont@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Circling back on this, I see the same in my kolla-ansible + Ussuri.<div><br></div><div>{"uuid": "a916a95d-3f9b-4e5e-9f64-894470742d8b", "hostname": "test-laurent.novalocal", "name": "test-laurent", "launch_index": 0, "availability_zone": "nova", "random_seed": "EEO9FjZLP51L4DDzQV09NRlwUeuKQa+XlGEWp3nH3XKXCnM5vEwhVgw/qG2kuqLN3HZ+oQIcLsnFPwoCsr5TuYodLTTTEhHgo0xJwZ3mlY/P6Br7QWCOyXCDEIKDxxfvxXhDOKtf9OFkFNROD9GDc4vWrOeCDGtcKshf5QZLsgiIv07fQus9axsqGYosNPdOKAejRa+gVtQfxlqV0kVcVIWWOAQOQdVh/TfoBGaxc8FjSCj/9MHLUMYP/zPSj+NRU4G1AwlKHzmxxiF4LQwHCBuy6dNrG+ImpUs6nLORjlDAgovoMhwIgDVhgihel4eFoT8f2izuq42yCen7yRU7FSfJcL40IlTmdHVTJTfChS2+yP5Y5SjeNHAmO6xCRJ9CCliRXIj8hsCjD0triQi2LCMC/gvZoaLSeczSzUgmL3zEFB+9IcalUuvf4yChK2OqpGfK94YlWR/U7fivdyUMChlaUC9BilPJUkUpCPL2wHiKKQMpPVFK5sRZoFe7nnegLRrMvYKuCPbtp99VqCCm2ts/6u6dgCHZdUD+NvOYUOMBGXYcQz0DVIpF/HyAI+AuW/5HAPCw66NZfwsCfMugzGf5+ljm8zr4UU//pf0vMCVX690dGyVraB/ozuXg1rdQYF8f7iDh9v2vkR+oanuC1sY6bHV+DRMhfc/Xp+KFDCc=", "project_id": "4db7dbf9961c4fc6a4589a5cb2ae3c9a", "devices": []}#<br></div><div><br></div><div>Nothing in Devices</div><div><br></div><div>But I see it in the network endpoint</div><div><br></div><div># curl <a href="http://169.254.169.254/openstack/2018-08-27/network_data.json" target="_blank">http://169.254.169.254/openstack/2018-08-27/network_data.json</a><br>{"links": [{"id": "tap1b4490ec-76", "vif_id": "1b4490ec-76b9-4223-9a31-837d60b13cc2", "type": "ovs", "mtu": 1450, "ethernet_mac_address": "fa:16:3e:58:a4:4a"}], "networks": [{"id": "network0", "type": "ipv4_dhcp", "link": "tap1b4490ec-76", "network_id": "bef77274-defd-463c-814a-5051ea2acae0"}], "services": []}# <br></div><div><br></div><div>I'll look at the code, but I am not clear where that snippet is being generated. It could be expected that the devices array is empty.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 20, 2022 at 11:11 AM Ahmed Abdelhamid <<a href="mailto:ahmedabdelhamid1221@gmail.com" target="_blank">ahmedabdelhamid1221@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks. It's OpenStack ussuri, deployed via kolla-ansible </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 18, 2022 at 10:06 PM Laurent Dumont <<a href="mailto:laurentfdumont@gmail.com" target="_blank">laurentfdumont@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That is weird.<div><ul><li>What version of Openstack are you running?</li><li>How was it deployed?</li></ul></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 18, 2022 at 9:30 AM Ahmed Abdelhamid <<a href="mailto:ahmedabdelhamid1221@gmail.com" target="_blank">ahmedabdelhamid1221@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks, Laurent. I tried it for both CEPH-backed VMs and ones with local disk, still, the devices array is empty<div><br></div><div>Network data curl shows alright</div><div><br></div><div>{"links": [{"id": "tapa.....", "vif_id": "ae....", "type": "bridge", "mtu": 1500, "ethernet_mac_address": "fa:......."}], "networks": [{"id": "network0", "type": "ipv4_dhcp", "link": "tap.....<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 16, 2022 at 6:39 PM Laurent Dumont <<a href="mailto:laurentfdumont@gmail.com" target="_blank">laurentfdumont@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Are you getting anything from the neutron endpoint?<div><br></div><div><a href="http://169.254.169.254/openstack/2018-08-27/network_data.json" target="_blank">http://169.254.169.254/openstack/2018-08-27/network_data.json</a><br></div><div><br></div><div>Can you provide an "openstack server show $server_id" of the VM? I wonder if it's a case of boot from a volume VM missing that data. It would not explain why the port is not there though.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 15, 2022 at 9:15 AM Ahmed Abdelhamid <<a href="mailto:ahmedabdelhamid1221@gmail.com" target="_blank">ahmedabdelhamid1221@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I am running into a strange issue with the metadata service. Per <a href="https://docs.openstack.org/nova/latest/user/metadata.html" target="_blank">metadata-service manual</a>, the devices attached to a VM should be visible in </div><div><br></div><div>$ curl <a href="http://169.254.169.254/openstack/2018-08-27/meta_data.json" target="_blank">http://169.254.169.254/openstack/2018-08-27/meta_data.json</a><br></div><div><br></div><div>However, whenever i execute it from a VM , the devices array is empty and looks like this, any idea why ?</div><div><br></div><div>Thanks</div><div><br></div><div><pre style="box-sizing:border-box;line-height:16.25px;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:20px 30px;margin-top:0px;margin-bottom:10px;color:rgb(255,255,255);word-break:break-all;background-color:rgb(51,51,51);border:1px solid rgb(204,204,204);border-radius:4px"><span style="box-sizing:border-box;color:rgb(208,208,208)">{</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"random_seed"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"yu5ZnkqF2CqnDZVAfZgarG..."</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"availability_zone"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"nova"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"keys"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">[</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">{</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"data"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"type"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"ssh"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"name"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"mykey"</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">}</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">],</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"hostname"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"test.novalocal"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"launch_index"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(54,119,169)">0</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"meta"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">{</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"priority"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"low"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"role"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"webserver"</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">},</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"devices"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">[</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">],</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"project_id"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"f7ac731cc11f40efbc03a9f9e1d1d21f"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">,</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"public_keys"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">{</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"mykey"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n"</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(208,208,208)">},</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(106,184,37);font-weight:bold">"name"</span><span style="box-sizing:border-box;color:rgb(208,208,208)">:</span><span style="box-sizing:border-box;color:rgb(102,102,102)"> </span><span style="box-sizing:border-box;color:rgb(237,157,19)">"test"</span><span style="box-sizing:border-box;color:rgb(102,102,102)"></span>
<span style="box-sizing:border-box;color:rgb(208,208,208)">}</span></pre></div><div><br></div><div><br></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>