Code review comment for ~ltrager/maas:lp1870171

Revision history for this message
Lee Trager (ltrager) wrote :

Spoke with Rick on IRC and it seems like this should be okay.

<ltrager> when Juju lists allocated machines in MAAS does it expect that list to contain all the allocated assoicated with that user's OAUTH token or just that user?
<rick_h> ltrager: you mean when you juju status?
<rick_h> ltrager: and since the oauth token is per user I'm not sure the difference?
<ltrager> rick_h: A user can have multiple OAUTH keys in MAAS. On the API only, MAAS assoicated an allocated machine with the OAUTH token being used. When listing allocated machines the API only lists machines allocated with that key.
<rick_h> ltrager: right, so that oauth token is how Juju communicates with MAAS and so won't see anything that the API key can't see
<ltrager> rick_h: this is the only place in MAAS that associates the API OAUTH key with a Node and we'd like to remove that association as its causing a bug
<ltrager> rick_h: right now if you have two OAUTH keys for a user and OAUTH1 allocates a node OAUTH2 won't see it even if they are the same user
<ltrager> rick_h: that seems like a bug which I'm trying to fix but it was brought up Juju might be expecting that behavior
<rick_h> ltrager: hmmm, so in juju land if you wanted to update tokens I'd expect you to be able to juju upgrade-credential on the contrller, supply the new token, and as long as the new token has access to the same hardware it'd be ok?
<ltrager> rick_h: currently that isn't the case
<rick_h> ltrager: on which end? MAAS or Juju?
<ltrager> rick_h: the bug I'm trying to fix is that if you allocate a node with an OAUTH key and delete it it also deletes any node assoicated with it
<ltrager> rick_h: MAAS
<rick_h> ltrager: ok, I don't believe we're relying on that in any way as we don't manage the oauth keys in Juju. We just use them to make calls to MAAS.
<ltrager> rick_h: ok thanks!

« Back to merge proposal