=== 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 | ||
akostadinov | Hello, 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 i | 18:57 |
---|---|---|
stanguturi | HI 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 reboot | 19:10 |
smoser | akostadinov, hm.. can you give an example of exactly what you're doing ? | 19:31 |
smoser | stanguturi, depending on waht you changed... | 19:31 |
smoser | rm -Rf /var/lib/cloud/ /var/log/cloud-init* | 19:32 |
smoser | then | 19:32 |
smoser | cloud-init init --local | 19:32 |
smoser | cloud-init init | 19:32 |
smoser | cloud-init modules --mode=config | 19:32 |
smoser | cloud-init modules --mode=final | 19:32 |
smoser | or, if you just changed a config module | 19:33 |
smoser | easiest thing to do is: | 19:33 |
akostadinov | smoser: 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-dependencies | 19:33 |
smoser | cloud-init init single --name=<name> --frequency=always | 19:34 |
smoser | where 'name' is the name like 'cc_timezone' | 19:34 |
akostadinov | smoser: 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 times | 19: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 |
smoser | stanguturi, yeah, follow that above ^ | 19:37 |
smoser | init --lcoal and then init | 19:38 |
smoser | will run your ds | 19:38 |
smoser | akostadinov, how are you doing that ? | 19:38 |
smoser | via '#!' user-data or cloud-config install packages ? .. | 19:39 |
akostadinov | smoser: | 19:39 |
akostadinov | runcmd: | 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 |
smoser | ah. k. so you installed it i suppose ? | 19:39 |
akostadinov | smoser: yep, installed with packages:... | 19:40 |
smoser | it should start on its own. shouldnt it ? | 19:40 |
akostadinov | smoser: don't know, but it won't start before cloud-init finish either case | 19:40 |
akostadinov | because docker-storage-setup should run after cloud-init final | 19:41 |
smoser | oh. i see. | 19:42 |
smoser | maybe drop a sytemd file that should start after docker.service | 19:43 |
smoser | drop it in before installation (as a boothook perhaps) | 19:43 |
smoser | and then it should start when it can on its own | 19:43 |
akostadinov | smoser: how do I register a boothook? | 20:02 |
smoser | bootcmd: [] | 20:02 |
smoser | just like runcmd | 20:02 |
smoser | is the easiest way | 20:03 |
smoser | note, though, that boothooks run every boot | 20:03 |
smoser | rather than once per instance | 20:03 |
corb00 | Hi 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 though | 20:04 |
corb00 | baseurl: http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | 20:05 |
akostadinov | smoser: you mean to do something like: | 20:06 |
akostadinov | echo '...' > /etc/systemd/system/my.service | 20:06 |
akostadinov | systemctl ... | 20:06 |
akostadinov | correct? | 20:06 |
corb00 | am I missing any entries? I have specified PHP_epel: | 20:07 |
corb00 | baseurl:, enabled: true, name: some name, gpgcheck: false | 20:07 |
corb00 | never tried this before so excuse my ignorance.. | 20:08 |
smoser | akostadinov, well, yeah. except i was saying you dont have to call systemctl | 20:08 |
smoser | as if you've written the job correctly | 20:08 |
smoser | it will start when docker.service is running | 20:09 |
smoser | that make sense ? | 20:09 |
smoser | harlowja_, ^ can you help out corb00 ? not sure myself. | 20:09 |
harlowja_ | hmmm | 20:10 |
akostadinov | smoser: 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 try | 20:10 |
harlowja_ | let's see here | 20:10 |
akostadinov | thank you for suggestions | 20:10 |
smoser | akostadinov, it should just pick it up automaticall | 20:10 |
harlowja_ | corb00 can u pastebin the yaml u are using, or gist | 20:11 |
corb00 | sure- give me a sec | 20:11 |
corb001 | here you go harlowia (had to switch machine) — http://pastebin.com/fftj7ayn | 20:15 |
harlowja_ | soooo | 20:18 |
harlowja_ | think i see it | 20: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 file | 20:18 |
corb001 | ahhh - bloody beginner here, ok… | 20:21 |
harlowja_ | u want to use the url that is in that rpm | 20:21 |
corb001 | ok so just leave out the last bit.. | 20:22 |
harlowja_ | what that url is? :-P | 20:22 |
harlowja_ | http://paste.openstack.org/show/477195/ | 20:23 |
corb001 | wait 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, ha | 20:23 |
harlowja_ | one of those :-P | 20:23 |
corb001 | cool- let me try that… thanks harlowja!! | 20:23 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!