Skip to content
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

Add caas operator presence, and status fixes #8357

Merged
merged 1 commit into from Feb 9, 2018

Conversation

wallyworld
Copy link
Member

Description of change

A few small CAAS changes:

  1. We add presence for the operator agent (copy/paste from machine/unit agents)
  2. Fix ModelStatus() so that it can handle CAAS models (don't attempt get storage)
  3. Tweak status updates so we don't spam status with unnecessary data
  4. Adjust juju status output to show both agent and workload status again

QA steps

Run up a CAAS model, deploy gitlab
Check that unit status doesn't show "lost"
Check status history
kill-controller and ensure no IAAS model errors

Copy link
Contributor

@anastasiamac anastasiamac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good \o/
Just couple of questions and nit-picks ...
Thanks for proposing :)

}, nil
}

if model.Type() == state.ModelTypeIAAS {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100% sure that this will work all the time give recent difficulties to figure out what to do on older versions?
(I guess, by the time, this is called upgrades steps would have ensured valid data here?..)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this should be covered by upgrades. We don't protect this call anywhere.
The recent issue was due to the IAASModel() call which does return an error.

@@ -181,7 +180,7 @@ func FormatTabular(writer io.Writer, forceColor bool, value interface{}) error {
}

if fs.Model.Type == caasModelType {
outputHeaders("Unit", "Status", "Address", "Ports", "Message")
outputHeaders("Unit", "Workload", "Agent", "Address", "Ports", "Message")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

niiice \o/

}

// WaitAgentPresence blocks until the respective agent is alive.
// These should really only be used in the test suite.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'This.."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed here and in other places

return nil
}
case <-time.After(timeout):
// TODO(fwereade): 2016-03-17 lp:1558657
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha :(

Copy link
Contributor

@anastasiamac anastasiamac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, wrong button - meant to click "Approve' :)

LGTM

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit cff7057 into juju:develop Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants