/srv/irclogs.ubuntu.com/2016/05/25/#cloud-init.txt

copumpkinwhat does the ~ mean in cloud.cfg values?14:10
copumpkinmy machine comes with a cloud.cfg with "ssh_genkeytypes: ~"14:12
copumpkinas well as "syslog_fix_perms: ~" and a couple of other instances14:13
copumpkinoh, it's a YAML construct14:25
smosercopumpkin, yeah. yaml has some nice things16:23
copumpkinyeah, somehow I've been writing yaml for ages and never came across the tilde :)16:23
smoseri didn't know that '~' is same as null16:23
copumpkinyeah, not sure who produced the cloud.cfg with it in there16:24
copumpkinit's the default cloud.cfg for centos AMIs on ec216:24
smoser[somewhat related] anchors are very useful in yaml16:24
copumpkinyeah, I've dealt with those16:24
copumpkinalthough I start preferring jsonnet or nix when it comes to that16:25
smoserhttp://paste.ubuntu.com/16686200/16:27
smoseri dont know jsonnet  or nix16:27
copumpkinthink json/YAML withs slightly different syntax, explicit variable binding, and functions16:28
copumpkinmakes it very pleasant to do repetitive things16:28
copumpkinhttp://jsonnet.org/ and http://nixos.org/nix16:28
smoseryeah, jsonnet looks nice.16:29
smosernix is a package manager ?16:30
smoserhow does that have to do with json or yaml ?16:30
copumpkinyeah, but it's also a language with very similar behavior to jsonnet (basically the same thing with a different syntax), which they use to specify all their packages in16:31
copumpkinbasically a purely functional lazy language for defining config (no side effects, file writing, or any of that junk)16:31
copumpkinI actually prefer it to jsonnet, but it's a less obvious match than jsonnet because nobody really thinks of it as a standalone language16:32
harlowjarharper not much response on that thread, thinking i'll just go ahead and make a versioned openstack 'converter'17:52
rharperharlowja: I think so; someone we have 3 reasonable ppl saying bug18:34
rharperso versioned converter makes sense18:34
harlowjak18:34
rharperin your branch I think18:34
harlowjasure18:34
copumpkinif I'm writing my own cloud-init module, is there a simple way to query the instance ID?19:04
copumpkinI could hit 169.254.169.254 directly, but that doesn't account for the various other ways cloud-init could get an instance ID19:04
copumpkinaha, cloud.get_instance_id() looks promising19:07
harlowjaor 'cat /var/lib/cloud/data/instance-id'19:15
copumpkinis there a reason to do that over get_instance_id()?19:17
harlowjanah, if u are writing python code modules then probably prefer get_instance_id19:18
copumpkincool, thanks19:19
rharperharlowja: on the network_data.json, should we propose a fix to those drivers (ovs and linuxbridge) and have them emit type: vif in their metadata hook ?20:45
harlowjain nova u mean rharper ?20:46
harlowjawould seem to make sense to me20:46
rharperyeah or neutron; where ever those backends live20:47
harlowjahttps://github.com/openstack/nova/blob/master/nova/virt/netutils.py#L172 is where the json gets made20:47
rharperyeah20:47
harlowjaseems like https://github.com/openstack/nova/blob/master/nova/virt/netutils.py#L250 just needs to be not just ethernet :-P20:47
harlowjabut vif.get('type') in ['ethernet', 'vlan', 'vos']20:47
harlowjaor something like that?20:48
rharperthe vif .type attribute is the deal20:48
rharperyeah, hard to say if the metadata should fix it up or if there's some other attribute that should be set (like guest visible vif_type) ?20:48
harlowjaagreed20:48
rharperthe mapping in netutil is easy; not sure if we should push further up20:48
rharperin the model20:48
harlowjaagreed20:49
rharperk20:49
harlowjacan just propse a patch, see if it gets shot down :-P20:49
* rharper adds something else to poke at 20:49
harlowjau or i can, ha20:49
rharperhaha20:49
harlowjarharper  https://gist.github.com/harlowja/12e0a56ff0ee0182cc943f966bef8ec022:51
harlowjashould fix that issue22:51

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