New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 1604965: machine stays in pending state even though node has been marked failed deployment in MAAS #6321
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,14 @@ func (c *fakeController) ReleaseMachines(args gomaasapi.ReleaseMachinesArgs) err | |
return c.NextErr() | ||
} | ||
|
||
type fakeMachineOnlyController struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete? unused now |
||
machines []gomaasapi.Machine | ||
} | ||
|
||
func (f *fakeMachineOnlyController) Machines(gomaasapi.MachinesArgs) ([]gomaasapi.Machine, error) { | ||
return f.machines, nil | ||
} | ||
|
||
type fakeBootResource struct { | ||
gomaasapi.BootResource | ||
name string | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,10 @@ func (mi *maas2Instance) Addresses() ([]network.Address, error) { | |
// Status returns a juju status based on the maas instance returned | ||
// status message. | ||
func (mi *maas2Instance) Status() instance.InstanceStatus { | ||
// TODO (babbageclunk): this should rerequest to get live status. | ||
// A fresh status is not obtained here because the interface it is intended | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you. |
||
// to satisfy gets a new maas2Instance before each call, using a fresh status | ||
// would cause us to mask errors since this interface does not contemplate | ||
// returing them. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. returning |
||
statusName := mi.machine.StatusName() | ||
statusMsg := mi.machine.StatusMessage() | ||
return convertInstanceStatus(statusName, statusMsg, mi.Id()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,6 +271,7 @@ func pollInstanceInfo(context machineContext, m machine) (instInfo instanceInfo, | |
return instanceInfo{}, err | ||
} | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. d |
||
} | ||
if m.Life() != params.Dead { | ||
providerAddresses, err := m.ProviderAddresses() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete?