/srv/irclogs.ubuntu.com/2016/10/28/#cloud-init.txt

NerdyBikerrharper thanks! I totally forgot the instance-specific cloud places07:42
aixtoolso/ anyone listening08:31
aixtoolsI am trying to clone cloud-init, but nothing seems to be 'cloning'08:31
aixtoolsmy local directory gets made, then quiet. While with github - works fine.08:32
aixtoolsI am using: git clone myrealuid@git.launchpad.net:cloud-init to clone.08:33
aixtoolsand in case noone has noticed http(s)://cloudinit.readthedocs.io no longer seems to exist.08:34
aixtoolsafk but hope to read a hint later :)08:52
aixtoolsawake anyone?10:12
aixtoolsafter forever, my git clone .... command ended with (excerpt)10:13
aixtools]Read from socket failed: Connection reset by peer10:13
aixtoolsfatal: Could not read from remote repository.10:14
aixtoolsit never asked for a password, and actually I am wondering how USERNAME is supposed to work here, if I have nothing to clone from10:16
aixtoolsgit clone YOUR_USERNAME@git.launchpad.net:cloud-init - shouldn't that just be10:16
aixtoolsgit clone git.launchpad.net:cloud-init ? trying it anyway...10:17
aixtoolsok, that fails with: Launchpad user 'michael' doesn't have a registered SSH key10:18
aixtoolsso, since I do not get that message with I prefix my launchpad userid - how can I test that my ssh key is owrking properly?10:19
NerdyBikerAnyone have an example as to how to input an ec2 instance ID into a write_file cloud-config? I can't seem to make it work at all. I know it can be found in the /var/lib/cloud/data/instance-id file, but need a way to put that value into a write_file content string.10:40
smoserNerdyBiker, i ddont really think you can. it'd be nice, but there is no template on write file content.13:23
smoserwhat you'd have to do is use boothook to execute data that read that and wrote your file.13:23
smoseraixtools, well, you can only use git+ssh if you have a launchpad user and registered keys.13:24
smoserbut you can read-only clone with git://git.launchpad.net/cloud-init13:24
smoseror http://git.launchpad.net/cloud-init (or https)13:25
aixtoolsthank you @smoser - using the git:// for the copy - er clone - as I do not expect to have write perms :)14:40
smoseraixtools, well, with git+ssh:// you can push back to launchpad for your branch.14:41
smoser(independent of having commit access to master)14:41
smosers/branch/repo/ ; s/master/cloud-init official repo/14:42
aixtoolswell, i thought that was what the next line was for... "git remote add USERID USERID@git.launchpad.net:~USERID/cloud-init14:44
aixtools-- trying to follow your documentation.14:45
aixtoolsthus - as I am only getting started - which procedure do you recommend. My goal is to a) remake the patch (or hack) someone made for AIX, and b) remade in such a way that it might be accepted for mainstream because c) do nopt want to wait for IBM to get around to it.14:47
aixtoolshowever, if d) happens (IBM finishes first AND it is in the official branch - I shall just sit back and relax :)14:48
aixtools@smoser - I am still trying to get the "feeling" for how git works - so while I do read re not able to place your "s" command, aka I am almost comfortable with the principle of a pull request.14:52
smoseraixtools, sorry. sed syntax an aixer should know that ;)14:53
aixtoolsbut not clear on what you mean. It is "whatever works" for collaboration with the intent to introduce a new platform.14:53
smoserso you can always clone from git://git.launchpad.net/cloud-init14:53
smoserthat will work, and then you can commit locally and be happy14:53
smoserbut if you want to push to a remote git repo, then you can push to:14:53
aixtoolsi know sed - used to use it years ago to automate some of my assembly code on the PDP-11.14:54
smoser  git+ssh://aixtools@git.launchpad.net/cloud-init14:54
smosershoot... sorry. you can push to14:54
aixtoolsbut it is knowing what 'branch', 'repo', etc. mean. Still grasping with those :)14:54
smoser  git+ssh://aixtools@git.launchpad.net/~aixtools/cloud-init14:55
smosera git "repo" (repository) contains multiple branches.14:55
aixtoolsnods: does the "add remote" do anything remote, or is that to set one of the 'references' (I keep forgetting the git idiom)14:56
aixtoolsi am trying to compare this to the process I have followed twice on github: a) fork on github; clone the fork made; commit to fork, and then pull-request.14:57
aixtools(with making a branch directly after cloning the fork, and pushing to the branch)14:59
aixtoolsi would guess that git+ssh://aixtools@git.launchpad.net/~aixtools/cloud-init is air atm - my actual id is currently something else though. I should probably try to 'get' aixtools.15:01
naccaixtools: a remote is just a definition of a repository (typically one you care to track)15:01
naccaixtools: you should always be able to read a defined remote (fetch) and you can sometimes write (push)15:01
naccaixtools: so often you have at least one remote, 'origin' e.g., if you use git-clone15:02
aixtoolsreading and thinking... thanks...15:03
naccaixtools: you can have multiple, though, e.g., in launchpad, you might have one for origin (git://) (which I often call upstream) for the main cloud-init repository, then you'd have one for your lp user's repository itself (git+ssh://) (which you'd be able to right to)15:03
jgrimmnacc, for context, i believe aixtools is reading this and trying to grok ->https://github.com/openstack/cloud-init/blob/master/HACKING.rst15:03
naccjgrimm: ack, that should probably be updated to the lp git tree?15:04
aixtoolse.g., the one line that should be two lines, or at least have ";" before cd cloud-init.15:05
jgrimmbah, that' s the wrong one indeed!15:05
jgrimmgoogle got me, sorry15:05
aixtoolswell, I found a pdf, labeled ...0.7.8 as the cloudinit.readthedocs.io URL seems to be gone15:05
rharperhttp://cloudinit.readthedocs.io/en/latest/15:06
jgrimmhttps://git.launchpad.net/cloud-init/tree/HACKING.rst15:06
aixtoolsit is back! yes, http://cloudinit.readthedocs.io/en/latest/topics/hacking.html15:06
jgrimmthere we go, that's better15:06
rharpergit clone YOUR_USERNAME@git.launchpad.net:cloud-init cd cloud-init15:06
aixtoolssame content as the PDF I found15:07
rharperyeah that's just mal-formated markdown15:07
aixtoolsFYI, not meaning to be fussy15:07
naccthe hacking.rst has it has newline separated15:07
aixtoolsor - I take being a noob seriously ;)15:08
aixtoolsa bit serious - git is still a bit of 'magic' to me. I have been speaking with people who have been using it for 7+ years and there are, I expect many things that seem natural and logical. For me, atm, they are just key-strokes. There is probably one or more excellent books - I just have not found them yet.15:11
aixtoolsSince we are, more or less on the same page - you know what I am reading - is now a good time to have a noob attempt something else?15:12
smosergit for sure takes time to become comfortable with.15:13
smoseryeah, that HACKING.rst is just wrong i think15:14
NerdyBiker@smoser ah okay :( getting a bit tricky now. also, that previous issue with omnibus, si that an issue for someone to take a loko at? is it trackable?15:16
aixtoolswell, I am willing to be a guinea-pig, if it helps to get it right.15:17
smoserNerdyBiker, i'm not really sure. you can file a bug against cloud-init.15:17
smoseri'd be interestedi in knowing if 16.04 works for you15:18
smoserand if it works for you with packages rather than omnibus15:18
smoseromnibus really amounts to a moving target15:18
smoserbasically wget <url> | sudo sh15:18
smoser(i realize they're managing the thing that gets executed, and that its probably more secure than that , but the point is it can change at any point and i've not ever really looked at how it works)15:19
NerdyBiker@smoser we're using centos so ubuntu isn't a useful test case unfortunately :( I'll see with packages and test that15:21
smoserNerdyBiker, i knew you were centos.  you can try packages on centos too15:22
smoseri just didn't know if that path works at all, or if omnibus is all that works there.15:22
NerdyBiker@smoser was referring to the 16.04 comment, unless that wasn't to me :D15:25
smoseryeahm, i know.15:25
smoseri dont know if use-packaging path works on centos15:26
smoserit *should* work on ubuntu15:26
smoseri have more confidence in that :)15:26
aixtoolsstill having issues, will come back when I have more time.15:53
aixtoolsthx for assistence.15:53
aixtoolsafk15:53
NerdyBiker@smoser haha okay :D finding a work around for now then will dedicate soem time to checking it out and filing an issue16:55
robjo:q18:35
robjoCould use some help sorting out an issue18:36
robjoin order to break the systemd cycle that was present in the 0.7.8 release I patched my package with the cloud-init.service file from master18:37
robjoproblem is I cannot get that phase, i.e. cloud-init to run thus there is no ssh key added to the image18:38
robjoI also tried to add it to the multi-user target instead of cloud-init target but to no avail18:39
robjoI am about out of answers and somewhat tired of banging my head against the wall18:39
robjowhen I create a volume from the failed system and then attache it to a working system, chroot to the volume and then run cloud-init init the ssh key gets added, thus I think it is a problem with getting the code executed18:42
smoserrobjo, suse ?18:43
smoseri suspect,as you do that its not getting run.18:43
robjosmoser: yes, I am still trying to get 0.7.8 to work properly :(18:43
smoserso i'd backdoor the image in some way so you can get in even if it does not run18:44
smoserand then look around at journalctl for some help18:44
robjoso what is the reason behind using DefaultDependencies=no in the unit files?18:44
smoserhttps://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/161107418:46
smoseri really do hope that 'git log systemd/' will tell you such things or at very least point you to bugs.18:46
smoserand we've had some annoying fallout also, wrt systemd-resolved18:47
robjosmoser: my cloud-init.service file already looks like this patch, with the exception that I still had a Before-dbus.socket entry18:58
smoserthat probably wasnt causing issue, robjo19:02
smoserunless you were using dns in the cloud-init.service and you're running systemd-resolvd. but anway.19:02
smoserwhat i'd do is make sure you can get intot he image either via ssh or local log in and then collect journalctl and hope to find some help there.19:02
smoseri suspect something is getting dropped or fails19:03
robjowell the messages file has Cloud-init v. 0.7.8 running 'init-local'19:06
robjoStarting Cloud-config19:06
robjocloud-init[7479]: Cloud-init v. 0.7.8 running 'modules:config'19:07
robjocloud-init[7492]: Cloud-init v. 0.7.8 running 'modules:final'19:07
robjoand also:19:07
robjocloud-init[7492]: ci-info: no authorized ssh keys fingerprints found for user root.19:07
robjothis last one is a bit curious19:08
smoserhmm.19:19
smoseryou dont get cloud-init to run19:19
smoserbecause networkign isnt coming up19:19
smoseri think or is failing.19:19
robjoYes, that's the conclusion I came to, and looking at the service file again it has: Before=network-online.target19:22
smoserright.19:22
smoserthat is by design.19:22
smoserthat is a target that other things would wait on19:22
smoserand cloud-init wants to run after networking is up, but before that19:22
robjobut according to https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ that is the target the means the newtork is up and running, thus we can reach out and get the ssh key19:23
smoserso that other things waiting on networking will have cloud-init.service run before them.19:23
smoserwhat brings up your networking on suse ?19:23
robjowell the network is up after ifup, but it's not useful until wicked does it's magic19:24
smoserok..19:24
smoserso how do we know that wicked is finished doing its magic19:24
smoserAfter=wicked-did-magic.service19:25
robjobut that should be equivalent to After=network-onlie19:25
robjoclearly I am not understanding one of the concepts here :(19:26
smosersure. thats true.19:26
smoserwhat we *want* is:19:26
smoser a.) something brings networking fully up19:26
smoser b.) cloud-init.service runs19:27
smoser c.) network-online.target is reached19:27
smoserthat way, cloud-init gets a bottleneck point as early in boot as it can19:27
smoserif cloud-init.service ran 'After=network-online.target' then anything else that ran at that point would be racing with cloud-init.19:28
smoserand if the user had provided some user-data to modify behavior of those things, then they'd be racey19:28
robjoOK, so I'll try Before: network-online.service and After: wicked.service19:30
robjowicked.service is in network-online.target.wants19:31
robjoso that should give us what we are after, fingers crossed19:31
smoseryou'd think that wicked.service should be Required by network-onlknie.target19:32
smoserother wise, network-online.target would possibly fire when there was no network on line19:32
robjowicked.service runs Before=network-online.target network.target19:34
robjoso I think the order is going to turn out to be correct19:34
robjoand here we alsways thought sysvinit ordering was hell19:35
smoserrobjo, i have a soft spot in my heart for sysvinit.19:36
robjoI was never a big fan simply because I am not a fan of shell scripts, but it did have its positives19:39
robjowe the exception of course that we on the distribution end made a mess of it and all had little tweaks that were slightly diferent and annoying to deal with19:40
robjosystemd at least resolved that issue19:40
robjowith the exception that in ubuntu it appears to be networking.service instead of network.service :(19:40
robjonow lets see what this next round of builds produces.....19:41
smoserthey're different.20:00
smosernetworking.service is like your wiked20:00
smoserwicked20:00
smoserits what brings up the networking.20:00
robjoOK, so I need to sed -i s/networking/wicked/ and not sed -i s/networking/network/20:10
robjoalright I'll fiddle with the patch again..... my changelog is getting really ugly20:11
robjosomeone will love me for it one day ;)20:11

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