agent: set state password with serving info #8065

Merged
merged 1 commit into from Nov 14, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Nov 14, 2017

Description of change

When an agent config has state serving info,
ensure it also has a state password set by
copying it from the API details.

Also, don't accept state addresses, as they're
not used. We'll keep them in the on-disk
format for reading in in case the stateport
attribute is missing, in which case there
is code to deduce from the state addresses.

The deployer facade's StateAddresses method
has been removed. This was done without
bumping the facade or retaining backwards
compatibility, since no version from 2.0 on
ever used that method.

QA steps

  1. juju bootstrap localhost
  2. lxc launch ubuntu:xenial x1
  3. lxc launch ubuntu:xenial x2
  4. juju switch controller
  5. juju add-machine ssh:x1.lxd
  6. juju add-machine ssh:x2.lxd
  7. juju enable-ha --to 1,2
  8. juju debug-log
    (check that there are no panics; additional controllers won't come online as they do not initialise the replicaset)

Documentation changes

None

Bug reference

Partially fixes https://bugs.launchpad.net/juju/+bug/1642618

agent: set state password with serving info
When an agent config has state serving info,
ensure it also has a state password set by
copying it from the API details.

Also, don't accept state addresses, as they're
not used. We'll keep them in the on-disk
format for reading in in case the stateport
attribute is missing, in which case there
is code to deduce from the state addresses.

The deployer facade's StateAddresses method
has been removed. This was done without
bumping the facade or retaining backwards
compatibility, since no version from 2.0 on
ever used that method.

Part fixes https://bugs.launchpad.net/juju/+bug/1642618

I think this is ok - don't fully get the subtle agent config intricacies. Good to remove code.
We can remove common.StateAddresser entirely. IIANM, the only other place it is embedded is in the agent provisioner facade, but it's not used, just in tests.

Member

axw commented Nov 14, 2017

We can remove common.StateAddresser entirely. IIANM, the only other place it is embedded is in the agent provisioner facade, but it's not used, just in tests.

Not yet, it's still used in the controller/authentication package. I should be able to remove it in the refactoring branch, after merging this in.

Member

axw commented Nov 14, 2017

$$merge$$

Contributor

jujubot commented Nov 14, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 59fbc24 into juju:develop Nov 14, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment