/srv/irclogs.ubuntu.com/2018/03/14/#cloud-init.txt

bemisI asked a few days back but didn't get any response; trying again - are there any centos/rhel/oel/sl users in here?04:33
setnerHi everyone. I am trying to understand the differences between ansible and cloud-init. Why do people tend to use cloud-init in conjunction with ansible? Why not just ansible or just cloud-init? Can ansible and cloud-init perform the same actions?11:58
setnerCan anyone help me with this question: what can cloud-init do that ansible (for example) can't do?13:39
smoserybaumy: if you could open a bug with details of what is not working we can take a look.13:43
smosersetner, cloud-init is often times the first thing that is used, and its in the image already.  It helps bootstrapping.  it will set up a user and import ssh keys that may then be used by ansible.13:44
setnersmoser: ok, it helps on the bootstrap process. But isn't that also achievable with ansible?13:46
Odd_Blokebemis: There are people around; if you have a specific question, it's probably best to ask it so they can respond when they are around.13:48
smosersetner: i dont know how you would do that with ansible13:57
smosertake a stock image and get your ssh keys into it13:57
bemisOdd_Bloke: :) fair enough, thanks14:41
bemisspecifically i'm looking for help getting 18.1 packaged for rhel6/rhel714:44
bemisand hoping that perhaps others have walked this path before me and can guide me around the jagged edges14:44
ch007mDoes one of you know how we can disable biosdevname when we use cloud-init / user-data config file ?15:02
smoserblackboxsw: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/34134915:35
smosercould you take a quick look at that ? simple-ish removal of duplicate code.15:35
smoserbemis: we have daily builds of trunk in copr15:36
smoser at https://copr.fedorainfracloud.org/coprs/g/cloud-init/cloud-init-dev/15:36
smoserch007m: biosdevname kind of happens too late.15:37
smoseryou can build your imgaes with changes to disable it.15:37
ch007mSo we can't define bootloader as we can do with kickstart then - https://goo.gl/PUjERh ?15:40
ch007mAs `packages:` will install yum packages the first time the vm will start, how can we know that all the packages defined are installed ?15:46
smoserch007m: they'll be installed when cloud-init finishes.  you can look at /run/cloud-init/result.json to see the result.16:03
smoseris that what you're asking ?16:03
smoseryou can't change the bootloader in an image for the first boot, cloud-init runs after that.16:03
ybaumysmoser: its not a but .. it wont work the way it was working years ago anymore since those features you were using dont exist in the commands anymore. things changed16:30
ybaumys/but/bug16:31
smoserybaumy: i need more information. I'm really not sure what you're talking about. Please file a bug and explain clearly what you were expecting to work and what is not working.16:34
ybaumysmoser: doesnt really matter what the current status is. its not what we need. psyrabbit is going to try to implement a new datasource provider for vcloud16:35
ybaumythis is what we should focus on16:35
smoserblackboxsw: so on your snap branch16:36
blackboxswyes all ears16:38
blackboxswjust got through your jsonschema branch. landing it now16:38
blackboxswpost a tox run16:38
bemissmoser: whoa, thanks!16:41
smoserblackboxsw: i just hit 'submit' there.16:42
ybaumysmoser: we hope .. we can get a little support from you guys when he is implementing the datasource for vcloud. we think we found a way to handle data transfers16:43
blackboxswsmoser: checking16:43
blackboxswhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/341349 merged16:47
bemissmoser: did the project drop EL6 support at some point between 0.75 and now?16:48
dpb1ybaumy: support time will be limited over the next couple weeks16:51
dpb1ybaumy: we have a release we are pushing for end of month16:51
dpb1ybaumy: but we will do what we can16:51
ybaumydpb1: ok this is not a "no" for an answer and thats what we need16:52
dpb1ybaumy: ok16:52
dpb1bemis: it likely still works, are you seeing something broken?16:52
bemisdpb1: i wasn't finding el6 builds in the copr link pasted - i've since found them and am doing some testing now16:53
dpb1ah ok16:53
dpb1bemis: it's not something we stay on top of that much, but would be an interesting data point16:53
dpb1(tip on el6)16:53
bemiswhat led to the join initially was the conditional logic around systemd was removed at some point and the service file required components that aren't in el716:53
bemisso i thought maybe the el landscape was an afterthought16:53
ybaumydpb1: we have no timeline set on the project so its no problem if help is 1 day apart16:54
dpb1bemis: not an afterthought, but I'm not of how widely used it is at this point in the lifecycle of 6. :)16:55
dpb1so there are likely gaps16:55
bemisdpb1: that's fair - i'll make sure to update here as my project progresses then :)16:55
bemisthank you16:55
* dpb1 nods16:55
blackboxswsmoser: thanks for the snap config review comments. I'm inclined to add the error exception message as you suggested instead of just listing the failed command.  I'm also hesitant to move the instance-data.json tests into base because we run them on every test case, increasing the cost of each of our tests by another ssh roundtrip to pull down that file & validate the same content17:17
dojordan@blackboxsw, sorry to bother but can you take a look at my MP? https://code.launchpad.net/~dojordan/cloud-init/+git/cloud-init/+merge/34054617:18
blackboxswdojordan: hiya, sorry about my silence earlier, I was on vacation monday/tuesday17:18
dojordanah no worries!17:19
blackboxswI'm digging out of my backlog and hopefully can get to that branch soon. It'll be reviewed this week for sure17:19
blackboxswI had one exception path I wanted to test dojordan, connection not present versus, path not present on existing service(404)17:20
blackboxswwe thought maybe there was a better way to handle things since you are dropping the timeout17:20
blackboxswdojordan: like maybe using readurl instead of wait for url17:20
blackboxswbut I wanted to test that before giving you the suggestion17:21
blackboxswmight as well say that now so you could glance at that as a potential solution17:21
dojordansure, thats a good idea17:21
blackboxswyeah it just seemed clunky that we were using wait_for_url there (which calls readurl and actually has the content of the url but ignores it only to return the endpoint's URI). So your branch would effectively be calling readurl twice on success path, once in wait_for_url to see that the service is up and once to actually recapture the content17:23
blackboxswthat wait made sense when the timeout was larger, but not so much anymore :/. Ok thanks for glancing at the potential17:24
dojordanright- we were actually discussing this recently. the other option is make wait for url return both success and optionally content but read_url seems cleaner17:24
dojordanif the connection is not present we would re-DHCP anyway as it would still bubble up to a url error17:25
blackboxswyeah I thought about the same too (augmenting wair_for_url), but it looked like we were just using the wrong tool for the job.  wait_for_url was really only meant to iterate through a list of potential metadata URLs to return the first one that responds. smoser and I had talked about the potential of dropping the wait_for_url function at some point in the future since there are only a couple of callsites that17:27
blackboxswcould be consolidated into a simpler helper. so something that uses readurl directly would make things simpler if we drop wait_for_url.17:27
dojordancool, ill make the change17:27
blackboxswgood deal thanks dojordan17:27
ch007mwhen I log on the first time to the vm, some packages are still installed as the yum process is locked -> https://www.dropbox.com/s/dh0zewvgpy0o80y/Screenshot%202018-03-14%2018.31.24.png?dl=017:31
ch007mIs there a command that I could pass or use to know what are the packages currently downloaded for installation in order to know the status of the progressions ?17:32
smoserch007m: probalby some 'ps' or look at /var/log/cloud-init-output.log17:33
ch007mthis line is recorded -> "2018-03-14 17:30:54,672 - util.py[DEBUG]: Running command ['yum', '-t', '-y', 'install', 'git', 'docker', 'openssl', 'net-tools', 'NetworkManager'] with allowed return codes [0] (shell=False, capture=False)". When that will happen, I suppose then that all the packages will be installed then ?17:36
smoserwhen it finishes yes. its possible that it is locked/blocked for some reason17:37
ch007mWhen is cloud-init executed exactly during vm bootstrapping ?17:41
smoserch007m: fairly late.17:45
smoser cloud-init-final.service17:46
smoserwhich is After=multi-user.target17:46
ch007m+1. Thanks.17:48
ch007mI suppose that OOTB, it is packaged within this image (CentOS-7-x86_64-GenericCloud-1802.qcow2c) ?17:48
ch007mMy centos qcow2 includes this version `cloud-init 0.7.9` which isn't the latest. Have you discussed with Centos team to do a an upgrade ?17:57
dpb1ch007m: no, not really18:00
dpb1ch007m: you'd need to get in touch with one of the rhel disto guys to see what their plans were18:01
ch007mok18:02
smoserblackboxsw: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/34141718:49
okiegood morning everyone18:54
okieactually afternoon18:54
okiei got a question if anyone can assist. I am running a centos 7 aws image and having a problem with cloud-init it looks like. I have consistant network device naming turned off but cloud init is not respecting that. I can advise it is cloud init as there are ifcfg-ens* entries with a comment in each of them advising this was automatically generated by cloud-init18:56
okiehow do i get cloud init to respect that i have disabled consistent network device naming.18:57
smoserokie: cloud-init doesnt really do anything with that. what is the problem you're trying to solve ?18:59
smoserthen also, blackboxsw https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/34142019:00
blackboxswheh, smoser I'm circling the unit test drain on https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/33972019:01
okieso right now device names are using predictable network device naming or otherwise known as consistent network device naming... So instead of eth0 i have ens{insert number}. I want to go back to the "traditional" way which is eth0. I have followed the redhat docs on how to do this but ens entries are being generated by cloud-init19:01
okiegrep ^ /etc/sysconfig/network-scripts/ifcfg-*19:03
okie#/etc/sysconfig/network-scripts/ifcfg-ens3:# Created by cloud-init on instance boot automatically, do not edit.19:03
okie#/etc/sysconfig/network-scripts/ifcfg-ens5:# Created by cloud-init on instance boot automatically, do not edit.19:03
smoserokie: you may possibly need to clean up a bit.19:04
smoseryour image.. if its not pristin.19:04
okieits a base centos7 image from aws market place19:04
smoserin most cases, c loud-init reads the devices rthat it sees asa they are. and then configures networking, and ensures that the names it writes are right.19:05
smosercan you post a /var/log/cloud-init.log ?19:06
okieya19:06
smoserhttps://hastebin.com/19:07
smoseris wonderful (before you went to pastebin.com)19:07
okiehttps://hastebin.com/onekedolod.sql19:11
okiefile was too big to save in hastebin so you got part of the cloud init log19:12
smoseroh. really ? it said too big ?19:14
okieyuppers19:14
smoserwell then, feel free to paste the whole thing somewehere else19:14
smoserpaste.ubuntu.com is good19:14
okieway to go ubuntu pastebin.. that works19:16
okiehttps://paste.ubuntu.com/p/YbT9RWQ8zm/19:16
smoseryeah, but in ubuntu pastebin you have to log in to get raw19:16
smoserokie: when cloud-init ran it saw devices named 'ens3'19:18
smoserso i thii if you were expecting to get 'eth0' device, then you must have done something wrong.19:18
okiewhere is it looking sysconfig/network-scripts/ or where?19:19
okiethat it is determining this.. as the base centos7 image is disabling the udev rule to use consistent network device names..19:20
okiei dont get where cloud-init is pulling ens3 from?19:20
smoserokie: it looks in /sys for the names.19:26
smoserand then writes config making sure that they stay with those names.19:26
okiethanks19:26
dojordan@blackboxsw, pushed the changes: https://code.launchpad.net/~dojordan/cloud-init/+git/cloud-init/+merge/34054619:32
blackboxswsmoser: pushed the unit test coverage for set-hostname-early branch https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/339720. I'm done now with that and hitting your reviews19:56
blackboxswthx dojordan\19:59
okie@smoser thanks for the help... It was helped me in the right direction20:05
smosergreat!20:06
blackboxswsmoser: minor nit on your doc branch https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/341420 and approved21:11
blackboxswsmoser: I think 46cb6716c27d4496ce3d2bea7684803f522f277d broke util.subp22:23
blackboxswit treats args as a list always, which isn't true, so any pure string passed to subp will fall apart22:23
blackboxswas it gets treated as an iterable character by character22:24
dojordan(sorry to but in) but that's what broke get_hostname on azure22:27
blackboxswdojordan: yeah, I recall your comment on how that branch shouldn't have passed CI.  yeah, just hit it on my branch too (where I provide strings to subp instead of lists too). I figured your fix was still safe/good practice etc.22:28
dojordanOne possibility is to add an assertion on the type being passed into util.subp?22:29
blackboxswdojordan: yes, you are correct. I just looked through that subp encoding changeset in more detail to see what the intent was (instead of blazing past it).  And sure enough22:29
dojordanAlso, this is me just rambling, but at some point type hints could help prevent things like this...22:30
blackboxswtrue, I think thanks probably a nice feature, to catch other potential programming errors on what gets passed into subp. though subp should support both string and list22:30
dojordantrue, it could just construct a 1 element tuple if need be22:30
blackboxswrambling welcome. and preaching to the choir ;)    Yes I want generally to have strict schema validation on all user-provided content from cloudinit's config modules which would both document expected types and explicitly warn/error on invalid types.22:31
dojordan*dojordan swoons*22:32
blackboxswit's a long road on that front, but handling that on common utility functions like subp is a good start to prevent misuse of core functions/methods22:32
blackboxsw"cloud-init devel schema --doc"22:32
blackboxswonly currently about 7 examples of schema types22:32
blackboxswor locally in your repo directory: python3 -m cloudinit.cmd.main devel schema --doc22:33
dojordannice, its a good start22:33
blackboxswgotta start somewhere :)22:33
* blackboxsw heads out for a bit. checking in later22:46

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