worker/reboot: use correct DataDir #5695

Merged
merged 1 commit into from Jun 23, 2016

Conversation

Projects
None yet
3 participants
Contributor

fwereade commented Jun 22, 2016

The reboot manifold was always using cmdutil.DataDir, instead of one
derived from agent config; fixes lp:1588186, lp:1594665.

Also dropped untested and unnecessary is-this-a-machine checks in reboot
worker; added package_test.go

worker/reboot/package_test.go
+package reboot_test
+
+import (
+ stdtesting "testing"
@kat-co

kat-co Jun 22, 2016

Contributor

I don't think this needs to be renamed.

@fwereade

fwereade Jun 23, 2016

Contributor

ack

- if !ok {
- return nil, errors.Errorf("Expected names.MachineTag, got %T: %v", agentConfig.Tag(), agentConfig.Tag())
- }
+func NewReboot(st reboot.State, machineLock *fslock.Lock) (worker.Worker, error) {
@kat-co

kat-co Jun 22, 2016

Contributor

Should we take the opportunity here to remove the usage of fslock and move to @howbazaar 's Mutex? I haven't followed it too closely, but I think the basic semantics should be the same.

@fwereade

fwereade Jun 23, 2016

Contributor

pretty sure it's not in this branch yet, otherwise it wouldn't have been there to begin with.

Contributor

kat-co commented Jun 22, 2016

I love seeing red :) Just a few minor comments.

👍

worker/reboot: use correct DataDir
The reboot manifold was always using cmdutil.DataDir, instead of one
derived from agent config; fixes lp:1588186, lp:1594665.

Also dropped untested and unnecessary is-this-a-machine checks in reboot
worker; added package_test.go
Contributor

fwereade commented Jun 23, 2016

$$merge$$

Contributor

jujubot commented Jun 23, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 1807ebc into juju:model-migration Jun 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment