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

Fix interactive rolling update silently ignored #5642

Merged
merged 2 commits into from
Sep 15, 2018

Conversation

Mikulas
Copy link
Contributor

@Mikulas Mikulas commented Aug 16, 2018

This improves on #4166 (Interactive cli opt) by adding --interactive support for rolling updates in --cloudonly mode and for feature flag DrainAndValidateRollingUpdate disabled. Without this fix, the interactive flag is silently ignored.

Why is this change needed: it's not currently obvious the interactive mode does not always work. Also, I'd say interactive rolling update is most useful when the validation is turned off or the upgrade is cloud only.

Originally there were four (!) cases with only the penultimate one using the interactive prompt:

  • bastion upgrade
  • cluster instance with cloudonly
  • cluster instance with validation
  • cluster instance with validation turned off

This PR only adds the prompt after removing any cluster node. Bastion nodes still do not prompt.

As for the implementation:

  • The first commit puts the prompt as the very last step for each node. I've intentionally left the continue after bastion upgrade to not trigger the prompt.
  • The second commit as merely cosmetical and make output consistent with DeleteInstance method

Tests: there were no tests in the original pr #4166 and I'm not quite sure how to test this on CI. I've run the upgrade locally though and the command works as expected.

/area rolling-update

@k8s-ci-robot k8s-ci-robot added area/rolling-update needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 16, 2018
@Mikulas Mikulas changed the title Cloudonly interactive Fix interactive rolling update silently ignored Aug 16, 2018
Updated to use same logic as DeleteInstance does: print at least the host id
as that is always available and only include node name if set.
@mikesplain
Copy link
Contributor

/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 Aug 17, 2018
@Mikulas
Copy link
Contributor Author

Mikulas commented Aug 20, 2018

/retest

@chrisz100
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2018
@justinsb
Copy link
Member

Thanks @Mikulas

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisz100, justinsb, Mikulas

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 Sep 15, 2018
@k8s-ci-robot k8s-ci-robot merged commit efb4b13 into kubernetes:master Sep 15, 2018
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. area/rolling-update 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants