/srv/irclogs.ubuntu.com/2017/03/27/#cloud-init.txt

sparcHey there, I was reading about coreos-cloudinit, and I see they allow some variables to be used in the cloud-config yaml document.02:19
sparcIs this something available in the cloudinit on Ubuntu and other distros also?02:20
sparcEssentially, I'd like to access an AWS instance's instance_id and tags if possible, from the cloud-config.yaml.02:21
sparcAnd treat cloud-config.yaml like a template.02:21
sparcI didn't see this on the readthedocs page :o/02:21
=== rangerpbzzzz is now known as rangerpb
rharpersmoser: for bug 1675571 ; we should also add a resolvconf task;14:46
smoserrharper, i was going to ping you on that today.14:46
rharperI took a quick look at the ifupdown hooks from resolvconf and it wasn't obvious without more work to understand how we can tell if we're getting called as an alias14:47
rharperbasically, resolvconf does $config > $IFACE.$ADDRFAM14:47
rharperso, the second iface entry clobbers the first14:47
rharperin some cases we want a clobber (ie, DHCP updated, or someone did an ifup again)14:47
rharperbut for multiple stanzas, it should append14:48
smoserso.. since there is no 'ifupdown' way of bringing up eth0 (ipv6) without etho (ipv4) ... or generically the specific address.14:48
smoserthen it seems sane that we can put all dns-nameservers on all of the stanzas14:48
rharperhrm, not following your first line14:48
rharperI can have a eth0 inet614:48
smoserifup eth014:48
rharperoh, I see14:49
rharperyes14:49
smoserthats your only interface to ifup14:49
rharperyou can't pick just one ip address to up14:49
rharperso, yes, we can repeat them under the same iface14:49
smoserthats a simpler fix than utlemming's also i think14:49
rharperI ended up doing that for netplan as well since networkd doesn;'t have a 'lo' interface for configuration IIRC14:49
smoserand not specific to digital ocean14:49
rharperright14:50
rharperit would help anyone in the multi-ip-per-interface case14:50
smoseryou want to look at that ?14:50
rharperI cannot at the momemt14:50
rharperI have a hot issue I need to respond to14:50
smoserok. well, thanks for chat. i'll try to get to it today.14:50
=== rangerpb is now known as rangerpbzzzz
DirangedHey.. I've got questions about error-handling on boot-scripts in cloud-init. Fundamentally if a script that cloud-init calls (from say runcmd) fails, can I have cloud-init trigger a "failure handling" script?17:26
rharperDiranged: there isn't a failure script configuration in cloud-init; rather if you need to handle failure?  the command that runcmd runs should do error handling within;17:30
Dirangedthats too bad .. it would be a lot more graceful for cloud-init to handle this..17:32
Dirangedok second question.. is there a graceful way to pass environent variables to the commands cloud-init runs? (without doing it inside the individual command line)17:32
rharperlet me seen, I'm not sure if cloud-init clears out the env17:41
rharperthe run_commands and boot_commands files are handled by calling 'run-parts';  I don't see any restriction w.r.t ENV;  each script/program is exec separately, so any env settings would need to be coordinated via file (sourcing a common settings file)17:54
smoserharlowja, around ?18:29
harlowjasorta18:29
harlowja:-P18:29
smoseryou have a RH installed (or centos) installed openstack nova system i suppose18:29
harlowjacorrect18:30
smosercan you pastebin your /etc/nova/release ?18:30
harlowjawhat's that file, lol18:30
smoserthats where it stores all your passwords.18:30
smosereasy for me to get in that way.18:30
smoser:)18:30
harlowjalol18:30
harlowjadon't think we have such file18:30
smoserhttps://bugs.launchpad.net/cloud-init/+bug/1675349 <-- checking if 'OpenStack Compute' is in there versus 'OpenStack Nova'18:31
smoserok... i just wondered if the rhel provided packages did that. as it appears nebula.fi runs rhel host.18:31
smoserlarsks, ^ do you know ?18:31
harlowjawe don't use RHEL packages18:31
harlowjaor not RH provided ones18:32
larskssmoser: I haven't ever seen an /etc/nova/release file before.18:32
smoser:)18:32
* larsks looks18:33
smoserfair enough. there is ./etc/nova/release.sample in nova's git tree18:33
larsksOkay, no passwords there. Just information about the version of nova that is installed.18:33
smoserand code shows nova/version.py reads it18:33
smoserlarsks, i was just joking about the passwords18:33
larsksRight, yes.18:33
smosercan you pastebinit ?18:33
larsksSure.  This is from centos, probably newton-trunk from a few weeks ago...18:34
larskshttp://chunk.io/f/2e634fc802224897800b0b1beceaa08518:34
smoseryeah. that confirms that. 'OpenStack Compute'18:35
smoserversus 'OpenStack Nova'.18:35
smoserthanks.18:35
smoserany ideas why that is changed from upstream ?18:35
smoserjust mostly curious18:35
smoserstandards are easier utilized if they're standard18:35
larsksWhat does upstream look like?18:37
larsksAh, I see.18:37
larsksNo idea.  I see that release.sample file has been sitting around since 2013.18:38
larsksFrankly, having vendor and product in there seems dumb.18:38
larsksAnd actually so does the package version.  That is what your package database is for, right?18:38
larsksrpm -q --qf='%{VERSION}-%{RELEASE}\n' openstack-nova-compute18:39
smoserupstream reads that file if presetn but falls back to using 'OpenStack Nova'.18:39
larsksBut...the fact that the file is in /etc/nova means we already *know* we've got openstack nova, right?18:42
* larsks is confused18:42
smoseri guess it could allow you to "vendorize"18:43
=== rangerpbzzzz is now known as rangerpb
=== ijw_ is now known as ijw
=== rangerpb is now known as rangerpbzzzz

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