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

smoserrharper, https://jenkins.ubuntu.com/server/job/cloud-init-tests/nodes=metal-ppc64el/116/display/redirect00:33
smoserthat sysstem was deployed wiht cloud-init, so it has a file /etc/systemd/network/50-cloud-init-enP2p1s0.link00:34
smoserand the glob in _render_systemd_links tried to unlink it00:34
smoserthere is a FilesystemMockingTestCase that does a lot of what you had done there.00:35
smoser(and also does not get glob.glob00:35
smoser)00:35
smoserbut it could and it'd be good if we did do all these things in one place.00:36
rharpersmoser: hrm; that's really old cloud-init which emitted .link files instead of doing it manually ...11:33
rharperhuh; I didn't think we still emitted .link files at all it 's present in the eni renderer; that can't be helpful;12:29
phr34kquestion, 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:44
phr34kit's my first time and i can't figure out where it goes wrong in my setup12:45
smoserphr34k, /var/log/cloud-init.log look for WARN is the first thing. /run/cloud-init/result.json will show errors.13:03
smoseralso /var/log/cloud-init-output.log13:04
smoserand the easiest thing to do to debug / quickly launch/test/cycle is lxd13:04
=== rangerpbzzzz is now known as rangerpb
smoserlxc launch ubuntu-daily:zesty "--config=user.user-data=$(cat /tmp/mycc.cfg)" my-container13:04
rangerpbOdd_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:05
Odd_Blokerangerpb: 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
rangerpbok13:10
rangerpbOdd_Bloke, done!13:12
phr34k@smoser okay had a look at the files which gave me the following13:13
phr34khttps://gist.github.com/phr34k/d8caf3f28977cc236a08e8a72e7c821013:13
Odd_Blokerangerpb: Approved!13:14
phr34kis there anything suspicious about the bootcmd command, it's pretty much copied over from the documentations..13:14
Odd_Blokesmoser: 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:14
smoserphr34k, i suspect there is some stuff in the output of cloud-init-output.log13:15
smoserphr34k, secondly i suspect it will tell us that you need a -F on your mkfs /dev/vdb13:16
smoserOdd_Bloke, will review13:16
Odd_Blokesmoser: Cool, thanks. :)13:17
smoserOdd_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:20
phr34k@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
smoserals, the commit message/description needs updating13:21
smosers/als/also/13:21
smoserSubject\nBlank Line\nDescription13:21
phr34kbut i'm not seeing actual references to errors / which commands go wrong in particulair / why it does wrong.13:22
smoserphr34k, i'm pretty sure that 'output' is not /var/log/cloud-init-output.log13:22
smoserthat looks like /var/log/cloud-init.log13:23
smoserand i'm pretty sure if you just run: sudo mkfs /dev/vdb13:23
smoserit will fail13:23
rangerpbsmoser, ok just fixed that comment ... by commit message, you are talking about the launchpad commit message not the git commit message right?13:24
rangerpbwhat goes in there?13:24
smoserrangerpb, well, the MP might have several commits, and then i "squash" it and commit with the commit message taht you provide.13:25
smoserso for your 1 commit, you can take that and put it into 'commit message' in the merge proosal13:25
phr34kah 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:25
smoser(as i could too).  but please do mention ideally in the subject that this only affects (i think) the "builtin" path.13:26
rangerpbok done!13:26
rangerpboh13:26
rangerpbok13:26
smoserphr34k, i dont know what you're trying to do :)13:27
smoserif you want to put a filesystem on /dev/vdb, then doing so is pretty important13:27
smoserif there is no /dev/vdb, then it would not seem so important13:27
smoser:)13:27
phr34kah the only thing i was trying to do was add a host entry to the host file13:27
phr34kthere is no /dev/vdb no13:27
rangerpbsmoser, Odd_Bloke ok, see how that suits ya13:28
smoserrangerpb, i'm going to change the subject line of that to13:30
smoser Bounce network interface on Azure when using the built-in path.13:30
smoserand then merge13:30
rangerpbok13:30
rangerpbtotally cool with that.13:30
smoserrangerpb, is there a lp bug ?13:31
rangerpbNot that I am aware of ... this is something paulmey identified and I fixed for the built-in path13:31
smoserok. thanks.13:32
smoserhttps://bugs.launchpad.net/cloud-init/+bug/167468513:37
rangerpbah cool13:38
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32049513:52
smoserpowersj, ^13:52
smoseri verified that this was correct by making 'return_value=["/etc/passwd"]' and see it faili trying to remove that.13:53
rharpersmoser: yes; that fixes the unittest; I'm worried that we're still writing those files in the first place13:55
smoseri think we should be writing them.13:56
rharperwhat effect do they have when we use ip to rename interfaces anyhow?13:57
smoserthey'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:57
rharpernow that i see we're still writing them, I'll need to look at how the interaction works with netplan13:58
rharpernetplan will also write .link files13:59
smoserwe only write them when rendering eni14:02
rharpery14:03
rharperbtw; I don't think we should unlink the files before writing14:03
smoserso its pretty much the same situation as netplan will be in14:03
smoserwe unlink ones that cloud-init wrote14:03
rharpersure14:03
smoserotherwise we end up with stale values there.14:03
smoserthese are "owned" by cloud-init14:03
smosernew instance , they get wiped14:03
smoser(same as /etc/network/interfaces.d/50-cloud-init.cfg)14:04
rharperyeah;  I was thinking we wouldn't touch it if we've nothing to write;14:04
smoserrharper, do you want to approve that?14:12
smoseri'm willing to entertain investigation into whether ornot those should be written in eni path.14:12
smosersince cloud-init will set the names itself. i think we ended up writing them so they'd get into the initramfs14:13
smoserother wise, later attempts would fail due to the "only rename once" thing...14:13
rharpersmoser: I think it's fine to clean those up; as you say, cloud-init owns them;14:14
smoserand then, we decided that in order to support renaming of nics in lxc we had to do it ourselves.14:14
rharperwell, 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 anyhow14:14
smoser(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:14
smoserright. the value is on update-initramfs and reboot, there is *less* movement of things.14:15
smoserbut the end result should be the same. so it is arguable that they're confusing duplication.14:15
rharperwe could look at transitioning14:15
smoserat least those are the cases that i remember.14:15
rharperwe'd stop writing, but continue removing14:15
smoseryou do remember all the fun we had getting this right the first time :)14:16
rharperthat is, we would really want them to linger14:16
rharper"fun"14:16
rharperI'm still having that fun every time I touch a .service .link or .network file14:16
smoseryeah. and i'm afraid that there is probably some use case that i'm not thinking of.14:17
rharpersmoser: 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:34
rharpersmoser: 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 image14:36
rharperif 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:37
smoserrharper, it seems to me that maybe uc16 needs to change. i'm really sort of adverse to adding yet another location for config files.14:49
rharpersmoser: k15:00
smoserdo you disagree?15:01
rharpersmoser: 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 certa15:17
rharperinly introduces yet another path for config (which has positives and negatives)15:17
=== shardy is now known as coding_shardy
=== coding_shardy is now known as shardy
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32055520:35
powersjsmoser: https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/320560 something for us to talk through at somepoint21:38
=== rangerpb is now known as rangerpbzzzz

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