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