/srv/irclogs.ubuntu.com/2017/04/12/#cloud-init.txt

=== shardy is now known as shardy_mtg
=== sambetts|afk is now known as sambetts
=== shardy_mtg is now known as shardy
=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
=== rangerpbzzzz is now known as rangerpb
cornfeedhobohellloooo14:52
cornfeedhoboi am using AWS + centos 7. could someone tell me why this snippet, pretty much stolen straight from the docs, is not executing? https://gist.github.com/cornfeedhobo/35d60eca0a09ec4bbfb94a957d7520ff14:52
smosercornfeedhobo, could you paste /var/log/cloud-init.log and /var/log/cloud-init-output.log if there is anythign interesting there.14:54
utlemmingcornfeedhobo: for CentOS? likely a dependency problem. I don't think CentOS includes growpart and sfdisk by default (I reserve the right to be wrong here...)14:56
cornfeedhobosmoser: coming up14:57
cornfeedhoboutlemming: interesting point14:57
cornfeedhobo(i'll double check that too)14:57
cornfeedhobosmoser: gist updated15:00
utlemmingcornfeedhobo: how about a dump of 'journalctl' too?15:00
smoserwell thats pretty useless15:01
utlemmingcentos is a bit dense when it comes to logging on disk for Cloud-init, sadly15:01
smosernormally cloud-init.log shoudl have debug level output, which is quite noisy15:01
utlemmingyou'd think so...but on CentOS/RH/Fedora, there is a packaging issue where the logs are supposed to be owned by 'adm' (as in Debian/Ubuntu) but the user is not created15:02
utlemmingthe result is cloud-init.log is there, but empty15:02
cornfeedhobooh yeah, journalctl output is really verbose. updated again.15:04
cornfeedhoboi'm going through it all now, hadn't thought to check journal.15:06
utlemmingcornfeedhobo: how about /etc/cloud/cloud.cfg? and /etc/cloud/cloud.cfg.d/*15:06
utlemminglooks like its not configured to setup the disks15:06
cornfeedhoboyeah, i can paste those, but fwiw, this is just the stock AMI for centos7 ... oh interesting. incoming.15:06
cornfeedhobookay. updated. .d/* only has a logging cfg, but pasted15:10
utlemmingcornfeedhobo: yup, that's the problem...the default config doesn't setup disks15:11
smosercornfeedhobo, you should be able to run (and i'd be interested in the output of)15:13
cornfeedhoboah, i saw growpart and mounts and assumed15:13
smosersudo cloud-init single --debug --name=disk_setup --frequency=always15:13
smoserer... maybe --debug before single15:13
cornfeedhobookay, let me make sure that module is on disk15:13
utlemmingcornfeedhobo: I just confirmed that the default config doesn't include that15:14
smoserit'll be there. just disable.d15:14
utlemmingI would argue that this should be a bug in CentOS15:14
cornfeedhobohmmm, i cant find the modules folder on disk15:15
cornfeedhobosorry, i'm super new to cloud init15:16
cornfeedhoborepoquery to the rescue, maybe15:16
cornfeedhobookay. testing.15:17
cornfeedhobohttps://gist.github.com/cornfeedhobo/64bcf6e2b760af27ddf16889b984968615:18
cornfeedhoboit doesn't seem to be loading it, but i see the python module in site-packages15:19
smosercornfeedhobo, look in /var/log/cloud-init.log see if you see15:22
smoser  Running module disk_setup15:22
cornfeedhobookay. one sec. question first: is there a way to specify, in my aws userdata, that i want to add fs15:25
cornfeedhobofs_setup module to cloud_config_modules  **15:25
cornfeedhobofrom what i can tell, if i add a cloud_config_modules section, it overrides the one in cloud.cfg15:26
utlemmingcornfeedhobo: my $0.02 ZWD....copy /etc/cloud/cloud.cfg to /etc/cloud/cloud.cfg.d/99-me.cfg and add "- disk-setup" to the modules section15:28
cornfeedhobohmm, but that means i would have to create a custom AMI with that copied file in place, or kick off cloud-init again, after aws has executed it?15:31
utlemmingcornfeedhobo: there are other ways to convince cloud-init....15:38
cornfeedhobowell, question: does cloud-init re-process the yaml files between init, config, and final?15:40
smosercornfeedhobo, yes.15:42
smoserso you can feed that list in as user-data15:42
smoserbut it really should have run when you ran it with single there.15:42
cornfeedhobohmmm15:43
smoseri might have to resort to littering /usr/lib/python3/dist-packages/cloudinit/config/cc_disk_setup.py with LOG.info or LOG.warn messages15:45
cornfeedhobomaybe AWS invokes with more flags? something that pulls from http://169.254.169.254/latest/user-data ?15:47
cornfeedhobono, i dont see anythnig special in the service files15:51
cornfeedhoboi'm going to retry with utlemming's $0.02, utilizing bootcmd15:51
cornfeedhobomuhahahahaha, it worked15:59
cornfeedhobosed 's@cloud_config_modules:@cloud_config_modules:\n - disk-setup@' -i /etc/cloud/cloud.cfg15:59
cornfeedhobois fs_setup wrapped up in disk-setup?16:00
smosercornfeedhobo, the module name is 'disk_setup' (or disk-setup). that handles both top level config entries 'disk_setup' and 'fs_setup'16:08
cornfeedhobothat is what i thought, especially after looking at the modules in site-packages. hmmm, i must just have an error in the fs_setup i just tried. i'm going to look around some logs16:09
cornfeedhoboah, interesting. "Unable to convert swap to a device"16:19
smoserpowersj, https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/32099416:28
powersjsmoser: sup16:29
smosercan you tell me why i dont want to just pull that ? and why is the bug referenced there (1669306) ?16:29
powersj1) I need to update source and remove source-branch those are pointing at my branch (that was me testing it and forgetting to change it back16:30
smoseryeah. just saw that and pushed a coment16:30
powersj2) the LP is a refrence to "command: usr/bin/python3 $SNAP/bin/cloud-init" which is not the normal line16:30
powersjit should have been as simple as command: cloud-init16:30
powersjbut there are some python3 issues with classic confined snaps documented in that LP I refrence16:31
powersjreference*16:31
powersjsmoser: oh and do you want the source to be the master git url or to be '.'16:32
powersjpointing at master i.e. https://git.launchpad.net/cloud-init made sense, but wanted to confirm16:33
smoserpowersj, id ont know what do you think ?16:33
smoserwhat is the "right snap" way to do it.16:34
smoseri had this general question once looking at snaps16:34
powersjsmoser: well if we use '.' we don't checkout cloud-init yet again, however if you use '.' you can try snapping local changes. As far as convention, I didn't feel there was overarching best practice from what I saw.16:35
powersjI do like using the git master URL though as it prevents you from doing something silly like making a local change and then having that make it somewhere16:35
smoserwell, you can pick one. and we can figure out why it was wrong later ;)16:37
powersjhahaha16:38
powersjsmoser: updated with the URL16:40
cornfeedhobookay, got that sorted out. thanks for the help smoser & utlemming!!16:44
smoserpowersj, https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/322137 how can i see the pylint warings ?17:17
powersjsmoser: edit the .pylint rc17:18
smoseri jsut removed it.17:18
smoserand i dont see anyting17:19
powersjthat works too ;) but you may get even more messages17:19
smosersure. but i dont see ones, like if i run 'pylint tools/mock-meta' i see a buch of errors, but nothing about the log.warning17:21
smoseroh. now id o17:21
powersjdid you change something?17:23
smoserjust wasnt looking right17:24
=== sambetts is now known as sambetts|afk
devicenullhey, we've started to run into issues with this change https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039697.html18:11
devicenullbasically, we used to use cloud-init, and dropped it ~4-6 months ago18:11
devicenullhowever, a bunch of our customers had created OS images back when we used it18:11
devicenulland now they're starting to run into error messages when they boot up from those images18:11
devicenulland I don't really see any way for us to address that, given that the images already exist18:11
devicenullbackporting that to 16.04 seems like an issue18:11
devicenullI'm guessing we'll probably resort to pretending to be ec2 if this ends up becoming a bigger issue18:14
naccif you stopped using cloud-init 4-6 months ago, how woudl a change in cloud-init from 2 months ago be affecting your images?18:15
naccdevicenull: --^18:15
devicenullcustomers still have images with cloud-init built in18:15
rharperI think they're old images which still have cloud-init inside them18:15
devicenulland that's getting updated (automatically?), which then triggers the message on next boot18:15
devicenullcorrect18:15
rharpersure, a dist-upgrade would update the cloud-init in them18:16
naccah i thought they weren't able to boot the image18:16
naccso i wasn't sure how cloud-init was updating18:16
rharperwell, they're getting the warning18:16
rharperit's bootable in xenial18:16
naccrharper: oh i see18:16
nacci read 'error message' as fatal18:17
devicenullyea, we've only had a couple reports of it so far, so I'm not sure how big of a problem it's going to turn into18:17
rharperthe error message should include the cloud-config that the user can emit in to the image to disable the warning and the check18:17
rharperit can also be a boot parameter18:17
devicenullyea, it throws this https://gist.githubusercontent.com/devicenull/63f96ecf5a84c0c9163c09002726d204/raw/b4d0f508382fe4de9a33e5eaf19e7ac92fed8e23/gistfile1.txt18:18
devicenullwhich then they end up reporting to us18:18
rharperack18:18
devicenullwe've just been telling them to remove cloud-init, but I thought I'd bring this up here18:21
rharperthanks for reporting;   if possible filing a bug for the issue with the details requested w.r.t the provide; that might help users find that it's been reported18:22
devicenullyea, we'll probably add some documentation on it too18:23
rharperwe could also in there point back to you're recommendation that best fits the cloud;  alternatively we could explore whether you could expose an identifier (ideall through SMBIOS settings )18:23
devicenullI'm not sure you really want to be adding code detecting us, when we really don't use cloud-init anymore?18:26
rharperpossibly not; I suppose it may depend on the customer images18:29
=== nacc is now known as Guest42667
=== nacc_ is now known as nacc

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