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

juju charms: set more accurate status based on goal_state #65187

Merged

Conversation

kwmonroe
Copy link
Contributor

What this PR does / why we need it:
Use juju goal-state to report more accurate charm status.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/593

Special notes for your reviewer:
The goal-state hook tool was released in juju 2.4. For deployments on earlier versions of juju, this will fall back to the current status reporting behavior.

Release note:

Report accurate status for kubernetes-master and -worker charms.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 18, 2018
@kwmonroe
Copy link
Contributor Author

/assign @Cynerva

@kwmonroe
Copy link
Contributor Author

Deploying with the linked PR looks good for the k8s-worker (waiting vs blocked):

$ juju show-status-log kw/0 -n 1000 | grep kubernetes-master
18 Jun 2018 15:17:16Z  workload   blocked      Relate kw:kube-control kubernetes-master:kube-control
18 Jun 2018 15:17:51Z  workload   waiting      Waiting for kubernetes-master to become ready
18 Jun 2018 15:17:52Z  workload   waiting      Waiting for kubernetes-master to become ready
18 Jun 2018 15:17:53Z  workload   waiting      Waiting for kubernetes-master to become ready

Same with k8s-master:

$ juju show-status-log km/0 -n 1000 | grep endpoint
18 Jun 2018 15:17:17Z  workload   waiting      Waiting for kube-api-endpoint relation

@wgliang
Copy link
Contributor

wgliang commented Jun 19, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 19, 2018
@Cynerva
Copy link
Contributor

Cynerva commented Jun 19, 2018

/lgtm

👍

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cynerva, kwmonroe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit a1344cb into kubernetes:master Jun 22, 2018
k8s-github-robot pushed a commit that referenced this pull request Jun 25, 2018
Automatic merge from submit-queue (batch tested with PRs 65156, 65448). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

lint fixes for goal state checks

**What this PR does / why we need it**:
Lint fixes for long lines introduced in #65187 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:
We could also fix this by setting a longer flake8 line length in something like a local `setup.cfg`

**Release note**:

```release-note
NONE
```
@kwmonroe kwmonroe deleted the feature/goal-state-status branch July 11, 2018 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

better status with goal_state
5 participants