Merge lp:~axwalk/juju-core/local-provider-testability into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2316 |
Proposed branch: | lp:~axwalk/juju-core/local-provider-testability |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
498 lines (+100/-169) 9 files modified
provider/local/config.go (+5/-11) provider/local/config_test.go (+5/-66) provider/local/environ.go (+49/-69) provider/local/environ_test.go (+5/-0) provider/local/environprovider.go (+13/-2) provider/local/environprovider_test.go (+4/-1) provider/local/export_test.go (+7/-10) provider/local/instance.go (+2/-2) provider/local/local_test.go (+10/-8) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/local-provider-testability |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+204169@code.launchpad.net |
Commit message
provider/local: always use filestorage on CLI
The local provider is modified such that all
storage interactions from the CLI go directly
to disk, and the provider code no longer starts
an httpstorage listener. To achieve this, we
no longer store bootstrap-ip in the .jenv, but
instead add it to the environment config during
bootstrap. Thus, we can use the presence of the
attribute to decide whether or not to use the
file or http storage. BootstrapStorager no longer
needs to be implemented, so EnableBootsrapS
has been eliminated from the implementation.
For old environments, bootstrap-ip will be set
in the .jenv and thus httpstorage is used;
this is fine, as long as the machine agent is
running. There's an edge case that will no longer
work, where the environment is bootstrapped but
machine-0 agent is not running. In this case,
storage is inaccessible.
There are some other drive-by fixes to tests
that improve isolation, and some redundant tests
relating to the old sudo behaviour are removed.
All tests now pass with or without a local provider
running on the machine.
Fixes lp:1271672
Description of the change
provider/local: always use filestorage on CLI
The local provider is modified such that all
storage interactions from the CLI go directly
to disk, and the provider code no longer starts
an httpstorage listener. To achieve this, we
no longer store bootstrap-ip in the .jenv, but
instead add it to the environment config during
bootstrap. Thus, we can use the presence of the
attribute to decide whether or not to use the
file or http storage. BootstrapStorager no longer
needs to be implemented, so EnableBootsrapS
has been eliminated from the implementation.
For old environments, bootstrap-ip will be set
in the .jenv and thus httpstorage is used;
this is fine, as long as the machine agent is
running. There's an edge case that will no longer
work, where the environment is bootstrapped but
machine-0 agent is not running. In this case,
storage is inaccessible.
There are some other drive-by fixes to tests
that improve isolation, and some redundant tests
relating to the old sudo behaviour are removed.
All tests now pass with or without a local provider
running on the machine.
Fixes lp:1271672
Reviewers: mp+204169_ code.launchpad. net,
Message:
Please take a look.
Description:
provider/local: always use filestorage on CLI
The local provider is modified such that all torage
storage interactions from the CLI go directly
to disk, and the provider code no longer starts
an httpstorage listener. To achieve this, we
no longer store bootstrap-ip in the .jenv, but
instead add it to the environment config during
bootstrap. Thus, we can use the presence of the
attribute to decide whether or not to use the
file or http storage. BootstrapStorager no longer
needs to be implemented, so EnableBootsrapS
has been eliminated from the implementation.
For old environments, bootstrap-ip will be set
in the .jenv and thus httpstorage is used;
this is fine, as long as the machine agent is
running. There's an edge case that will no longer
work, where the environment is bootstrapped but
machine-0 agent is not running. In this case,
storage is inaccessible.
There are some other drive-by fixes to tests
that improve isolation, and some redundant tests
relating to the old sudo behaviour are removed.
All tests now pass with or without a local provider
running on the machine.
Fixes lp:1271672
https:/ /code.launchpad .net/~axwalk/ juju-core/ local-provider- testability/ +merge/ 204169
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/49640050/
Affected files (+95, -169 lines): local/config. go local/config_ test.go local/environ. go local/environ_ test.go local/environpr ovider. go local/environpr ovider_ test.go local/export_ test.go local/instance. go local/local_ test.go
A [revision details]
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/