/srv/irclogs.ubuntu.com/2016/09/19/#juju-dev.txt

alexisbdo we have documentation somehwere that walks one through how to use clock to get rid of time. (in favor of clock)?00:14
alexisbor are there good examples in the code I could follow?00:14
natefinchalexisb: instead of using stuff from time.Time, use clock.Clock, which has an interface close enough to identical to what's offered in time.Time, and use that00:16
natefincher sorry, instead of using stuff from the time package00:16
alexisbwell that is convienent, thanks natefinch00:16
natefinchalexisb: therre's a clock.WallClock value that you use in production that wraps the time package into an interface-able value00:16
menn0alexisb: a fairly simple example of some code which uses an injected Clock is the resumer (worker/resumer/)00:33
thumperhmm...00:37
thumperwhy does restoring a model give it a new uuid?00:37
thumperperhaps controller model uuid00:38
natefinchI presume because nothing ensures the old model is actually gone?00:38
thumperexcept the agents can't connect to the new model00:42
thumperbecause they all have the old model uuid00:43
natefinchahh00:43
natefinchconundrum00:43
thumperthere seems to be a break in logic somewhere00:43
natefinchindeed00:43
natefinchI have only seen backup and restore work being done from afar, I know one of the details, unfortunately00:44
thumperAs part of restore, all known instances are00:44
thumperconfigured to treat the new controller as their master.00:44
thumperform the help00:44
thumperlet's hope that they are00:44
menn0thumper: so I figured out the i/o timeout thing00:45
menn0thumper: fixing it will be non-trivial00:45
thumperoh?00:45
menn0thumper: CodeRetry is only being handled if the API call itself returns an error00:46
menn0thumper: but the error is usually turning up in an Error field00:46
thumperah00:46
thumperugh00:46
menn0thumper: and the apiclient code doesn't check there00:46
thumperyeah, that is horrible00:46
menn0thumper: I'm considering some kind of reflection magic00:47
thumperand you have the situations where something may have worked while another timed out00:47
menn0thumper: which makes that pretty terrible00:48
thumperit does00:48
menn0thumper: you only want to redo the parts of the request which failed00:48
thumperso not trivial00:48
* menn0 is annoyed this didn't occur to him before this work was done00:48
menn0thumper: perhaps the right place to handle this is inside or just above State00:50
menn0in our database layer00:51
menn0and have that retry00:51
menn0i'm going to have lunch and mull it over00:51
thumperin juju/txn package?00:51
thumperok00:51
menn0just doing it for txns isn't enough because queries can fail too00:52
menn0thumper: it'll probably have to happen in both the txn layer and the collections layer (state/collection.go)00:54
* thumper nods00:54
menn0we really need to get rid of mongo....00:54
menn0lunch!00:54
* perrito666 reads backup and restore and pops in01:22
perrito666Thumper menn0 anything I can do?01:23
thumperperrito666: you could start by telling me what it is supposed to do and not do01:40
thumperperrito666: I tried to restore into a running controller, and it just dies01:40
thumpercontroller gets stuck01:41
thumperrestore doesn't work01:41
thumperapiserver and state are down01:41
* thumper goes to walk the dog and think01:55
menn0thumper: ping?02:35
thumpermenn0: ba ck02:48
menn0thumper: 1:1? I'm stuck02:48
thumperme too02:48
anastasiamacnatefinch: m guessing u r not really here, r u?02:59
natefinchanastasiamac: night time is the right time03:00
anastasiamacnatefinch: :) re: bug 1552274, r u working on it already?03:02
mupBug #1552274: juju list-credentials inconsistencies between format output <2.0-count> <bitesize> <conjure> <juju-release-support> <rc1> <usability> <juju:In Progress by natefinch> <https://launchpad.net/bugs/1552274>03:02
natefinchanastasiamac: wow uh, nom sorry03:04
anastasiamacnatefinch: awesome, i was going to pick it up but saw ur name on it.. so r u k for me to do it? :)03:05
natefinchanastasiamac: totally03:05
anastasiamac\o/03:05
natefinchanastasiamac: that was during the london sprint. I probably started looking at it, then ran out of time, then was on vacation for 11 days, and forgot about it03:06
anastasiamacnps, i'll count this as my win ;) might need to get u to review tho :-P03:06
natefinchanastasiamac: sure thing03:07
natefinchat one time I heard someone was going to fix needing to use --config=something.yaml during bootstrap to get reusable defaults on bootstrap.  Anyone know if that ever happened?03:08
natefinchthumper, menn0 ^ ?03:11
menn0natefinch: that's been done. define a custom cloud as per https://github.com/juju/juju/wiki/Faster-LXD#suggested-juju-config-for-lxd-deployments03:13
natefinchmenn0: oh, hmm.  I wondered why we could add clouds for things like AWS.03:16
anastasiamacmenn0: axw: as tech strategy gurus, what's ur take on defining json tags outside of cli package?03:17
anastasiamacm seeing inconsistencies btw json/yaml output because yaml tags are defined but json aren;t and we are pulling juju/juju objects without transforming them at presentation layer03:18
axwanastasiamac: better not to do that, because of unintended consequences03:18
axwi.e. changing something outside CLI-related packages probably shouldn't affect presentation03:18
natefinchanastasiamac: we're supposed to be transforming them at the presentation layer into display values03:19
axwand it's surprising when it does happen03:19
anastasiamacaxw: awesome \o/ that was my take too :)03:19
axwand leads to bugs.03:19
menn0anastasiamac: what axw said :)03:23
anastasiamacaxw: menn0: \o/03:23
thumperanastasiamac: want a trivial branch to do?04:08
thumperanastasiamac: I'm in the middle of debugging restore04:08
anastasiamacthumper: mayb :) what's needed?04:08
anastasiamacthumper: m trying to figure out how to print value but not the label of the field in json :)04:09
thumpercmd/juju/status/output_tabular.go:83 const maxVersionWidth = 704:09
thumperthat number is way to small04:09
thumpere.g. "9.0.0~b3" is ellided to "9.0...."04:10
thumperjust make it something like 1204:10
thumperor 1504:10
anastasiamacthumper: sure :)04:10
anastasiamacthu`was oging to say 15 :)04:10
anastasiamacthumper: do u know how to NOT print field label but value in json? kind of like `yaml:","`04:11
thumperjson:"-"04:11
thumperI think it is also  jaml""-"04:12
thumperI think it is also jaml:"-"04:12
thumperyaml:"-"04:12
thumperperhaps "," works too, but I think the official supported way is the dash04:12
anastasiamacthumper: that prints actual "-", when ommitted completely as in "", it prints captialised property name04:13
anastasiamacanyay, i'll get back to it later, I'll increase version line chars first for :)04:13
anastasiamacu*04:13
thumperfor yaml or json04:14
thumper?04:14
thumperhttps://golang.org/pkg/encoding/json/#Marshal04:14
thumperEach exported struct field becomes a member of the object unless04:14
thumper- the field's tag is "-", or04:14
thumper- the field is empty and its tag specifies the "omitempty" option.04:14
thumperpretty sure yaml does the same04:15
anastasiamacthumper: for json: if tag is "", then property name printed; if tag is "-", then "-" printed. i've played with it for hours now ;)04:16
thumperumm... no04:16
thumpercheck that you are getting a hyphen04:16
anastasiamacfor yaml if "-", filed name is not printed (as I want) but value is printed ;)04:16
thumperand not an ndash04:17
anastasiamacanyway.. m going to come back to it later04:17
thumperwe are using this in juju04:17
thumpercmd/juju/cloud/show.go04:17
anastasiamacthumper: oh.. what's the diff btw dash and hyphen? i thought we only had problmes with underscores...04:17
thumperhyphen, ndash and mdash are all different characters04:18
thumpersearch the codebase for `json:"-"`04:18
thumpermany uses04:18
anastasiamacthumper: awesome! tyvm!04:18
anastasiamacthumper: https://github.com/juju/juju/pull/627304:27
thumperthanks04:28
thumperhmm...05:11
thumperit seems I can't use a specific identity file key for juju ssh05:11
thumpermenn0: ^ ideas?05:12
menn0thumper: no I think you can. juju ssh/scp/debughooks now get the appropriate public key for the target via the API and write that to a temp file which is then passed to ssh/scp.05:13
veebersthumper: The 'default' hosted model has (or will be?) removed right?05:13
menn0s/can/can't/05:14
menn0thumper: ^05:14
thumpermenn0: quick call?05:14
menn0thumper: sure05:14
anastasiamacthumper: certainly, "-" from cmd/juju/cloud/show gets shown as "-"05:32
anastasiamacthumper:  but thnx for the tip, i'll kee looking05:32
veebersanastasiamac would you know? ^^ (re: default model)05:37
anastasiamacveebers: i know that there is a bug for it but I do not know where it is at05:37
anastasiamacveebers: let me find a reference for ur pleasure and tracking :)05:38
veebersanastasiamac: awesome, thanks :-)05:38
anastasiamacveebers: bug 162129505:38
mupBug #1621295: Drop the 'default' model <juju:Triaged> <https://launchpad.net/bugs/1621295>05:38
thumperanastasiamac: https://play.golang.org/p/6Bdpkkk7lw05:42
thumperanastasiamac: yes it does05:42
anastasiamacveebers: in since we r trading info, do u happen to know if retry-provisioning is tested vigorously/rigorously/at all?05:42
anastasiamacthumper: it ignores the fiedl entirely ;) i want to ignore field name but print its value :)05:42
thumperwhat?05:43
anastasiamacthumper: field/property name05:44
veebersanastasiamac: no idea sorry, I can bring it up in tomorrows standup if you would like05:49
anastasiamacveebers: it's k.. just curious.. it can simmer for now ;)05:49
veebersanastasiamac: :-)05:49
=== frankban|afk is now known as frankban
perrito666Thumper a bit late but, restoring into a running controller should work, what exactly are you trying to do? About to start my day and I can most likely take over09:13
babbageclunkWhoa, early in the morning for you perrito666! Or are you travelling?09:17
perrito666I have irc on the phone so I answer from bed before getting up09:30
perrito666Currently is 6:30 anyway and am already up09:31
lazypowerwhats my excuse at 4:30?09:33
lazypoweroh right :D wizarding hour09:33
perrito666You have no life09:33
lazypowerand that09:34
dimiternmorning all10:06
babbageclunkanyone: do I need to be on the VPN, given that I'm at Bluefin?10:16
dimiternbabbageclunk: unlikely, but shouldn't hurt if you're10:17
babbageclunkdimitern: If I turn it on I can't get to irc.canonical.com10:19
dimiternbabbageclunk: btw I've only noticed last week during my maas testing the devices are cleaned up along with their containers - nice work! :)10:19
dimiternbabbageclunk: really? well, come to think of it I had issues while on the vpn and irc.c.c connection drops10:20
dimiternbabbageclunk: I usually connect to irc first and only then start openvpn10:20
babbageclunkdimitern: :)10:21
dimiternfrobware: hey, I've just landed the gomaasapi change thumper reviewed, and since your QA was OK, I'm thinking of starting to land the chain of PRs I have up - objections?10:23
dimiternfrobware: alternatively, I can push the last commit bumping deps of gomaasapi and give the whole thing a QA run today first10:25
dimitern*facepalm*10:27
* dimitern fixed thumper's suggestions, but should've pushed before merging :/10:27
frobwaredimitern: I would like to do a complete QA run today; want to sync?10:33
frobwaredimitern: my 1 broken case was fixed, but that's because I only had 1 broken setup to test. Let's create a spreadsheet with the combos we want to test and split the effort up.10:34
dimiternfrobware: let's sync10:38
frobwaredimitern: in the standup HO10:39
dimiternfrobware: omw - bluetooth issues again10:39
dimiternooh mgz :)10:55
dimiternyou're an +o now? sweet :D10:56
mgzdimitern: yo11:03
mgzjust channel spammer prevention11:03
anastasiamacnatefinch: axw: lis-credentials with json output - https://github.com/juju/juju/pull/627411:17
dimitern;)11:18
frobwaredimitern: tar -cvf ~/juju-2-0-rc1-for-brad.tar --transform='s!^!juju-2.0-rc1-for-brad/!' bin/juju*12:19
natefinchgah, we need a style guide for the CLI :/13:16
rick_h_natefinch: heh grtting there13:22
rick_h_we have most of the rules on place, polish time13:23
natefinchrick_h_:  I was working on the output for when there's no results for a list-* command and decided to check some of the other list-* commands...  I realized we don't have rules like "always/never capitalize the first word"13:24
natefinchalso there's an unfortunate inconsistency between our flag parser's error output and the rest of juju's error output.  The flag parser writes "error: <something>" and everything else writes ERROR <something> (with error in red)13:25
natefinchrick_h_: should I file bugs?13:26
mgzwell, there's a difference between the logging output13:29
mgzand the general command response13:29
mgzthat's just somewhat blurred in a few cases13:30
rick_h_natefinch: there's a bug on the different table list- output already I think13:30
rick_h_natefinch: but yea, if you see anything file bugs please13:30
=== petevg is now known as petevg_afk
rick_h_frobware: dimitern morning how goes folks?13:33
dimiternfrobware: morning!13:34
dimiternoops13:34
dimiternrick_h_: morning :) - goes well - we're waiting for a pre-merge CI run for the VLAN bug13:35
rick_h_dimitern: cool, how are we feeling about it?13:35
dimiternall seems to work fine so far, after my last change to gomaasapi13:35
dimiternrick_h_: I feel pretty good about it, no issues so far from several sources that tested it13:36
rick_h_dimitern: k, can we see about getting a build out to folks int he bug for early testing perhaps?13:37
dimitern(well, some issues do exist, but they seem to be related to broken MAAS setups, not the fix itself)13:37
dimiternrick_h_: frobware sent a build to a couple of guys13:37
rick_h_dimitern: k13:38
rick_h_dimitern: I just want to make sure we're solid on this13:38
dimiternrick_h_: sure, so far we are good AFAICS13:39
rick_h_dimitern: k, so branches are all reviewed/going in for landing?13:39
dimiternwell now.. wouldn't it be nice if MAAS CLI had a tabular output mode, like Juju? http://paste.ubuntu.com/23202865/13:39
rick_h_dimitern: heh, have to see what this UX stuff they're doing in 2.1 is13:39
dimiternrick_h_: there are several branches up, almost all changes are reviewed/approved13:40
rick_h_dimitern: k, we have to get things landed EOD so they can look at a build tomorrow13:40
rick_h_frobware: ^13:40
dimiternrick_h_: but frobware and me wanted to see how the CI run will go on that branch, which contains all the stacked changes13:40
rick_h_dimitern: k13:41
frobwaredimitern: +1 on the maas output - nice113:43
dimiternrick_h_: do you recall when/why it was decided to get rid of the tabular sections - e.g. [TITLE] and just go with headers?13:44
rick_h_dimitern: because the heading were split enough and folks aren't meant to be parsing the tabular output which they tend to do with the [apps] and such13:45
rick_h_so it was wasted space13:45
mgzthe `juju generate-config` command is totally dead, right?13:45
mgzjust updating some doc, and it still references that13:45
dimiternit might be worth to have sections for that maas-tabular experiment I'm trying out though..13:45
mgzwe just have the common public clouds usable without that now...13:46
mgzevurk, this neeeds much more rewriting...13:47
rick_h_dimitern: typical thing is to try to fit whatever you would title into the heading in a clean way13:48
rick_h_dimitern: so you have the info you need, and none of the info you don't13:48
dimiternrick_h_: good point, yeah13:48
rick_h_dimitern: e.g. a heading "interfaces" is kind of redundant whehn you see eth0, eth1, etc.13:48
rick_h_but storage maybe a STORAGE NAME heading fits better13:48
dimiternrick_h_: great suggestions, cheers!13:49
dimiternbtw the output is just a nice side-effect13:49
dimiternthe reason I'm doing this is to help automate maas setups via the API - easily change nodes networking for example13:50
rick_h_dimitern: ping for standup14:01
dimiternsorry omw14:01
rick_h_babbageclunk: https://hangouts.google.com/hangouts/_/canonical.com/ui-daily?authuser=115:01
frobwaredimitern: ping15:22
dimiternr15:33
dimiternfrobware: pong15:33
frobwaredimitern: HO? I have a failing case (lxdbr0)15:33
mupBug #1625243 opened: Simplestreams for rackspace are now live! <cloud-images:Fix Released by josvaz> <juju-core:New> <https://launchpad.net/bugs/1625243>15:51
dimiternfrobware: sorry, got distracted.. joining standup HO?15:55
frobwaredimitern: great!15:57
dimiternfrobware: omw15:59
mupBug #1625243 changed: Simplestreams for rackspace are now live! <cloud-images:Fix Released by josvaz> <juju:In Progress by sinzui> <https://launchpad.net/bugs/1625243>16:21
mupBug #1625243 opened: Simplestreams for rackspace are now live! <cloud-images:Fix Released by josvaz> <juju:In Progress by sinzui> <https://launchpad.net/bugs/1625243>16:27
mupBug #1625243 changed: Simplestreams for rackspace are now live! <cloud-images:Fix Released by josvaz> <juju:In Progress by sinzui> <https://launchpad.net/bugs/1625243>16:30
=== dames is now known as thedac
frobwaredimitern: http://pastebin.ubuntu.com/23203649/17:10
rick_h_frobware: where did the maas scripts end up?17:21
rick_h_frobware: in github did we get it moved to /juju?17:21
frobwarerick_h_: nope17:21
rick_h_frobware: k, where are they?17:21
frobwarerick_h_: github.com/frobware/kvm-maas17:22
rick_h_frobware: k, if I create a fork there then and we can move that way please?17:22
frobwarerick_h_: if you create the fork you're saying continue development in the [juju] fork?17:22
rick_h_frobware: yes I'm looking to email various teams that drive maas and try to point folks at a location for working together17:23
frobwarerick_h_: ack17:23
rick_h_frobware: so will propose we start there and let the bikeshedding begin17:23
frobware:)17:23
=== frankban is now known as frankban|afk
rick_h_frobware: dimitern you guys chat? Where are we at?17:50
frobwarerick_h_: otp with dimitern17:50
rick_h_frobware: k17:50
frobwarerick_h_: want to join? I think we should make a call RSN17:50
rick_h_frobware: sure thing, linky?17:51
frobwarerick_h_: Standup: https://hangouts.google.com/hangouts/_/canonical.com/core?authuser=017:51
frobwarerick_h_, mgz, sinzui: I just pushed another update for the vlan bug (lp-1566791-bridge-all). Do we want to wait for another CI run?18:54
rick_h_frobware: asking QA to force a run in the other channel18:56
mgzfrobware: to address issues, or just with the new change rolled in as well?18:57
frobwaremgz: bumped gomaasapi deps; we found a panic in there which has since merged in gomaaspi18:57
mgzfrobware: gotcha19:01
perrito666k all going out for a bit bbl19:46
natefinchew19:59
natefinch$ juju list-spaces19:59
natefinchcannot list spaces: spaces not supported (not supported)19:59
natefinchERROR cannot list spaces: spaces not supported (not supported)19:59
natefinchI guess maybe spaces are not supported?20:00
redir 20:12
redirruh?20:12
natefinchI think it's because I'm on lxd, which would make sense... but the error message is somewhat kinda  redundant and repetitive20:14
babbageclunkalexisb: free?20:33
alexisbbabbageclunk, for you always :)20:33
alexisbbabbageclunk, I will meet you in our standup HO20:34
alexisbhttps://hangouts.google.com/hangouts/_/canonical.com/alexis-bruemmer?20:34
alexisbhttps://hangouts.google.com/hangouts/_/canonical.com/alexis-bruemmer20:34
alexisbthumper, perrito666 you guys available for a HO?20:43
alexisbalso, good morning thumper :)20:44
thumpermorning20:44
alexisbhmm perrito666 may not be back yet20:44
anastasiamacalexisb: rick_h_: have to reboot. b there in asec- sorry21:00
perrito666Alexis still going home, I think another 30 min21:23
perrito666Alexisb^21:24
alexisbperrito666, np, just ping when you area available21:24
* perrito666 is delayed by his wife shopping list21:25
perrito666If I don't get a second car soon I am going crazy21:25
alexisbthumper, on the HO if you want to meet22:05
perrito666alexisb: thumper back22:14
alexisbperrito666, do you have skype?22:15
perrito666alexisb: sure, let me snap install 199022:15
alexisblol22:16
perrito666alexisb: logging in22:16
alexisblet us know when you are logged in perrito66622:18
perrito666alexisb: just a few mins, had to re-download the client just finishing22:19
alexisbperrito666, are you downloading from 1990??22:24
perrito666apparently, the static got me a version that requires a set of i386 libs, lemme use my phone22:24
perrito666I am in22:24
thumperwhat is your skypename?22:25
perrito666perrito66622:25
babbageclunkmenn0, thumper, perrito666: Can someone review this charm change? https://github.com/juju/charm/pull/22123:06
babbageclunkI mean charm url change23:07
menn0babbageclunk: sure, I'll take a look23:07
babbageclunkmenn0: Ta!23:07
alexisbbabbageclunk, if you are still on feel free to join the actual standup :)23:15
alexisbthumper, ping23:15
thumperbabbageclunk: good to see you23:17
babbageclunkthumper: :)23:18
perrito666anastasiamac: https://bugs.launchpad.net/juju/+bug/1625390 <-- this is by design23:41
mupBug #1625390: add  user fail after remove some user <juju:New> <https://launchpad.net/bugs/1625390>23:41
perrito666deletion of user "marks them as deleted" for "auditability" this was ian's idea iirc, perhaps redir can tell you more23:42
anastasiamacperrito666: i think we'd ned a message to say" user is in-active, re-activate user" or something like that23:45
perrito666for which we need re-activate user command23:45
redirWhen we implmented user removal we determined it was best to mark users deleted and leave them in the db. For 1) if a user has been deleted and an or wants to see who made change x, then we need to be able to resolve the user that made the change even if they are deleted. 2) If you created a new user with the same name, they would have surprise permissions and blame.23:46
rediranastasiamac: inactive is different than deleted23:46
redirdeleted it gone permanently, no recovering.23:46
anastasiamacredir: i understand. but since they r trying to add the same username, we can tell them that this user existed but is now inactive23:47
anastasiamacthis way, admin will decide whether to re-activate or to add different usernmae23:47
rediranastasiamac: IIRC we return a unique error if the user is a deleted user. And that choice was made with the intention of capturing in the add command at a future date.23:48
perrito666if you ask me it was a bad decision, one can want to delete and re-create users23:48
rediranastasiamac: there's no reactivating a deleted user23:48
redirperrito666: I think that casual users may want that, but "enterprise" users won't23:50
perrito666redir: really? sounds like re-hire is a clear use case for this23:50
redirperrito666: I've worked for a couple very large orgs more than once. And each time I get a new username.23:51
perrito666redir: I am curious what kind of username that was23:51
redirperrito666: and email name-1 name-2 name-1@example.com23:51
rediretc..23:51
perrito666lol23:51
rediryes, but if you are a large enterprise that has a lot of regulatory compliance like, say a telecom, healthcare, gov't etc... that's what they do23:52
perrito666thumper: please keep me posted on the restore issue23:52
=== alexisb is now known as alexisb-afk
thumperperrito666: ack23:53
redirperrito666: if they want to deactivate a user that is available too.23:53
redirand if the actual id was not the username also you could recreate users with the same username and still identify them uniquely, alas.23:54
rediradding a flag or command to resurrect a user is also possible if desired.23:55
redirwhatevs23:56
anastasiamacredir: ack. i'll comment on the bug. Having worked for large enterprises and govs, I agree for auditing purposes, users r never deleted and generally once de-activated are not re-activated :)23:57

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