/srv/irclogs.ubuntu.com/2013/05/18/#juju-gui.txt

fwereade_BradCrittenden, do you know offhand whether the GUI makes use of the magical NumUnits conversion in ServiceDeploy?10:07
fwereade_BradCrittenden, ie, if you request 0 units, you get 110:07
fwereade_BradCrittenden, because I'm pretty sure this is crack, and I'm about to kill it10:07
BradCrittendenfwereade_: and a happy saturday morning to you!  :)10:09
=== BradCrittenden is now known as bac
bacfwereade_: no, the GUI will always make a reasonable request10:09
fwereade_bac, awesome, tyvm10:09
bacfwereade_: so you will return an error if 0 requested?10:10
fwereade_bac, I *think* it's legitimate, if odd -- there's nothing inconsistent about state if we honour that requst10:11
fwereade_bac, apart from anything else, you always get 0 units if you deploy a subordinate service10:11
fwereade_bac, I could maybe be convinced to error on 0, but it feels like extra code for little benefit10:12
fwereade_bac, medium-term I don't think that ServiceDeploy is sane anyway10:13
fwereade_bac, "deploy" is a ui nicety only10:13
fwereade_bac, it's at last 3 conceptually distinct operations10:14
fwereade_bac, add-charm, add-service, add-units10:14
fwereade_bac, (and add-units is questionable anyway as you know)10:14
bacfwereade_: the case for subordinates was not considered for requesting 0 units.10:16
fwereade_bac, I can't remember offhand if we error or if we ignore that in Conn10:16
bacthe requirement we were working with was that a deployed service had to have >= 1 unit.10:17
fwereade_bac, I'm pretty sure we barf in cmd/juju if -n > 010:17
bacso setting the number of units for a running service had that restriction too as that would effectively remove the service.10:18
fwereade_bac, my mental model is that a service can legitimately exist without units; I accept that's not a user-centric perspective but I think it's the job of the CLI/GUI layers to enforce that10:20
fwereade_bac, does that sound reasonable?10:21
fwereade_bac, (whereas the api and state layers should be concerned with internal consistency, and make every attempt to satisfy client requests that don't break that)10:23
fwereade_bac, (there's some tedium in that the outer layers may also want some sort of consistency checks if only to save on pointless roundtrips, but that's just a performance optimization)10:24
fwereade_bac, if you're around, how about magical inference of service name from charm name in ServiceDeploy? I'll be making a missing service name an error, I think13:00

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