/srv/irclogs.ubuntu.com/2016/06/27/#cloud-init.txt

=== lunarlamp is now known as mariusv
=== shardy is now known as shardy_afk
smoserharlowja, around ?19:58
smoserhttps://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/159669019:58
harlowjayo yo20:00
harlowjaaround, in all day meeting about ironic20:00
harlowjaso may be on/off20:00
harlowjawhats this azure thing20:00
harlowjalo20:00
smoser http://paste.ubuntu.com/17990192/20:00
smoseris that sane ?20:01
smoserthat obj.pkl think is apita20:01
smosera pita20:01
smoserbut when i load it from disk, i can't be guaranteed that it has a dsmode, as the dsmode was getting set in the __init__20:01
smoserbut restoring doesn't call __init__20:01
harlowjahmmmm, stupid pickle20:01
smoserso that change there *does* stop the stack trace... as it then means the dsmode is gotten from the superclass.20:02
harlowjais there anyway to plugin to __setstate__ and ensure a default is set?20:02
harlowjahttps://docs.python.org/2/library/pickle.html#object.__setstate__20:03
smosermaybe..20:04
smoserso th patch there works, but wasn't sure if it migiht mean getting the super classes value all the time20:04
smoseri wouldnt think so, but need to check.20:04
smoserit seems to be ok.. the __setstate__ seems useful20:13
smoseri think amybe look at that late.r20:13
smoseri want to get to ditching the pkl'd object at some point20:13
smoserand have some better serialized object... less complex that is restored from20:14
smoserharlowja, could you sanity check http://paste.ubuntu.com/17991115/ ?20:18
smoserit seems to be right for me... tested that un-pickled objects that did not have the dsmode attribute now have it, and those that *did* have it keep their old value.20:19
harlowjaya, i think that will be ok20:19
smoseri guess the thing i'm really asking about is the differece between __init__ doing a self.dsmode =20:19
smoserand having dsmode as a class attribute20:20
harlowjaya, one is just setting it a class load time as a default20:23
harlowjawhich i guess is fine for this, until we get rid of the obj.pkl junk20:23
harlowjaand move to something like to_json or something20:24
smoserright. ok thank you.20:25

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