copumpkin | what does the ~ mean in cloud.cfg values? | 14:10 |
---|---|---|
copumpkin | my machine comes with a cloud.cfg with "ssh_genkeytypes: ~" | 14:12 |
copumpkin | as well as "syslog_fix_perms: ~" and a couple of other instances | 14:13 |
copumpkin | oh, it's a YAML construct | 14:25 |
smoser | copumpkin, yeah. yaml has some nice things | 16:23 |
copumpkin | yeah, somehow I've been writing yaml for ages and never came across the tilde :) | 16:23 |
smoser | i didn't know that '~' is same as null | 16:23 |
copumpkin | yeah, not sure who produced the cloud.cfg with it in there | 16:24 |
copumpkin | it's the default cloud.cfg for centos AMIs on ec2 | 16:24 |
smoser | [somewhat related] anchors are very useful in yaml | 16:24 |
copumpkin | yeah, I've dealt with those | 16:24 |
copumpkin | although I start preferring jsonnet or nix when it comes to that | 16:25 |
smoser | http://paste.ubuntu.com/16686200/ | 16:27 |
smoser | i dont know jsonnet or nix | 16:27 |
copumpkin | think json/YAML withs slightly different syntax, explicit variable binding, and functions | 16:28 |
copumpkin | makes it very pleasant to do repetitive things | 16:28 |
copumpkin | http://jsonnet.org/ and http://nixos.org/nix | 16:28 |
smoser | yeah, jsonnet looks nice. | 16:29 |
smoser | nix is a package manager ? | 16:30 |
smoser | how does that have to do with json or yaml ? | 16:30 |
copumpkin | yeah, 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 in | 16:31 |
copumpkin | basically a purely functional lazy language for defining config (no side effects, file writing, or any of that junk) | 16:31 |
copumpkin | I actually prefer it to jsonnet, but it's a less obvious match than jsonnet because nobody really thinks of it as a standalone language | 16:32 |
harlowja | rharper not much response on that thread, thinking i'll just go ahead and make a versioned openstack 'converter' | 17:52 |
rharper | harlowja: I think so; someone we have 3 reasonable ppl saying bug | 18:34 |
rharper | so versioned converter makes sense | 18:34 |
harlowja | k | 18:34 |
rharper | in your branch I think | 18:34 |
harlowja | sure | 18:34 |
copumpkin | if I'm writing my own cloud-init module, is there a simple way to query the instance ID? | 19:04 |
copumpkin | I could hit 169.254.169.254 directly, but that doesn't account for the various other ways cloud-init could get an instance ID | 19:04 |
copumpkin | aha, cloud.get_instance_id() looks promising | 19:07 |
harlowja | or 'cat /var/lib/cloud/data/instance-id' | 19:15 |
copumpkin | is there a reason to do that over get_instance_id()? | 19:17 |
harlowja | nah, if u are writing python code modules then probably prefer get_instance_id | 19:18 |
copumpkin | cool, thanks | 19:19 |
rharper | harlowja: 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 |
harlowja | in nova u mean rharper ? | 20:46 |
harlowja | would seem to make sense to me | 20:46 |
rharper | yeah or neutron; where ever those backends live | 20:47 |
harlowja | https://github.com/openstack/nova/blob/master/nova/virt/netutils.py#L172 is where the json gets made | 20:47 |
rharper | yeah | 20:47 |
harlowja | seems like https://github.com/openstack/nova/blob/master/nova/virt/netutils.py#L250 just needs to be not just ethernet :-P | 20:47 |
harlowja | but vif.get('type') in ['ethernet', 'vlan', 'vos'] | 20:47 |
harlowja | or something like that? | 20:48 |
rharper | the vif .type attribute is the deal | 20:48 |
rharper | yeah, 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 |
harlowja | agreed | 20:48 |
rharper | the mapping in netutil is easy; not sure if we should push further up | 20:48 |
rharper | in the model | 20:48 |
harlowja | agreed | 20:49 |
rharper | k | 20:49 |
harlowja | can just propse a patch, see if it gets shot down :-P | 20:49 |
* rharper adds something else to poke at | 20:49 | |
harlowja | u or i can, ha | 20:49 |
rharper | haha | 20:49 |
harlowja | rharper https://gist.github.com/harlowja/12e0a56ff0ee0182cc943f966bef8ec0 | 22:51 |
harlowja | should fix that issue | 22:51 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!