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