=== mfisch is now known as Guest38484 === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit === openstackgerrit_ is now known as openstackgerrit [14:55] Odd_Bloke, ping [14:55] i see Mar 10 14:53:55 ubuntu [CLOUDINIT] util.py[DEBUG]: failed read of /sys/class/dmi/id/product_name#012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2143, in _read_dmi_syspath#012 key_data = load_file(dmi_key_path)#012 File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1187, in load_file#012 return decode_binary(contents)#012 File "/usr/lib/python3/dist-pac [14:55] kages/cloudinit/util.py", line 88, in decode_binary#012 return blob.decode(encoding)#012UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte [14:55] on my system [14:55] because /sys/class/dmi/id/product_name has non-utf-8 stuff in it. [14:56] what should we do there? [14:56] xxd /sys/class/dmi/id/product_name [14:56] 00000000: ffff ffff ffff ffff ffff ffff ffff ffff ................ [14:56] 00000010: ffff ffff ffff ffff ffff ffff ffff ffff ................ [14:56] 00000020: ff0a .. [14:57] smoser: AIUI, that means that it's possible to set that DMI value, but it isn't set to anything. [14:58] smoser: (Whereas all 0s means that it can't be set) [14:58] oh, interesting. [14:58] but what if i set it to all zeros :) [14:58] then it cant be set [14:59] Well, I don't know if _you_ can set it at all, it might all be set in stone after early boot stuff. [14:59] but generally, what should we do about the possibility / reality of non-utf8 in dmi data. [15:00] Well, this is a known special-case (which we should handle). [15:00] Would we expect to get non-UTF8 DMI data on a system which wasn't physically broken? [15:01] i dont know. [15:01] do you? [15:02] i suspect the answer is at least "sometimes stuff is broken" [15:02] and cloud-init shouldnt fall over on that. [15:03] I don't know, no. [15:03] Yeah. [15:03] I think we only call that in two places ATM. [15:03] If we get non-UTF8 data, then we aren't on Azure (or Azure is horribly broken). [15:03] So returning None there would be fine. [15:03] I can't call the other place to mind off the top of my head. [15:04] But I suspect garbage can safely be reported as "no value", until we find an example when that isn't true. [17:29] Odd_Bloke, https://code.launchpad.net/~smoser/cloud-init/trunk.dmidecode-null/+merge/288676 [17:29] if you can find referencen to '\x00' then i'd happily return some value for that too (ideally whatever dmidecode would do) [17:29] smoser: your MP has merge markers [17:30] fiddle [17:33] i push-overwrited [17:33] as i actually had also pushed unintended chagnes [17:33] :) [17:33] but merge markers in Changelog i dont care too much about. [17:34] sure [17:35] smoser: but the MP shows changes to unrelated stuff IIUC, the cloud-init generator for example has nothing to do with the dmidecode, no? [17:36] no longer [17:36] * rharper refresh [17:36] i pushe --overwrited with those removed [17:37] rharper, so for network rendering [17:37] looking at curtin/net/network_state.py seems pretty much a howto [17:37] yes [17:38] and i answered my own question now [17:38] render_network_state [17:38] is what i want [17:38] and then consuming/using networkstate is documented in curtin/commands/apply_net.py (which uses curtin/net/__init__.py:render_eni [17:38] yes [17:38] render_network_state [17:38] and optionally the udev rule writer [17:39] render_network_state renders persistent net [17:42] right [17:42] you;'re looking at the code [21:46] rharper, https://code.launchpad.net/~smoser/cloud-init/trunk.net1 is with curtin/net copied over. [21:46] id' hope to have that used via nocloud datasource by morning. [22:01] smoser: nice! I'll pickup that branch and migrate cloud-init-tests to use that instead of my curtin apply_net hack [22:03] lets talk tomorrow morning [22:03] i have to go afk now. will be back later. [22:13] ok