Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1042)

Issue 9710044: environs/cloudinit: write machine config earlier

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by rog
Modified:
10 years, 11 months ago
Reviewers:
mue, dimitern, mp+165559
Visibility:
Public.

Description

environs/cloudinit: write machine config earlier TLDR: this makes it easier to implement the API connection logic. For security reasons we get the agent to change its password from the one that's passed in cloudinit. Currently that's done when connecting to the mongo state. The plan is to make that be done when connecting to the API, which should work fine *apart* from when we're starting the bootstrap node, which does not have an API to connect to. Rather than duplicating the password changing logic for state and API connections (and suffering races between the two things both trying to change the password, or from the API connection changing the password while a state connection is already active), we can alter bootstrap-state so it changes the machine config on the bootstrap node so that its machine agent won't *need* to change the password. To do that, bootstrap-state needs access to the machine agent configuration file, which is what this merge proposal implements. https://code.launchpad.net/~rogpeppe/juju-core/308-jujud-bootstrap-state-change-password/+merge/165559 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs/cloudinit: write machine config earlier #

Patch Set 3 : environs/cloudinit: write machine config earlier #

Patch Set 4 : environs/cloudinit: write machine config earlier #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -41 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 7 chunks +47 lines, -31 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 4 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
10 years, 11 months ago (2013-05-24 09:47:06 UTC) #1
dimitern
LGTM
10 years, 11 months ago (2013-05-24 09:52:40 UTC) #2
mue
LGTM
10 years, 11 months ago (2013-05-24 10:10:47 UTC) #3
rog
10 years, 11 months ago (2013-05-24 11:17:57 UTC) #4
*** Submitted:

environs/cloudinit: write machine config earlier

TLDR: this makes it easier to implement the API connection
logic.

For security reasons we get the agent to change its password from the
one that's passed in cloudinit. Currently that's done when connecting
to the mongo state.

The plan is to make that be done when connecting to the API, which
should work fine *apart* from when we're starting the bootstrap node,
which does not have an API to connect to.

Rather than duplicating the password changing logic for state and API
connections (and suffering races between the two things both trying to
change the password, or from the API connection changing the password
while a state connection is already active), we can alter bootstrap-state
so it changes the machine config on the bootstrap node so that its
machine agent won't *need* to change the password.

To do that, bootstrap-state needs access to the machine agent
configuration file, which is what this merge proposal implements.

R=dimitern, TheWorkingMue
CC=
https://codereview.appspot.com/9710044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b