[00:33] rharper, https://jenkins.ubuntu.com/server/job/cloud-init-tests/nodes=metal-ppc64el/116/display/redirect [00:34] that sysstem was deployed wiht cloud-init, so it has a file /etc/systemd/network/50-cloud-init-enP2p1s0.link [00:34] and the glob in _render_systemd_links tried to unlink it [00:35] there is a FilesystemMockingTestCase that does a lot of what you had done there. [00:35] (and also does not get glob.glob [00:35] ) [00:36] but it could and it'd be good if we did do all these things in one place. [11:33] smoser: hrm; that's really old cloud-init which emitted .link files instead of doing it manually ... [12:29] huh; I didn't think we still emitted .link files at all it 's present in the eni renderer; that can't be helpful; [12:44] question, how do i go about verifying cloud-config file for correctness? i am trying to automate openstack provider with libcloud and running some cloud_init actions.. [12:45] it's my first time and i can't figure out where it goes wrong in my setup [13:03] phr34k, /var/log/cloud-init.log look for WARN is the first thing. /run/cloud-init/result.json will show errors. [13:04] also /var/log/cloud-init-output.log [13:04] and the easiest thing to do to debug / quickly launch/test/cycle is lxd === rangerpbzzzz is now known as rangerpb [13:04] lxc launch ubuntu-daily:zesty "--config=user.user-data=$(cat /tmp/mycc.cfg)" my-container [13:05] Odd_Bloke, heya, i updated the patch proposal. Does https://code.launchpad.net/~bbaude/cloud-init/+git/cloud-init/+merge/320411 look any better to you ? [13:10] rangerpb: Yep, looks much better! My only comment would be to rename the method to something like "bounce_network_with_azure_hostname" as it no longer really performs a "set". [13:10] ok [13:12] Odd_Bloke, done! [13:13] @smoser okay had a look at the files which gave me the following [13:13] https://gist.github.com/phr34k/d8caf3f28977cc236a08e8a72e7c8210 [13:14] rangerpb: Approved! [13:14] is there anything suspicious about the bootcmd command, it's pretty much copied over from the documentations.. [13:14] smoser: Can I safely land the Azure bouncing branch, or do you have other stuff going on that means you'd prefer not to ATM? [13:15] phr34k, i suspect there is some stuff in the output of cloud-init-output.log [13:16] phr34k, secondly i suspect it will tell us that you need a -F on your mkfs /dev/vdb [13:16] Odd_Bloke, will review [13:17] smoser: Cool, thanks. :) [13:20] Odd_Bloke, rangerpb i'm just lookiong at the merge proposal, but i think that the comment on line 31 ("Bouncing" the network, same ...) is not valid as i think that both are using the *same* method there. [13:21] @smoser maybe -i've checked some things form the output.log, related to warnings/bootcmd (updated on the gist https://gist.github.com/phr34k/d8caf3f28977cc236a08e8a72e7c8210) [13:21] als, the commit message/description needs updating [13:21] s/als/also/ [13:21] Subject\nBlank Line\nDescription [13:22] but i'm not seeing actual references to errors / which commands go wrong in particulair / why it does wrong. [13:22] phr34k, i'm pretty sure that 'output' is not /var/log/cloud-init-output.log [13:23] that looks like /var/log/cloud-init.log [13:23] and i'm pretty sure if you just run: sudo mkfs /dev/vdb [13:23] it will fail [13:24] smoser, ok just fixed that comment ... by commit message, you are talking about the launchpad commit message not the git commit message right? [13:24] what goes in there? [13:25] rangerpb, well, the MP might have several commits, and then i "squash" it and commit with the commit message taht you provide. [13:25] so for your 1 commit, you can take that and put it into 'commit message' in the merge proosal [13:25] ah yeah you are right, hmm it seems to complain about /dev/vdb that doesn't exists, what do the things in the [] do in specific? are they even needed for the bootcmd? [13:26] (as i could too). but please do mention ideally in the subject that this only affects (i think) the "builtin" path. [13:26] ok done! [13:26] oh [13:26] ok [13:27] phr34k, i dont know what you're trying to do :) [13:27] if you want to put a filesystem on /dev/vdb, then doing so is pretty important [13:27] if there is no /dev/vdb, then it would not seem so important [13:27] :) [13:27] ah the only thing i was trying to do was add a host entry to the host file [13:27] there is no /dev/vdb no [13:28] smoser, Odd_Bloke ok, see how that suits ya [13:30] rangerpb, i'm going to change the subject line of that to [13:30] Bounce network interface on Azure when using the built-in path. [13:30] and then merge [13:30] ok [13:30] totally cool with that. [13:31] rangerpb, is there a lp bug ? [13:31] Not that I am aware of ... this is something paulmey identified and I fixed for the built-in path [13:32] ok. thanks. [13:37] https://bugs.launchpad.net/cloud-init/+bug/1674685 [13:38] ah cool [13:52] rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/320495 [13:52] powersj, ^ [13:53] i verified that this was correct by making 'return_value=["/etc/passwd"]' and see it faili trying to remove that. [13:55] smoser: yes; that fixes the unittest; I'm worried that we're still writing those files in the first place [13:56] i think we should be writing them. [13:57] what effect do they have when we use ip to rename interfaces anyhow? [13:57] they're not harmful. they will be put intot the initramfs on next update, and will make less work for cloud-init to do. it does seem like duplication a bit. [13:58] now that i see we're still writing them, I'll need to look at how the interaction works with netplan [13:59] netplan will also write .link files [14:02] we only write them when rendering eni [14:03] y [14:03] btw; I don't think we should unlink the files before writing [14:03] so its pretty much the same situation as netplan will be in [14:03] we unlink ones that cloud-init wrote [14:03] sure [14:03] otherwise we end up with stale values there. [14:03] these are "owned" by cloud-init [14:03] new instance , they get wiped [14:04] (same as /etc/network/interfaces.d/50-cloud-init.cfg) [14:04] yeah; I was thinking we wouldn't touch it if we've nothing to write; [14:12] rharper, do you want to approve that? [14:12] i'm willing to entertain investigation into whether ornot those should be written in eni path. [14:13] since cloud-init will set the names itself. i think we ended up writing them so they'd get into the initramfs [14:13] other wise, later attempts would fail due to the "only rename once" thing... [14:14] smoser: I think it's fine to clean those up; as you say, cloud-init owns them; [14:14] and then, we decided that in order to support renaming of nics in lxc we had to do it ourselves. [14:14] well, with ip rename in cloud-init itself, those files just don't matter nor the logic of systemd won't rename; we're doing it anyhow [14:14] (because no matter what, systemd will refuse to rename those devices that are guaranteed to have been renamed once (from tap-XXXXXX to ethX by lxd)) [14:15] right. the value is on update-initramfs and reboot, there is *less* movement of things. [14:15] but the end result should be the same. so it is arguable that they're confusing duplication. [14:15] we could look at transitioning [14:15] at least those are the cases that i remember. [14:15] we'd stop writing, but continue removing [14:16] you do remember all the fun we had getting this right the first time :) [14:16] that is, we would really want them to linger [14:16] "fun" [14:16] I'm still having that fun every time I touch a .service .link or .network file [14:17] yeah. and i'm afraid that there is probably some use case that i'm not thinking of. [14:34] smoser: what other paths will cloud-init look in for initial system config? I think we have /etc/cloud/cloud.cfg.d/* and /run/cloud-init/*.cfg ; do we have like a /usr/lib/cloud/cloud.cfg ? [14:36] smoser: I'm poking at the UC16 case where UC16 bind mounts files or dirs on top of /etc/cloud/cloud.cfg.d (it can't do a union mount as I would prefer); which means things like the default logging config and other things end clobbered by the mount, or we have to duplicate them into the writable partition when we create the image [14:37] if we had say a /usr/lib/cloud/cloud.cfg.d/* we could move things like 05_logging.cfg and other system defaults there, leaving /etc/cloud/cloud.cfg.d for clobbering ... and I suppose we wouldn't even have to change the default location of those files from etc to the system path; as long as cloud-init also read from that location (UC16 could move them during it's core snap build) [14:49] rharper, it seems to me that maybe uc16 needs to change. i'm really sort of adverse to adding yet another location for config files. [15:00] smoser: k [15:01] do you disagree? [15:17] smoser: not entirely sure; to some degree it wouldn't be bad to have the same system, etc, run config paths; that would let cloud-init set it's defaults in /usr/lib/cloud/* ; and then override those wil files from etc or run; that said; there are two issues 1) this is a change in default behavior w.r.t location of these files (if we updated the packaging; the core snap could move them there if we didnt) 2) it certa [15:17] inly introduces yet another path for config (which has positives and negatives) === shardy is now known as coding_shardy === coding_shardy is now known as shardy [20:35] rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/320555 [21:38] smoser: https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/320560 something for us to talk through at somepoint === rangerpb is now known as rangerpbzzzz