/srv/irclogs.ubuntu.com/2014/09/16/#cloud-init.txt

smoserhm.. 00:02
smoserfor virtual nics. the hotplug network item should trigger the cloud-init query to MD00:03
smoserand then ifup and away we go.00:03
smoserfor physical...00:03
smoseri dont know00:03
JayFphysical in our world, we'd add a vlan to a trunk, and somehow send a signal in out of band00:03
JayFthis is still in the hand-wavy portions of planning00:03
JayFhence the hand waving00:04
smoseryeah00:04
smoserwell, in physical world it could also be "ok, configure that nic now"00:04
smoser(that was previously un-configured).00:04
JayFhow does cloud-init know to check?00:04
JayFyou'd have to have something persistent or cron'd to check00:04
smoserbut yours is an interesting case for thought also. essentially "hot plug vlan".00:04
JayFbecause no event to the host, like hotplugging00:04
JayFyup00:04
smoserright. i wouldn't want to do cron. we could... but 00:04
JayFthis is explicitly "I want you to do something without you having any other indication you should do it other than me telling you"00:05
JayFwhich seems out of cloud-init scope a little00:05
smoserwe could long-poll00:05
smoseri'd not be completely opposed to that. 00:05
JayFdo you want a model, ever, where cloud-init runs forever?00:05
smoserin the past i've very much said "cloud-init is init".00:05
JayFyeah that was my impression as well00:06
smoserbut it seems less of a stretch here because i *want* to be able to handle the event driven portion00:06
JayFsmoser: btw, you should really merge the branch I pointed you at earlier. Nasty nasty bug.00:06
smoserudev hotplug -> cloud-init-query of MD -> ifup00:06
JayFsmoser: something I was hunting for a while :)00:06
smoserwhich branch ?00:06
smoseri might have missed it.00:06
smoserso what i was saying is that since i want cloud-init to have code to do the hotplug based on an event , i'm not entirely opposed to somethign in cloud-init's source code being the source of the event.00:07
smoseror you coudl have an agent that generated the event to cloud-init.00:07
JayF14:43:32 <JayF> smoser: harmw: harlowja_a*: https://code.launchpad.net/~jason-oldos/cloud-init/bug-1338614/+merge/234749 should fix 1338614. I was unable to00:08
JayF                run tests due to local enviornment problems but will run them as soon as my VM recovers :)00:08
JayFIf we run an agent, it'll be an agent smart enough to do everything00:08
smoseri thought i had fixed that 00:08
JayFLike I said, I can't get my bzr to HEAD, so it's possible you did00:08
JayFbut it's absolutely broken in the current release00:08
JayFor at least what I'm building against, which I think is current release00:09
smoserhow can you "not get your bzr to head"00:09
JayFI'm at 'revno 1009' according to my cloud-init, and that's with the two commits I wrote today00:09
JayFI want the equivalent of 'git pull' or 'git reset --hard origin/master'00:10
JayFI can't get bzr to just give me a clean working copy of HEAD00:10
smoserwell you could just : bzr branch lp:cloud-init00:12
smoseragain00:12
smoseror bzr pull --overwrite 00:12
smoserthat git reset --hard00:12
JayFthe bzr branch command didn't work00:12
smoserbzr branch lp:cloud-init00:12
smoserdid not  work ?00:12
JayFit didn't appear to do anything to my current working copy00:13
JayFbzr pull --overwrite is exactly what I wanted00:13
JayFsmoser: that bug exists in HEAD :(00:13
smoserirght. 00:14
smoserbzr branch lp:cloud-init00:14
smoseris equivalent to 00:14
smoser git clone git://foo.git00:14
smoserso in a working copy, you probably got a new cloud-init/ dir underneithy00:15
JayFaha00:15
JayFthat's exactly what it did00:15
JayFokay I understand a bit better now00:16
JayFI just like after I push something being able to get my working copy back to 'master'00:16
smoseryou dont explicitly need the kwargs portion00:17
smoserof that MP.00:17
smoserright ?00:17
JayFLocally it didn't work until I had that00:18
JayFand that was suggested by someone smarter than I (comstud)00:18
smoserhm..00:18
JayFI know that I had not-working. Apply that patch, it works. Apply that patch sans **kwargs on the function signature, and it fails00:19
smoserok. pushed.00:28
smoserthanks 00:28
smoserJayF, the idea of "add a vlan" is interesting as itself.00:31
smoseras i dont have anything that would generate such an event.00:31
smoserie, for virtio ethernet . i could see getting the nic added, and cloud-init reading the config and the config saying "make a vlan" and cloud-init configuring correctly.00:32
smoserbut the core event was the nic added.00:32
JayFyeah that's what I'm saying00:32
JayFin bare metal, no hypervisor, it takes a physical action to generate a hardware event00:32
JayFor much fancier bmcs than I have :)00:32
JayF[insert hypervisors are for the weak joke here]00:33
smoserok. so i have to think about that some more.00:33
smoserhave you ever used hackpad ?00:33
smoserhttps://hackpad.com/Cloud-init-Networking-1gtK434RgVg00:33
smoserthat seemed like a bit more mark-uppy version of etherpad. dont know how i feel00:33
smoserbut i put some headers in there.00:34
smoseri have some content too , but is all very rough00:34
smoseri just can't stand typing in anything other than vi00:34
JayFever looked at floobits?00:34
JayFtheir vim plugin is... lacking00:34
smoseri'd not seen that. 00:35
smoserno content there :)00:35
JayFyeah I can tell now, lol00:35
smoseri was trying to write how i'd want stuff to work00:35
smoserbasically, 00:36
JayFmy answer to that, more or less, is 'well' and 'reliably'00:36
smosercloud-init-local comes up, and blocks hotplug events until its done.00:36
JayFhehehe00:36
smoseronce its done, it "releases" the nic that it deemed (or found in a local datasource) to be the "metadata service link"00:36
smoserthen once that comes up00:37
smoserall the others are un-blocked00:37
smoserand they come up via getting information from the MD.00:37
JayFI was thinking more that00:37
smoserin the case of no network MD, and only provided by config-drive, the "releasing" of those blocked events would then cause read from that cached data00:37
JayFyou'd add a new stage to cloud-init00:38
smoserand they'd come up too00:38
JayFthat's possibly persistent00:38
JayFthat handles post-boot events by re-running the relevent part of the other stage00:38
JayFi.e. network json changed; call that module to regenerate network from md service00:38
smoseri'd liek to not just have "network json changed"00:39
smoserbut "nic AA:BB:CC:DD:EE:FF added"00:39
smoserrather than determining what changed.00:39
JayFsee I think there are dragons there00:39
JayFbecause by doing it that way you *are* determining what changed00:39
JayFor requiring someone outside of cloud-init to give you a specific trigger00:40
JayFif you're doing a long poll on a md service00:40
JayFyou'll be able to quickly know what changed00:40
smoserright. 00:40
smoserunles sthe long poll is given explicit updates00:40
smoserie, rather than just getting a new version of the json00:40
JayFbut the idea of trying, on the fly, to 'diff' the old and new config in some meaningful way seems scary00:40
smoserit would get the element that changed.00:40
JayFyeah but then you've introduced a second api interface00:40
JayFone for init and one for ongoing00:40
smoseryeah.00:41
JayFwhich I personally dislike00:41
smoserwell, only added the second api00:41
smoserbecause there was not an event00:41
smoserso we had to essentialy receive the event00:41
smoserbut then i guess what happens if you miss it00:41
smoserso it would be good to determine what changed.00:41
smoserand *that* is easy enough , at least its seemingly possible.00:42
smoserbut figuring out what that means in terms of 'ifdown X, ifup Y' is more complex.00:42
JayFI'd say roughly determine what changed00:42
JayFlike in categories00:42
JayFlike 'ssh keys changed, kickoff add_ssh_keys module'00:42
JayF'network changed, kickoff network module"00:42
JayFetc00:42
smoserah. i wasn't goign to go that far.00:43
JayFthen you make the ability to update part of each module00:43
smoseri was only going to take events on network config.00:43
JayFthey can either do everything over again or just generate a diff00:43
JayFwhy not go the whole way?00:43
JayFwhy not accept an event saying "you have a new cinder volume that wants to be mounted"00:43
smoserwell, some are not idempotent.00:43
JayFassuming cloud-init would know how to react to some things00:43
JayFmake modules opt in to being event-driven and wrk to make the modules idempotent00:44
JayFanything in config management (cloud init kinda is) should strive to be idempotent where possible anyway imo00:44
smoseri dont have strong feelings against what you're syaing.00:45
smoserbut i'd like to have networking first :)00:45
smoseras i think that is where we *need* a solution00:45
JayFyes, I would like to have networking too00:45
JayFI need to get those changes written and up :x00:45
smoserthe rest of it, i think ihave a fair argument in "let something else do that"00:45
JayFwell, edited and up, mostly00:45
JayFyeah, but the thing is00:45
smoserbut nothing else really plays in the automatically-configure-hot-plug-netowrking world.00:46
JayF*someone* is going to want a conduit for setting up arbitrary things via event00:46
JayFand if cloud-init doesn't do it, someone will00:46
JayFand I'm trying really hard to not be someone00:46
smoserwell, there are lots of things that do that arlready.00:46
JayFlol00:46
smoserjuju does it00:46
smoserpuppet does it00:46
smoserrackspace guest agent does it/00:47
JayFNothing does it from the perspective of a provider00:47
JayFugh, lets not bring nova-agent into this :(00:47
JayFI try to forget it exists and have success most days00:47
smoserso i kind of see the network stuff as cloud-init's job . 00:47
JayFbut like "mount me a network volume at boot" doesn't fit?00:48
smoserbut beyond that, i struggle.00:48
smoserwell at boot, that is there.00:48
JayFthen just add general support for event-driven do stuff00:48
JayFand maybe a certain JayF would end up writing the event provider for cinder00:48
smoserhow would we get an event on cinder ?00:48
JayFI'd presume we'd model drives to mount as an object in user_data+vendor_data00:49
smoseroh. duh.00:49
smosersorry00:49
smoserwell, there is a dataformat for mounts and what to do with mounts in cloud-init as it is.00:49
JayFso lets imagine rackspace, we'd just update vendor_data.json to add ['volumes']['my_fancy_volume'] = { 'place': '/data00:49
JayFyou get the idea00:49
smoserit just only fires on those in the block-device-mapping.00:49
smoserso it would be very annalogus to networking solution00:49
smoserto have it respond to the newly attached disk00:49
JayFso if you saw that piece of data change, you'd trigger an event to revaluate that data00:49
JayFexactly00:50
smoserand hit the MD for "what should i do with that"00:50
JayFeverything fits this model fairly well00:50
smoserso yeah00:50
smoserok. you sold me there on that.00:50
smoserbut i'm not sold on ssh keys yet :)00:50
JayFssh keys is my personal #1 use case00:50
JayFbecause nova (or Rackspace Cloud, IDK the difference) only lets you inject one in the nova boot command00:50
JayFso the ability to trigger more keys gettting added post-boot seems nice00:51
JayFand I know of at least one group in Rackspace that's doing something that'd fit this workflow, but in a more gross way00:51
harlowja_hmmmm, seems like a job for mr.puppet or mr.chef00:51
JayFagain though, I'm not the owner of the node00:51
JayFI'm just the service provider trying to make my customer click pretty buttons in a panel and make things happen00:51
smosermonkeyspeere00:51
smoserhttp://web.monkeysphere.info/getting-started-ssh/00:52
JayFsmoser: a google of that takes me here first http://www.cracked.com/article_14990_what-monkeysphere.html00:52
JayFsmoser: which was really perplexing, hahaha00:52
JayFsmoser: that's amazing00:52
JayFThis was a good chat, thanks :) I may be away mostly for a couple of days, but I'll be back00:54
smoseri was thinking that monkeyspehere had something to manage keys installed00:54
smoserbut i guess not00:54
smoseranyway00:54
smoserlater JayF thanks for you patch and your patience00:54
=== praneshp_ is now known as praneshp
=== harlowja_ is now known as harlowja_away
=== shardy_z is now known as shardy
m01smoser: remember my networking issue yesterday (only my first ethernet connection is setup)? I looked at the OpenStack nova sourcecode. They do have a template for the interfaces file, but it looks like it's only used for bare metal targets (e.g. PXE-booted nodes), it doesn't appear to be used in general..10:28
=== zz_gondoi is now known as gondoi
smoserm01, you appear to be correct.14:10
smoserit definitely does that in some cases.14:10
smoserits not only for bare metal.14:10
smoserharmw, https://code.launchpad.net/~smoser/cirros/buildroot-upgrade14:11
smoseri think that builds for i38614:11
smoserrunning bin/bundle now14:11
smoserhopefully that'd get us to buildroot-2014.0814:12
m01hey14:15
m01hmm14:16
m01Are you saying that nova uses the /etc/network/interfaces template in environments other than baremetal?14:27
m01(e.g. libvirt, kvm etc)14:27
m01if cloud-init requires nova to stage that template in, then I guess I need to take it up with the openstack community?14:28
smoserhow did you detemrine that it does not do that ?15:36
smoserit was not clear to me.15:36
smoserthe interface that it uses right now is silly... it declares networking configuration in /etc/network/interfaces format.15:36
smoserwhich is very limited and guest-specific15:36
smoserwe're wanting to do it in a more generic way. that is something that JayF is working on and pquerna also.15:36
smosersee https://review.openstack.org/#/c/85673/15:37
m01so I looked in the config drive, and didn't find it there (see http://pastebin.com/p3PLXjvj)15:37
m01and then I went and looked at the nova code15:38
m01https://github.com/openstack/nova/search?utf8=%E2%9C%93&q=net-dhcp&type=Code15:38
m01that's the search for net-dhcp.ubuntu.template15:39
m01which is here: https://github.com/openstack/nova/blob/master/nova/virt/baremetal/net-dhcp.ubuntu.template15:39
m01I believe that's the file you're referring to, and that you're expecting in the config drive, right?15:39
m01I only found that in the baremetal directory under virt, and I didn't spot anything equiavelent for the other "drivers", or whatever they're called15:39
m01and yes, I agree that's a silly format..15:42
JayFm01: you really shouldn't be using nova-bm at this point15:55
JayFm01: it's being deprecated in Juno in favor of Ironic15:55
m01I'm not using it15:55
m01I just noted that it's the only driver I've identified that actually stages the /etc/networks/interfaces file15:56
m01and (therefore) I don't have one in my config drive15:56
m01so my non-first network interfaces don't get IP addresses15:56
m01(and I'm confused about how this is meant to work)15:56
JayFAh, Ironic driver does too 15:57
JayFat least it does in my install of it; but it's always possible we patched it downstream15:57
m01I'm using libvirt anyway I think15:57
smoserwell, we need to fix it.16:01
smoseri'm sorry for leading you on a goose hunt. but looking at code i dotn see why it would not get rendered. 16:01
smoserdont obviously see why16:01
m01smoser: which code are you looking at?16:02
smosernova/api/metadata/base.py16:02
smoserbah. someone busted that.16:03
m01CONF.injected_network_template16:09
m01aha16:09
m01interesting16:09
m01let me see what that's set to16:09
m01nova.conf:#injected_network_template=/usr/share/nova/interfaces.template16:10
m01hmmmm16:10
smoserm01, its busted. 16:14
smoserthe metadata service (used by config drive or metadata server)16:14
smoserwill never call netutils.get_injected_network_template16:14
smoserwith a template16:14
smoseroh wait.16:14
smoserno.. yeah, so you were right. 16:15
smosersee, not sure why it doenst work16:15
m01I'll uncomment that setting 16:15
m01and try it16:15
m01hmm16:51
m01I uncommented that, restarted all nova services, and my config drive still doesn't have the file16:51
=== harlowja_away is now known as harlowja_
m01so, I guess it is busted17:12
harmwsmoser: cool17:49
harmwthough I did some work in that area already17:49
smoserwell this builds. just got the build.17:49
smoserit doesnt run particularly well.17:50
smosernoticing 2 things:17:50
harmwok17:50
smosera.) no lsblk or sfdisk17:50
smoserb.) dropbear is broken17:50
smoserdoesnt start17:50
harmwah17:50
harmwi fixed just that 2nd issue17:50
harmwand missing lsblk... sounds like some new BB knob17:50
harmwdropbear needs to be started with some other argument, iirc17:51
harmwplease look at my branch, there should hopefully be something good in it :P17:51
harlowja_http://online.mirantis.com/openstack-sv-live-feed if u guys interested17:51
harlowja_from http://openstacksv.com17:51
harmwwhats that?17:52
harlowja_a sv openstack minidaysummit kind of thing17:52
harlowja_if u interested17:52
harlowja_with livestream17:52
harmwok, so just what is sv :p17:52
harmwthe rest was obvious :p17:52
harlowja_*silicon valley17:52
harmwsuper vilain?17:52
harmwah17:52
harlowja_lol, super vilan17:52
harmw:>17:53
harlowja_:)17:54
harmwsmoser: https://code.launchpad.net/~harmw/cirros/cirros-buildroot-2014.02 17:55
harmwsmoser: new c-i tag19:29
harmwwhen! :p19:29
smoserwe're closer .19:30
smosermaybe i should just call it.19:31
harmw+119:31
smoseri was really hoping to get the network config in 19:31
harmwnah, who needs networking19:31
=== gondoi is now known as zz_gondoi
=== Guest72739 is now known as mgagne

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