/srv/irclogs.ubuntu.com/2017/08/23/#juju-dev.txt

axwanastasiamac: if we can avoid it, I'd rather not change the API to be bulk, but instead, have a transaction API. Begin, <make a series of updates>, End00:13
anastasiamacaxw: why not? with current indiivudal update, u r taking  lock every single time... if u have 100s models to update, u'll b getting this lock 100s times... feels yuck00:30
anastasiamacaxw: there is no problems having an UpdateModel and UpdateModels00:31
axwanastasiamac: any additional code is not free, so I reject the statement that there are "no problems". what I meant by a transactional API is one that takes a lock at the beginning of the transaction, and releases it at the end, and only does a single write at the end01:05
axwanastasiamac: that will be useful for doing things other than just writing a bunch of models at once. e.g. writing controller, account, and model details all at once01:06
anastasiamacaxw: u misread what i said... right now jujuclient api has 2 official/our implementations: file and mem. mem is used for testing. file is the real deal/production we ship. file one takes a lock in implementation (i.e. once u r in a call to UpdateModel)...01:07
anastasiamacaxw: right now, RefreshModels call store to UpdateModel per each model and each of these calls takes a lock.01:08
axwanastasiamac: I understand all that, so not following how I've misread...01:08
anastasiamacaxw: if u r updating a collection, u have n muber of models and n of locks01:08
anastasiamacaxw: store API should support updating bulk01:08
anastasiamacaxw: don;t get thr resisitance... how did we add accounts, cookie jar, etc to jujuclient api...01:09
axwanastasiamac: yep, at the moment. again: I'm proposing we introduce a pair of methods, Begin & End (say), which will make the locking happen in the Begin and End calls rather than each UpdateModel call01:09
axwanastasiamac: maybe this is better on a HO, I don't think I'm getting my point across very well here01:10
anastasiamacaxw: sure, but this are internal to jujuclint implementation. why expose Begin and End, especially i interface?01:10
anastasiamacaxw: k. m ahppty to HO... gimme 10mins to put a face on :D01:11
axwanastasiamac: because it would be useful for reasons other than updating a bunch of models at once...01:11
anastasiamacaxw: sure, but would b irrelevant to other implementation of client.. like mem...01:11
anastasiamaclet's talk ina 10-15.. i'll ping01:11
axwanastasiamac: not really. they can use an (in-memory) lock too. they're just for testing atm though. talk soon...01:12
babbageclunkaxw: ping?03:00
axwbabbageclunk: pong!03:02
babbageclunkaxw: Hi! Can you explain the maas agent name thing to me?03:03
babbageclunkaxw: What's it updating it from/to?03:03
axwbabbageclunk: sure. do you know what agent_name is?03:04
axwI mean, conceptually, not the value03:04
babbageclunkaxw: nope03:04
axwbabbageclunk: ok. when you acquire a node from MAAS, you can specify a string (agent_name value) to associate with that node. you can then use that for filtering node queries later on03:05
axwbabbageclunk: we use it to identify nodes for a model03:05
axwbabbageclunk: in 1.25, we used to generate a new UUID for the agent_name. in juju 2.x, we just use the model UUID03:05
babbageclunkaxw: So is it destructive? After the update could the old environment still run?03:06
babbageclunkaxw: Thanks though, that makes sense.03:06
axwbabbageclunk: the old environment won't find those nodes any more, unless you were to change it back again03:07
babbageclunkaxw: I guess in 1.25 the uuid is stored somewhere in config - could we update it there so it still matched up?03:07
axwrollback for that can't really be automated, because you need to get onto the region controller03:07
axwbabbageclunk: yes it is, and yes we could03:07
thumperoh ffs03:08
babbageclunkaxw: Ok - I'll do that, if you can point me to the right place?03:08
thumperI'm looking at merging 2.2 into devel03:08
* babbageclunk ducks03:08
thumperthere are so many conflicts03:08
thumperI thought that wallyworld fixed those03:09
axwbabbageclunk: wait... the command already does that :)03:09
babbageclunkthumper: I think they're probably caused by the rearranging of API facades?03:09
axwbabbageclunk: at the end, it calls UpdateEnvironConfig with the new maas_agent03:09
babbageclunkaxw: ha ha, that was clever of you!03:09
thumperbabbageclunk: some of it03:10
babbageclunkthumper: Might be simpler if we make the same change in 2.2 branch.03:10
wallyworldeach time you merge into develop now you'll get conflicts03:10
* thumper enfixorates03:10
thumperwallyworld: really? that blows03:10
thumpercan't it figure this shit out?03:10
babbageclunkaxw: Ok cool, so it sounds like this isn't really a destructive thing.03:11
wallyworldnot that i've seen03:11
axwbabbageclunk: yeah sorry, I forgot I did that bit03:11
axwbabbageclunk: if you were to revert to an older version of state, it would be busted03:11
axwin that case you'd need to update maas_agent in the MAAS pg database03:11
wallyworldthumper: the issue from what i recall is the big facade moves, it gets confused with those if you make facade changes03:12
babbageclunkaxw: You mean an older version in the juju1 tree?03:12
babbageclunkthumper: That's why I think it might be easier if we do the same rearranging in the 2.2 branch.03:13
axwbabbageclunk: no I mean, if you took a mongo backup before running the update-maas-agentname command, and reverted to that03:13
babbageclunkAh, right.03:13
babbageclunkthumper: (although I'm not sure how much work the rearranging was - at least a lot of import fixing, maybe more than that.)03:14
thumperI have a feeling that some of these methods that 2.2 is trying to add to the client backend interface have moved03:15
* thumper sighs03:17
* thumper takes a stab03:17
thumperoh ffs03:47
thumperaxw: do you have a few minutes?03:58
thumperperhaps jump in tech board early?03:58
axwthumper: sure, brt03:58
thumperlooking at 2.2 merge into develop03:58
babbageclunkthumper: hey do you have a moment?04:15
=== tinwood_ is now known as tinwood
=== salmankhan1 is now known as salmankhan
=== frankban is now known as frankban|afk
=== mjs0 is now known as menn0

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