[00:48] <akik> i installed cloud-init on centos 7.3. i provide it the cloud-config through cloud-config-url kernel parameter. the cloud-config ends up in /etc/cloud/cloud.cfg.d/91_kernel_cmdline_url.cfg but it's not executed
[01:21] <akik> /usr/bin/cloud-init init seems to get it resolved, after strange timeouts
[02:06] <akik> what does this error message mean? url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [6/120s]: unexpected error ['NoneType' object has not attribute 'status_code']
[02:07] <akik> there seems to be a timeout of 120s
[02:08] <akik> DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 120 seconds
[02:08] <akik> my cloud-config contains just one user creation and two small local file creations
[02:10] <akik> ok the problem seems to be connected to those two 120s tasks that just timeout
[02:10] <akik> one waiting for http://169.254.169.254/2009-04-04/meta-data/instance-id and the other waiting for http://192.168.137.1//latest/meta-data/instance-id
[03:03] <nacc> akik: fwiw, most of the devs are probably afk right now
[09:15] <akik> nacc: looks like i need to configure libcloud's datasources for the correct environment where the vm is running?
[09:15] <akik> at this time, my home :)
[10:13] <akik> it's a centos vm running in hyper-v manager in win10
[12:18] <akik> how do i tell cloud-init on which iaas infra it's running on?
[12:19] <akik> is it the datasource: part in /etc/cloud/cloud.cfg ?
[12:20] <akik> ds= kernel parameter?
[12:31] <akik> bc -l
[12:31] <akik> oops
[12:54] <smoser> blackboxsw, your diagnosis above is correct. but you did scare me :)
[13:01] <smoser> akik, the error there is due to falling back to the ec2 metadata service.
[13:02] <smoser> there is unfortunately really bad swallowing of the error for the nocloud url you provided.
[13:03] <smoser> ah. akik what was in the url that you put ?
[13:05] <smoser> but in order for this to work, the rm will have to be configured already to dhcp or whatever on the correct network interface.
[13:05] <smoser> ie, be already configured to "dhcp on eth0" or the equivalent
[13:06] <akik> smoser: i used cloud-config-url= to provide the cloud-config, but the provisioning timed out trying to access those two urls
[13:07] <akik> so i waited 4 minutes, and then cloud-init was able to apply the config to the vm
[13:09] <smoser> ah.
[13:10] <smoser> ok. so it sounds like you're just missing one thing.
[13:10] <smoser> you provided some cloud-config, but it did not find a datasource.  that is just "config".
[13:10] <smoser> in the config that you provide, you can also data that will be seen as a datasource.
[13:10] <smoser> let me find
[13:15] <akik> if i understood right, the cloud-config-url provides the user-data?
[13:16] <smoser> akik, from doc/examples/cloud-config-datasources.txt ... and ammended.
[13:16] <smoser>  http://paste.ubuntu.com/25527448/
[13:17] <akik> i will be moving this image to azure eventually, but i'm now testing it on my local machine
[13:18] <akik> smoser: is that for cloud.cfg?
[13:18] <smoser> the thing to be aware of is the networkign configureation.
[13:19] <smoser> in order to get that url.... networking has to be configured :)
[13:19] <akik> or is it for the cloud-config-url to process?
[13:20] <smoser> so cloud-config-url does not provide a datasource. it just provides cloud-config from the command line.
[13:20] <smoser> so as you saw, it gets dumped into that file
[13:20] <smoser> and cloud-config can define a datasource
[13:20] <smoser> as i did in the paste there.
[13:20] <akik> smoser: but do i need to start that file with #cloud-config ?
[13:20] <smoser> basically cloud-config-url is just grabbed and dumped to the file, and then cloud-config goes on its merry way.
[13:21] <smoser> i dont think it does... but it wouldnt hurt :)
[13:21] <akik> thank you
[13:28] <smoser> akik, no problem. this is not a very well ridden path, but i do think it should work.
[13:29] <akik> yes what i'm doing is quite odd too
[13:30] <akik> azure vms have two provisioning "things" that can be installed simultaneously, waagent and cloud-init
[13:30] <smoser> yeah.
[13:30] <smoser> i'm well aware :)
[13:30] <smoser> the goal is to replace the agent entirely
[13:30] <smoser> in newaest ubuntu releases, it is gone
[13:30] <smoser> (waagent that is)
[13:30] <akik> how well does cloud-init support centos?
[13:31] <smoser> well, recently  much better. but there are probably still some warts.
[13:31] <smoser> help is always welcome too :)
[13:31] <akik> i'll try that nocloud next
[13:31] <smoser> where'd you get your image ?
[13:31] <akik> i create it myself
[13:31] <akik> just finished a shell script that builds the vhd in centos
[13:36] <dpb1> SRU is through!
[13:37] <akik> oh btw i had another question about cloud-init. in azure the vm gets by default the sudo configuration NOPASSWD:. is that intentional?
[13:37] <akik> and now i mean the ubuntu server 16.04 image from azure marketplace
[13:40] <smoser> akik, literally NOPASSWD:. ?
[13:40] <smoser> the configured user should have passwordless sudo, yes.
[13:40] <smoser> as they have no password
[13:41] <akik> yes it's just weird how it's different from other ubuntu setups
[13:42] <akik> tell that on #ubuntu and they'll crucify you :)
[13:47] <smoser> akik, well, its a design decision.
[13:48] <smoser> you have no password for that user by default
[13:48] <smoser> and thus, you can't really configure sudo access with a password
[13:48] <smoser> so you get ssh access in and sudo as that user.
[13:48] <smoser> so access to the ssh private key essentially provides your sudo auth.
[13:49] <akik> but cloud-init still supports having a user password
[13:50] <smoser> sure. and it will let you configure the sudo stanza too if you want.
[13:53] <akik> was there some discussion about the NOPASSWD: on the mailing lists?
[14:19] <smoser> akik, well, no. this was proabbly 7 years ago. when ubuntu first got onto a cloud
[14:19] <smoser> akik, what would you *expect* to happen?
[14:19] <smoser> if you gave it a password, i could somewhat reasonably expect that it might configure the sudo for password auth
[14:19] <smoser> but if you dont give it a password, it has no way to convey one to you, so the only acl it possibly has is ssh key.
[14:20] <akik> i'd give the user a password
[14:22] <smoser> in config?
[14:28] <akik> yes in cloud-config
[14:38] <smoser> then i can see an argument for saying that sudo should have a password prompt also for that user.
[14:39] <smoser> its not somethign easily changed though due to being backwards compatible
[14:56] <akik> smoser: i'd give the user also the ssh pubkey
[15:01] <akik> that way using ubuntu in the cloud would feel the same as using it on the desktop
[15:19] <powersj> smoser: rharper blackboxsw: this is the merge for xkvm into cloud-init
[15:19] <powersj> https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+ref/add-xkvm
[15:19] <powersj> that should be an easy one (?)
[15:40] <akik> i used the following data for cloud-config-url= kernel parameter. this time the data didn't end up in /etc/cloud/cloud.cfg.d. is there something obvious i need to fix in the data?
[15:40] <akik> i still get the timeouts for url_helper.py
[15:45] <akik> had a bad paste. fixed paste here: https://pastebin.com/UVZtUwDB
[15:47] <akik> there's a slightly different syntax for the datasource here http://cloudinit.readthedocs.io/en/latest/topics/examples.html
[15:49] <akik> should i edit the default cloud.cfg that gets installed on centos from yum? the version is 0.7.5
[16:04] <smoser> powersj, ill pull
[16:07] <powersj> smoser: do you want the base64 functions you wrote as a separate merge? and do you want them in the integration test util file or cloud-init's util file?
[16:12] <smoser> part of the integration is fine. cloud-init doesn't really have any  use for them.
[17:05] <akik> i'm giving this on vm boot for the kernel: "ds=nocloud-net;s=URL". i have user-data and meta-data at URL. after booting up, i see in the log "DataSourceNoCloudNet [seed=cmdline][dsmode=net]". it looks like cloud-init didn't fetch those files
[17:34] <blackboxsw> smoser: pushed apport changes, because I couldn't help myself
[17:34] <blackboxsw> wrapping up chef
[17:35] <smoser> \o/
[17:35] <smoser> ok. lookoing.
[17:36] <dpb1> blackboxsw: that sounds fantastic
[18:12] <rharper> smoser: blackboxsw: anything need eyes/reviews right now
[18:19] <smoser> blackboxsw,
[18:19] <smoser> can i drop "The schema definition for each cloud-config module is a strict contract for"
[18:19] <smoser> ... ?
[18:21] <smoser> http://paste.ubuntu.com/25529138/
[18:21] <smoser> (per schema-resizefs-bootcmd)
[18:22] <blackboxsw> +1 smoser
[18:25] <blackboxsw> https://trello.com/c/1xfreXAe/380-branches-to-land-for-cloud-init-release.  rharper, any of the unchecked in there except chef omnibus I think as I'm not done yet
[18:25]  * blackboxsw is lunching 
[18:25] <rharper> k
[18:25] <smoser> blackboxsw, ok. i'm going to do that
[18:26] <blackboxsw> Ok thanks smoser
[18:26] <smoser> and also fix a vertical space in some tets
[19:10] <dustymabe> hey team - i just submitted a PR for xfs issue on cloud-init
[19:10] <dustymabe> https://code.launchpad.net/~dustymabe/cloud-init/+git/cloud-init/+merge/330701
[19:10] <dustymabe> this is my first PR, let me know if there is anything else i need to do
[19:12] <powersj> dustymabe: thanks for the PR! Do you recall if you signed the contrib agreement?
[19:12] <dustymabe> powersj: i don't remember signing anything
[19:13] <dustymabe> i signed in using ubuntuone account (which i created a few years ago to try out the ubuntu phone stuff)
[19:13] <dustymabe> so... the answer is maybe, but not recently
[19:13] <dustymabe> :)
[19:14] <dustymabe> there should be some sort of blockchain that lists any terms you ever sign
[19:14] <dustymabe> billion dollar idea, there you go world
[19:15] <dustymabe> powersj: any tips on how to move forward?
[19:15] <powersj> dustymabe: yeah sorry was looking for the link
[19:15] <powersj> Take a look at: https://www.ubuntu.com/legal/contributors
[19:17] <rharper> powersj: dustymabe: this is the boilerplate we'll put into the MP; http://paste.ubuntu.com/25529398/
[19:18] <dustymabe> rharper: ok. what is the MP?
[19:18] <rharper> sorry, Merge Proposal (what you submitted)
[19:18] <dustymabe> rharper: ahh. MP == PR
[19:18] <dustymabe> cool
[19:19] <rharper> similar to Pull Request;  we suffer from launchpad  bzr language
[19:19] <dustymabe> i'll read through the agreement and get back with you guys.
[19:19] <rharper> I'm added that;
[19:19] <rharper> in general, the fix looks good, commit msg looks sane; solid fix
[19:19] <rharper> thanks for submitting
[19:19] <dustymabe> rharper: thanks :)
[19:20] <dustymabe> i'll get back to you guys in the ticket about the agreement. i have to step away for a bit right now and i'll be back later
[19:21] <rharper> dustymabe: great, thanks
[19:34] <smoser> blackboxsw, if you're bored. . i was looking at that branch. i tried to take the duplicated FakeExtendedTempFile
[19:34] <smoser> take it out.
[19:46] <powersj> smoser: if you can get to the string merge today, I can rebase the KVM merge and get another round of testing on it. https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/330535
[19:48] <smoser> powersj, ok.
[19:49] <akik> here's an improvement suggestion to the documentation. in http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html it should be mentioned that ds=nocloud-net and seedfrom= should be separated with "\;". if you just use ";" the kernel parameter loses everything starting with ";"
[19:51] <smoser> akik, i think that proably not true
[19:51] <smoser> probably your shell is eating it
[19:56] <akik> smoser: i just tested it
[19:57] <akik> on centos 7.3
[19:58] <smoser> akik, can you show how you did that ?
[20:00] <akik> first i entered ds=nocloud-net;seedfrom=URL as the kernel parameter. ;seedfrom=URL was cut
[20:00] <smoser> "entered"
[20:00] <smoser> where
[20:00] <akik> then i entered ds=nocloud-net\;seedfrom=URL and it stayed. in grub
[20:01] <smoser> well, its probably grub that is eating it then. or if its grub-2 , possibly some of the magic make-menu stuff
[20:01] <akik> it's grub2
[20:01] <smoser> but i'm pretty sure the kernel doesnt care about a ';'
[20:02] <akik> on centos it's split there without \
[20:02] <akik> the rest goes *poof*
[20:03] <rharper> it feels worth a Note or something in case it happens to someone else; ie, you may need to escape the semi-colon if your distro uses scripts to update the grub command line ?
[20:03] <akik> rharper: no i mean for the *current* boot
[20:03] <akik> press e to edit, ctrl-x to boot
[20:03] <rharper> oh, that's grub itself
[20:04] <rharper> the note may still apply (live editing or distro config tools)
[20:04] <rharper> but as smoser said, the *kernel* doesn't care about semicolons
[20:04] <rharper> the kerenl isn't running at the time you're editing the grub command line
[20:05] <smoser> so yeah. in grub2, you're typing
[20:05] <smoser> linux /something root=foo key=val ds=nocloud-net;other stuff
[20:05] <akik> smoser: yes
[20:05] <smoser> and grub p robably prints an error quickly and goes on as it read your ; as end of a command
[20:05] <smoser> so it probably tried to execute 'other stuff'
[20:05] <smoser> and failed
[20:05] <smoser> i'd be surprised if you can't do:
[20:06] <smoser>  linux /boot/kernel 'root=.... ds=;other stuff'
[20:06] <akik> i checked /proc/cmdline after boot and it just had "ds=nocloud-net"
[20:06] <smoser> yeah. grub ate it.
[20:06] <smoser> same as if you type in a bash prompt
[20:06] <smoser> $ echo foo;other stuff
[20:06] <smoser> foo
[20:06] <smoser> other: command not found
[20:07] <akik> i'm not talking about shell. it's not the same
[20:07] <rharper> https://www.gnu.org/software/grub/manual/grub/grub.html#Shell_002dlike-scripting
[20:07] <nacc> akik: grub's shell is shell-like :)
[20:07] <rharper> actually it is
[20:07] <smoser> it is the same :)
[20:07] <smoser> grub is parsing that and tokenizing on the ;
[20:08]  * smoser has to step away for a bit
[21:16] <cliffw> Trying to use cloud-init to setup aliases to eth0 using network configuration, details are being passed using EC2 user-data but nothing seems to work. The docs state user-data cannot be used to setup networking, but also say networking can be setup using data sources. EC2 is a valid data source. Any ideas?
[21:17] <cliffw> ubuntu 16.04 by the way.
[21:21]  * blackboxsw lobs cliffw the examples at http://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v1.html wondering if you are referring to these docs which mention aliases?
[21:24] <rharper> cliffw: for network-based datasources (like EC2); the datasource has to do the work to generate a network-config based on cloud metadata;  AWS/EC2 has this info but the DataSource is just becoming network aware; blackboxsw has been working on that;  we don't currently parse all of the EC2 metadata for generating a complete nework configuration.
[21:28]  * rharper has to relocate
[21:29] <cliffw> If I need to create a /etc/cloud/cloud.cfg.d/custom-networking.cfg can I do that in #cloud-config using write_files:
[21:47] <cliffw> Just tried that, the config gets written out, but no network changes occur.
[22:02] <akik> does cloud-init touch /etc/udev/rules.d/70-persistent-net.rules? i've set it to be immutable but the log says "failed stage init" after that. not sure if they're connected
[22:04] <akik> i see that cloud-init version changed to 0.7.9 on centos
[22:14] <smoser> akik, it does touch it yes.
[22:14] <akik> smoser: how do i make it not touch it? i don't want the device names to change, ever
[22:14] <smoser> cliffw, by the time that is read, its too late. cluod-init has already made the decision and rendered thenetworking configuraiton.
[22:15] <smoser> akik, well, what cluod-init is doing is ensuring that they dont
[22:15] <smoser> but you can disable cloud-init networking and it wont do such things
[22:16] <smoser> # To disable cloud-init's network configuration capabilities, write a file
[22:16] <smoser> # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
[22:16] <smoser> # network: {config: disabled}
[22:16] <akik> so cloud-init does other stuff than what i direct it to do in user-data?
[22:17] <akik> thanks for the config
[22:18] <smoser> it has some default behaviors.  generally speaking it does the right thing for configuring networking
[22:18] <smoser> thats the goal
[22:22] <akik> smoser: if i disable cloud-init networking, is it still able to download if i use ds=nocloud-net?
[22:22] <akik> download the user-data from that datasource
[22:24] <blackboxsw> ok finally fixed up chef module unit tests and addressed review comments will await CI and then land it
[22:33] <blackboxsw> grr, smoser, so we've moved tempdir out  into cloudinit.temp_util to avoid loading a ton of util for tempfile work. Now cc_chef adds util.subp_blob_in_tempfile  which depends on temp_utils.tempdir. Where should subp_blob_in_tempfile live?
[22:33] <blackboxsw> s/grr/question/
[22:33] <blackboxsw> :)
[22:42]  * blackboxsw thinks it should remain definted in util and just locally import temp_utils.tempdir inside subp_blob_in_tempfile
[22:42] <blackboxsw> ahh n/m we already import temp_utils in util anyway
[22:43] <blackboxsw> ok /me runs away. please disregard
[23:20] <cliffw> thanks smoser
[23:25] <cliffw> Launching the EC2 instances in question from Cloudformation, so trying to have the network setup which Cloudformation handles at the EC2 level be handled also by cloud-init, so I don't have to hardcode config files or wait for a subsequent puppet run for eth0 aliases to be established.
[23:25] <cliffw> have an EC2 with 5 IP addresses associated with it, as a default eth0 booting with DHCP only finds the primary in Ubuntu.