/srv/irclogs.ubuntu.com/2013/06/30/#juju-dev.txt

thumpermorning21:12
thumperhi fwereade__21:41
thumperfwereade__: seeing you do reviews...21:41
fwereade__thumper, heyhey22:27
thumperfwereade__: I cc'ed you on a container email22:28
thumperI'm approaching a higher level of concern...22:28
thumperhowever22:28
thumperI did find this:22:28
thumperhttp://lxc.sourceforge.net/index.php/about/kernel-namespaces/network/configuration/22:28
thumpermethod 1 seems to closely match what we want22:28
thumperbut I don't entirely understand it22:28
thumperI seem to be missing some  understanding in it22:29
thumperI seem to be lacking the key bit where the veth0 on host A is connected to container 122:29
thumperalso there seems to be overlap in the vethN numbering in the host22:30
thumperso I want to find someone who knows more22:30
fwereade__thumper, yeah, I'm no wiser really -- was it serge who told us about namespaces in the first place?22:33
thumperfwereade__: I think so22:33
thumperit seems like it shouldn't be too hard22:33
thumperjust finding the right incantations22:33
fwereade__thumper, that's my best guess there then -- yeah, indeed22:33
thumperI'm putting on my review hat right now22:33
thumperreviewing some of your pending work and ians22:34
fwereade__thumper, re getting ip addresses assigned... mm, yeah22:34
thumperparticularly around the container constraint22:34
thumperwe need a way to ask for public/private ip addresses22:34
thumpernot sure how to handle container addressability without at least private22:34
fwereade__thumper, yeah, indeed22:34
fwereade__thumper, ec2 first sounds eminently sensible to me22:35
thumperotherwise it seems the only way is to do port forwarding and fake it, which I loath as an idea22:35
thumperI'd rather just say "sorry containers aren't supported on this provider because they suck"22:35
thumpers/they suck/we can't get ip addresses dynamically/22:36
thumperfwereade__: on the plus side, it appears the default lxc bridge will work fine for the local provider with no mods22:36
fwereade__thumper, yeah, I don't think there's likely to be much mileage in faking it up22:37
* thumper nods22:38
thumperI really don't want to put effort into a solution that doesn't take us towards a successful outcome22:38
fwereade__thumper, more and more work for less and less gain22:38
thumperI agree22:38
fwereade__thumper, vg news re lxc though22:38
thumperfor the local provider?22:39
fwereade__yeah22:39
thumperyeah22:39
thumperI'm going to go back to that after the reviews22:39
fwereade__cool22:39
thumperI had an intersting thought though...22:39
fwereade__thumper, oh yes?22:39
thumperwe can have the containers auto restart when you reboot22:39
thumperI suppose we need the same type of startup file that the machine agents have22:39
thumperfor the local machine as part of bootstrap?22:40
thumperand clean it up with destroy-environment22:40
thumperI'm not going to do it initially22:40
fwereade__that's another one for serge I think -- some versions of lxc have autostart22:40
thumperbut will make a card for it22:40
thumperfwereade__: reading the precise docs22:40
thumperit seems that they do22:40
thumperand it is easy22:40
fwereade__sweet22:40
thumperjust symlink the config into /etc/lxc/autostart or something simiilar22:40
fwereade__yeah, I just wasn't sure it was there or easy on precise22:41
thumperbut might be nice in the future for local provider to stay alive with a reboot22:41
fwereade__thumper, tbh I think it's an important feature anyway for whatever containers22:41
thumperI did notice though that the golxc impl uses lxc-stop and not lxc-shutdown22:42
thumpershutdown is nice, stop is flicking the power switch22:42
fwereade__thumper, we can't really expect that our cloud instances will never reboot22:42
* thumper nods22:42
thumpereasy to do by default I think22:42
thumperI have a card on the kanban board already for it22:42
fwereade__thumper, stop/shutdown is interesting... not sure when we'd stop one whose state we cared about22:43
fwereade__but regardless22:43
thumperit seems that we always go stop/destroy22:43
thumperso we don't need to be nice22:43
thumperbut it does have me wondering what lxc does on system shutdown22:43
thumperI'm going to trust the lxc devs here22:44
fwereade__this is interesting but I'm flying horribly early tomorrow and hoping to be back at work by lunchtime, so I have to sleep now22:44
thumperand guess they do a shutdown by default and kill if takes too long22:44
thumper:-)22:44
thumperok22:44
thumperciao22:44
fwereade__enjoy your day, regards to wallyworld and davecheney; see you soon :)22:44
wallyworldsee ya22:44
thumperffs22:53
thumper    c.Assert(provider, Equals, &local.Provider)22:53
thumper... obtained *local.environProvider = &local.environProvider{}22:53
thumper... expected *local.environProvider = &local.environProvider{}22:53
thumperwallyworld: that is me trying to test the actual provider for you22:53
thumperwallyworld: interestingly DeepEquals works find22:54
thumperfine22:54
wallyworldthumper: because they are pointers22:54
thumperso22:54
wallyworldthe actual mem addresses are different22:54
wallyworldbut contents are the same22:54
thumperno they aren't22:54
thumperas in, they are the same object22:54
* wallyworld was just guessing22:54
wallyworldin the past, i've seen that22:54
thumperwhat I was referring to was the obtained/expected results above22:55
thumperlike, oh, you gave me X when I expected Y22:55
thumperbut here X and Y are the same22:55
wallyworlddeep equals says contents are the same22:55
wallyworldbut are you sure mem addresses are the same22:55
thumperwallyworld: deepequals also checks for the same type22:56
thumperwallyworld: well, one is an interface, the other is a struct22:56
wallyworldsure, type is the same22:56
thumperso I'm thinking deep equals should be ok...22:56
wallyworldyes22:56
thumperor perhaps I should create an interface for the struct22:56
* thumper tests that22:56
wallyworldi'd stick with deep equals perhaps22:56
* wallyworld goes away for 10 minutes to buy tickets to the First Test in Novemer22:57
thumpernope22:57
* thumper nods22:57
thumperdeepequals it is22:57
wallyworldthumper:  i have a failing test in lxcProvisionerSuite. i've tracked it down to expectStopped() being called and checking that the container is still provisioned. but advancing a machine's lifecycle to dead causes it to be removed and the instance metadata is removed also. i'm not sure why the test was written the way it was23:16
thumperwallyworld: hmm... what changes have you made locally?23:17
thumperwhat object is expectStopped on?23:17
wallyworldthis is the branch which introduces the instance metadata doc23:18
wallyworldexpect stopped is on lxcProvisionerSuite23:18
wallyworldlooking at a container23:18
wallyworldi'm not sure how the test would have passed the first time23:18
wallyworldi need to dig into it a bit23:19
thumperwhich file?23:19
wallyworldlxc-broker_test.go23:19
wallyworldmaking a machine dead and expecting it to still have a valid instance id doesn't make sense to me?23:19
thumperah...23:20
thumperhere I was calling instance id from the object as it was just returning a cached local value23:20
thumperso it was ok23:20
thumpernow you have turned this into a function doing work right?23:21
wallyworldyes, but i check the local cached value first23:21
thumperok, so just change the expectStopped to take a machineId instead of state.Machine23:21
thumperand get the isntance id out before stopping23:21
thumpermake sense?23:22
wallyworldbut why would we want to have a instance id != "" after making a machine dead?23:22
thumperwhat we are testing is that the right container was stopped23:22
thumperthe container uses the container name as the isntance id23:22
thumperwe are only testing we stopped the right one23:22
thumpernot that there is something in state23:23
wallyworldby checking instance id?23:23
thumperwe don't care about state here23:23
thumperstate happened to conveniently cache the id we care about23:23
thumperhow about...23:24
wallyworldhmmm. seems like a fragile way to do it23:24
thumperhave expect started to return the event.id as a container name as a string23:24
thumperthen pass that into the expect stopped23:24
thumpermake more sense?23:24
wallyworldi'll look into it. a mechanism that doesn't rely on instance id being valid after life->dead is what we want23:25
thumperwallyworld: right, what I just said fits that23:25
wallyworldsure, just repeating it back23:25
* wallyworld is pleasantly surprised the test suite seems to run so much quicker as of late23:34
thumperhmm...23:52
thumperI suppose I should start writing my juju talk at some stage23:52

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