/srv/irclogs.ubuntu.com/2016/03/10/#cloud-init.txt

=== 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
smoserOdd_Bloke, ping14:55
smoseri 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-pac14:55
smoserkages/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 byte14:55
smoseron my system14:55
smoserbecause /sys/class/dmi/id/product_name has non-utf-8 stuff in it.14:55
smoserwhat should we do there?14:56
smoser xxd /sys/class/dmi/id/product_name14:56
smoser00000000: ffff ffff ffff ffff ffff ffff ffff ffff  ................14:56
smoser00000010: ffff ffff ffff ffff ffff ffff ffff ffff  ................14:56
smoser00000020: ff0a                                     ..14:56
Odd_Blokesmoser: AIUI, that means that it's possible to set that DMI value, but it isn't set to anything.14:57
Odd_Blokesmoser: (Whereas all 0s means that it can't be set)14:58
smoseroh, interesting.14:58
smoserbut what if i set it to all zeros :)14:58
smoserthen it cant be set14:58
Odd_BlokeWell, I don't know if _you_ can set it at all, it might all be set in stone after early boot stuff.14:59
smoserbut generally, what should we do about the possibility / reality of non-utf8 in dmi data.14:59
Odd_BlokeWell, this is a known special-case (which we should handle).15:00
Odd_BlokeWould we expect to get non-UTF8 DMI data on a system which wasn't physically broken?15:00
smoseri dont know.15:01
smoserdo you?15:01
smoseri suspect the answer is at least "sometimes stuff is broken"15:02
smoserand cloud-init shouldnt fall over on that.15:02
Odd_BlokeI don't know, no.15:03
Odd_BlokeYeah.15:03
Odd_BlokeI think we only call that in two places ATM.15:03
Odd_BlokeIf we get non-UTF8 data, then we aren't on Azure (or Azure is horribly broken).15:03
Odd_BlokeSo returning None there would be fine.15:03
Odd_BlokeI can't call the other place to mind off the top of my head.15:03
Odd_BlokeBut I suspect garbage can safely be reported as "no value", until we find an example when that isn't true.15:04
smoserOdd_Bloke, https://code.launchpad.net/~smoser/cloud-init/trunk.dmidecode-null/+merge/28867617:29
smoserif you can find referencen to '\x00' then i'd happily return some value for that too (ideally whatever dmidecode would do)17:29
rharpersmoser: your MP has merge markers17:29
smoserfiddle17:30
smoseri push-overwrited17:33
smoseras i actually had also pushed unintended chagnes17:33
smoser:)17:33
smoserbut merge markers in Changelog i dont care too much about.17:33
rharpersure17:34
rharpersmoser: but the MP shows changes to unrelated stuff IIUC, the cloud-init generator for example has nothing to do with the dmidecode, no?17:35
smoserno longer17:36
* rharper refresh17:36
smoseri pushe --overwrited with those removed17:36
smoserrharper, so for network rendering17:37
smoserlooking at curtin/net/network_state.py seems pretty much a howto17:37
rharperyes17:37
smoserand i answered my own question now17:38
smoserrender_network_state17:38
smoseris what i want17:38
rharperand then consuming/using networkstate is documented in curtin/commands/apply_net.py (which uses curtin/net/__init__.py:render_eni17:38
rharperyes17:38
rharperrender_network_state17:38
rharperand optionally the udev rule writer17:38
smoserrender_network_state renders persistent net17:39
rharperright17:42
rharperyou;'re looking at the code17:42
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/trunk.net1 is with curtin/net copied over.21:46
smoserid' hope to have that used via nocloud datasource by morning.21:46
rharpersmoser: nice! I'll pickup that branch and migrate cloud-init-tests to use that instead of my curtin apply_net hack22:01
smoserlets talk tomorrow morning22:03
smoseri have to go afk now. will be back later.22:03
rharperok22:13

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!