/srv/irclogs.ubuntu.com/2015/10/22/#cloud-init.txt

=== cpaelzer_ is now known as cpaelzer
=== Odd_Blok1 is now known as Odd_Bloke
=== natorious_ is now known as natorious
=== jroll|dupe is now known as jroll
=== cbolt- is now known as cbolt
=== mgagne_ is now known as mgagne
akostadinovHello, I'm hitting an issue with systemd vs cloud-init. cloud-init runs as a systemd service. So when trying to start/stop services like docker from inside cloud-init scripts, the operation hangs in a deadlock. i.e. script waits for command to finish but command never finish as systemctl waiting for cloud-init to complete. The --no-block option is not helping as I don't only want to start a service but also interact with it and configure i18:57
stanguturiHI I made some changes to cloudinit package, deployed the debian file. How to restart the cloudinit service to see if my changes are reflected. I can do a simple reboot and check out. But wanted to know of a simple solution instead of a full reboot19:10
smoserakostadinov, hm.. can you give an example of exactly what you're doing ?19:31
smoserstanguturi, depending on waht you changed...19:31
smoserrm -Rf /var/lib/cloud/ /var/log/cloud-init*19:32
smoserthen19:32
smosercloud-init init --local19:32
smosercloud-init init19:32
smosercloud-init modules --mode=config19:32
smosercloud-init modules --mode=final19:32
smoseror, if you just changed a config module19:33
smosereasiest thing to do is:19:33
akostadinovsmoser: yes - starting docker service and pulling some images. It looks like docker-storage-setup service is required by the docker service and the docker storage-setup service should run after cloud-init finish. That's the deadlock issue. Read the man page and now trying to workaround this with systemctl --ignore-dependencies19:33
smoser cloud-init init single --name=<name> --frequency=always19:34
smoserwhere 'name' is the name like 'cc_timezone'19:34
akostadinovsmoser: it makes sense for services to run after cloud-init so that machine setup is done. But there's better mechanism to run scripts at different stages of boot process. So that one can execute proper initialization at proper times19:35
stanguturi@smoser: I changed some code in DataSourceOVF.py file. I want to restart the cloudinit service and see if my changes are loaded.19:36
smoserstanguturi, yeah, follow that above ^19:37
smoserinit --lcoal and then init19:38
smoserwill run your ds19:38
smoserakostadinov, how are you doing that ?19:38
smoservia '#!' user-data or cloud-config install packages ? ..19:39
akostadinovsmoser:19:39
akostadinovruncmd:19:39
akostadinov...19:39
akostadinov- [ systemctl, enable, docker.service ]19:39
akostadinov- [ systemctl, start, docker-storage-setup.service, --ignore-dependencies ]19:39
akostadinov- [ systemctl, start, docker.service, --ignore-dependencies ]19:39
akostadinov...19:39
smoserah. k. so you installed it i suppose ?19:39
akostadinovsmoser: yep, installed with packages:...19:40
smoserit should start on its own. shouldnt it ?19:40
akostadinovsmoser: don't know, but it won't start before cloud-init finish either case19:40
akostadinovbecause docker-storage-setup should run after cloud-init final19:41
smoseroh. i see.19:42
smosermaybe drop a sytemd file that should start after docker.service19:43
smoserdrop it in before installation (as a boothook perhaps)19:43
smoserand then it should start when it can on its own19:43
akostadinovsmoser: how do I register a boothook?20:02
smoserbootcmd: []20:02
smoserjust like runcmd20:02
smoseris the easiest way20:03
smosernote, though, that boothooks run every boot20:03
smoserrather than once per instance20:03
corb00Hi I'm having a problem adding a yum repository to a CentOS #cloud-config , I am using yum_repos: … seeing "the requested URL returned error: 404.."… it works manually though20:04
corb00baseurl: http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm20:05
akostadinovsmoser: you mean to do something like:20:06
akostadinovecho '...' > /etc/systemd/system/my.service20:06
akostadinovsystemctl ...20:06
akostadinovcorrect?20:06
corb00am I missing any entries? I have specified PHP_epel:20:07
corb00baseurl:, enabled: true, name: some name, gpgcheck: false20:07
corb00never tried this before so excuse my ignorance..20:08
smoserakostadinov, well, yeah. except i was saying you dont have to call systemctl20:08
smoseras if you've written the job correctly20:08
smoserit will start when docker.service is running20:09
smoserthat make sense ?20:09
smoserharlowja_, ^ can you help out corb00 ? not sure myself.20:09
harlowja_hmmm20:10
akostadinovsmoser: yes, that's my next bet if --ignore-dependencies fails. I guess I'd need `systemctl enable my.service` though.. or maybe it will be picket up automatically, never tried. I guess I'll just try20:10
harlowja_let's see here20:10
akostadinovthank you for suggestions20:10
smoserakostadinov, it should just pick it up automaticall20:10
harlowja_corb00 can u pastebin the yaml u are using, or gist20:11
corb00sure- give me a sec20:11
corb001here you go harlowia (had to switch machine) — http://pastebin.com/fftj7ayn20:15
harlowja_soooo20:18
harlowja_think i see it20:18
harlowja_http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm isn't the repo url, but is itself a repo file20:18
corb001ahhh - bloody beginner here, ok…20:21
harlowja_u want to use the url that is in that rpm20:21
corb001ok so just leave out the last bit..20:22
harlowja_what that url is? :-P20:22
harlowja_http://paste.openstack.org/show/477195/20:23
corb001wait I got you - ok… have to check whats in it :-)20:23
harlowja_pick 'http://download.fedoraproject.org/pub/epel/6/$basearch'20:23
harlowja_i think its ^20:23
harlowja_or 'https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch'20:23
harlowja_not really sure, ha20:23
harlowja_one of those :-P20:23
corb001cool- let me try that… thanks harlowja!!20:23

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