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

Fixed "NeedsUpdate" status of nodes in mixedinstancegroups after rolling update #7445

Conversation

hippolin
Copy link
Contributor

This PR fixed issue #6796, that "NeedsUpdate" status of nodes in mixedinstancegroups after rolling update.

… in the "NeedsUpdate" state even after the rolling update
@k8s-ci-robot
Copy link
Contributor

Welcome @hippolin!

It looks like this is your first PR to kubernetes/kops 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kops has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: https://support.linuxfoundation.org/
  • Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: [email protected]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 22, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @hippolin. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 22, 2019
@hippolin
Copy link
Contributor Author

I signed it

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 22, 2019
@hippolin
Copy link
Contributor Author

/assign @KashifSaadat

@mikesplain
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 22, 2019
@hippolin
Copy link
Contributor Author

hippolin commented Sep 6, 2019

Hi @zetaab / @granular-ryanbonham, could you review this PR, please?

request := &ec2.DescribeLaunchTemplateVersionsInput{
LaunchTemplateName: &name,
}
versions, _ := c.EC2().DescribeLaunchTemplateVersions(request)
Copy link
Member

Choose a reason for hiding this comment

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

ignoring error is not good thing, maybe we should even print that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the reminder. I already add print error message. Could you review again, please?

@hippolin
Copy link
Contributor Author

hippolin commented Sep 9, 2019

/retest

@hippolin
Copy link
Contributor Author

hippolin commented Sep 9, 2019

/test pull-kops-e2e-kubernetes-aws

Copy link
Member

@zetaab zetaab left a comment

Choose a reason for hiding this comment

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

/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 10, 2019
@hippolin
Copy link
Contributor Author

@zetaab Thank you!

@mikesplain
Copy link
Contributor

/retest

@hippolin
Copy link
Contributor Author

@KashifSaadat Could you review or approve this PR, please?

@chrisz100
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisz100, hippolin

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 20, 2019
@djablonski-moia
Copy link
Contributor

Please please, merge this PR into 1.14.0. It solves our problem, which is currently keeping us from automating cluster updates for spot instance groups. We built it locally and it worked fine for us, but working with an in-official build is kind of no go...

@k8s-ci-robot k8s-ci-robot merged commit 082eda3 into kubernetes:master Sep 20, 2019
@mikesplain
Copy link
Contributor

I think the plan right now is to 100% cherry-pick this into 1.15 but since there are few tests for this area we will discuss at office hours whether to cherry pick into 1.14.

@mikesplain
Copy link
Contributor

If it doesn't make the initial 1.14, we can consider cutting a 1.14.1 with this, I just don't want to danger any 1.14 release.

k8s-ci-robot added a commit that referenced this pull request Sep 21, 2019
…45-origin-release-1.15

Automated cherry pick of #7445: Fix that the node of the instance group of the mixed
@yhlee-tw
Copy link

Any plan to backport it to 1.13 (current latest release)? These commits can be applied w/o conflict and we no longer have NeedsUpdate issue with them.

@mikesplain
Copy link
Contributor

mikesplain commented Sep 25, 2019

Cherry pick to 1.14 opened (#7683).

@yhlee-tw After getting the critical fix in for 1.13 today, we really want to get 1.14 out so I've opened a cherry-pick for 1.14 and we'll work on getting that out ASAP (which for the record is backwards compatible with 1.13).

k8s-ci-robot added a commit that referenced this pull request Sep 25, 2019
…45-origin-release-1.14

Automated cherry pick of #7445: Fix that the node of the instance group of the mixed
@granular-ryanbonham
Copy link
Contributor

This MR caused our Cluster to always role nodes. I have a MR to address this, i believe it handles all the ways you can specify the version, anyone who was seeing issues before, that this PR addressed, if you can test the PR #8038 to ensure we do not break you that would be great.

jaredallard pushed a commit to getoutreach/kops that referenced this pull request Apr 14, 2021
Cache LaunchConfigurations

On any given read operation for LCs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Cache AMIs

AMIs can often be the same across different ASGs.
Cache on each fetch for faster lookup later.

Cache autoscaling groups

On any given read operation for ASGs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Don't default adding MIMEBOUNDARY headers when a mixed instances policy is set

Fixed "NeedsUpdate" status of nodes in mixedinstancegroups after rolling update kubernetes#7445

https://github.com/kubernetes/kops/pull/7445/files

Upgrading k8s-srcdst to v.0.2.2

https://github.com/kubernetes/kops/pull/7388/files

Align AWS and kops validation for spot allocation strategy

https://github.com/kubernetes/kops/pull/7660/files

add our calico changes

calico-kube-controllers is required: https://github.com/kubernetes/kops/pull/7517/files

calico-node patch: https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-node.yaml

calico-config patch:
https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-config.yaml

calico-typha:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-typha.yaml

calico-kube-controllers:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-kube-controllers.yaml

Update aws_cloud.go

Patching in capacity-optimized spot allocation strategy and updating AWS SDK

Fix Handling of LaunchTemplate Versions for MixedInstancePolicy according to  kubernetes#8047

Automated cherry pick of kubernetes#8261: Fix RollingUpdate behaviour when using LaunchTemplates for kubernetes#8567: Treat nil of LaunchTemplateSpecification.Version as  from kubernetes#8808

Machine types update from - kubernetes#7947

A4-935 Make CircleCI build pipeline for kops fork

[A4-935](https://outreach-io.atlassian.net/browse/A4-935)

Adds a `.circleci/config.yml` to allow us to reproducibly build and
upload assets for our fork of kops.  This is used mainly to backport
fixes and features into a 0.13-based branch.

The management of this fork is complicated by the fact that kops
configures nodes to go load the `nodeup` binary from a well known URL
managed by vanilla upstream.  We need to have our own S3 bucket with our
own custom built binaries ready for download onto our nodes if we are to
make changes to `nodeup` behavior, which is sometimes necesasry for the
features we want to backport.  So this CircleCI build goes through all
the effort of building those assets and uploading them to S3.

Tweak `Gopkg.toml` and run `make dep-ensure`

Updates `Gopkg.toml` to attempt to work-around the fact that "goautoneg"
no longer lives at bitbucket.org.  The update process here was very
finnicky.  I had to make the update and delete some old generated files
to get `make dep-ensure` to run to completion.

Checks in the results of `make dep-ensure`.  I suspect that last time
there were changes to `Gopkg.toml` in [1] the changes to generated files
were not fully committed and so we've partly lost the ability to build
from this particular fork of kops.

[1] 0984f14

Update gitignore preventing checkin of go-bindata vendor

Upload to path without a `+`

Upload a duplicate copy of our assets to a path that doesn't include a
`+` sign.

Although the S3 issue can be worked around by referencing the path as
`%2B`, it seems `kops`, via the Go `url` package, will aggressively
convert it back into a `+` and not re-encode it.  The kops and Go
behaviors would be fine if S3 followed the spec, but it doesn't.  The
easiest and safest work-around to this whole mess is to just not have
any + signs in our path.

Expose API Server flags needed for aws pod identities

This adds the fields described in the documentation here:

https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/SELF_HOSTED_SETUP.md#kubernetes-api-server-configuration

Update k8s-1.12.yaml.template

fix: calico

Merge pull request #12 from getoutreach/fix-calico

fix: calico
jaredallard pushed a commit to getoutreach/kops that referenced this pull request Apr 14, 2021
Cache LaunchConfigurations

On any given read operation for LCs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Cache AMIs

AMIs can often be the same across different ASGs.
Cache on each fetch for faster lookup later.

Cache autoscaling groups

On any given read operation for ASGs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Don't default adding MIMEBOUNDARY headers when a mixed instances policy is set

Fixed "NeedsUpdate" status of nodes in mixedinstancegroups after rolling update kubernetes#7445

https://github.com/kubernetes/kops/pull/7445/files

Upgrading k8s-srcdst to v.0.2.2

https://github.com/kubernetes/kops/pull/7388/files

Align AWS and kops validation for spot allocation strategy

https://github.com/kubernetes/kops/pull/7660/files

add our calico changes

calico-kube-controllers is required: https://github.com/kubernetes/kops/pull/7517/files

calico-node patch: https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-node.yaml

calico-config patch:
https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-config.yaml

calico-typha:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-typha.yaml

calico-kube-controllers:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-kube-controllers.yaml

Update aws_cloud.go

Patching in capacity-optimized spot allocation strategy and updating AWS SDK

Fix Handling of LaunchTemplate Versions for MixedInstancePolicy according to  kubernetes#8047

Automated cherry pick of kubernetes#8261: Fix RollingUpdate behaviour when using LaunchTemplates for kubernetes#8567: Treat nil of LaunchTemplateSpecification.Version as  from kubernetes#8808

Machine types update from - kubernetes#7947

A4-935 Make CircleCI build pipeline for kops fork

[A4-935](https://outreach-io.atlassian.net/browse/A4-935)

Adds a `.circleci/config.yml` to allow us to reproducibly build and
upload assets for our fork of kops.  This is used mainly to backport
fixes and features into a 0.13-based branch.

The management of this fork is complicated by the fact that kops
configures nodes to go load the `nodeup` binary from a well known URL
managed by vanilla upstream.  We need to have our own S3 bucket with our
own custom built binaries ready for download onto our nodes if we are to
make changes to `nodeup` behavior, which is sometimes necesasry for the
features we want to backport.  So this CircleCI build goes through all
the effort of building those assets and uploading them to S3.

Tweak `Gopkg.toml` and run `make dep-ensure`

Updates `Gopkg.toml` to attempt to work-around the fact that "goautoneg"
no longer lives at bitbucket.org.  The update process here was very
finnicky.  I had to make the update and delete some old generated files
to get `make dep-ensure` to run to completion.

Checks in the results of `make dep-ensure`.  I suspect that last time
there were changes to `Gopkg.toml` in [1] the changes to generated files
were not fully committed and so we've partly lost the ability to build
from this particular fork of kops.

[1] 0984f14

Update gitignore preventing checkin of go-bindata vendor

Upload to path without a `+`

Upload a duplicate copy of our assets to a path that doesn't include a
`+` sign.

Although the S3 issue can be worked around by referencing the path as
`%2B`, it seems `kops`, via the Go `url` package, will aggressively
convert it back into a `+` and not re-encode it.  The kops and Go
behaviors would be fine if S3 followed the spec, but it doesn't.  The
easiest and safest work-around to this whole mess is to just not have
any + signs in our path.

Expose API Server flags needed for aws pod identities

This adds the fields described in the documentation here:

https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/SELF_HOSTED_SETUP.md#kubernetes-api-server-configuration

Update k8s-1.12.yaml.template

fix: calico

Merge pull request #12 from getoutreach/fix-calico

fix: calico
jaredallard pushed a commit to getoutreach/kops that referenced this pull request Apr 19, 2021
Cache LaunchConfigurations

On any given read operation for LCs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Cache AMIs

AMIs can often be the same across different ASGs.
Cache on each fetch for faster lookup later.

Cache autoscaling groups

On any given read operation for ASGs, warm a thread-safe cache
if needed. Continue to use this cache until a write operation
is performed.

Don't default adding MIMEBOUNDARY headers when a mixed instances policy is set

Fixed "NeedsUpdate" status of nodes in mixedinstancegroups after rolling update kubernetes#7445

https://github.com/kubernetes/kops/pull/7445/files

Upgrading k8s-srcdst to v.0.2.2

https://github.com/kubernetes/kops/pull/7388/files

Align AWS and kops validation for spot allocation strategy

https://github.com/kubernetes/kops/pull/7660/files

add our calico changes

calico-kube-controllers is required: https://github.com/kubernetes/kops/pull/7517/files

calico-node patch: https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-node.yaml

calico-config patch:
https://github.com/getoutreach/kube_factory/blob/master/patches/calico/calico-config.yaml

calico-typha:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-typha.yaml

calico-kube-controllers:
https://github.com/getoutreach/kube_factory/blob/master/addons/calico/calico-kube-controllers.yaml

Update aws_cloud.go

Patching in capacity-optimized spot allocation strategy and updating AWS SDK

Fix Handling of LaunchTemplate Versions for MixedInstancePolicy according to  kubernetes#8047

Automated cherry pick of kubernetes#8261: Fix RollingUpdate behaviour when using LaunchTemplates for kubernetes#8567: Treat nil of LaunchTemplateSpecification.Version as  from kubernetes#8808

Machine types update from - kubernetes#7947

A4-935 Make CircleCI build pipeline for kops fork

[A4-935](https://outreach-io.atlassian.net/browse/A4-935)

Adds a `.circleci/config.yml` to allow us to reproducibly build and
upload assets for our fork of kops.  This is used mainly to backport
fixes and features into a 0.13-based branch.

The management of this fork is complicated by the fact that kops
configures nodes to go load the `nodeup` binary from a well known URL
managed by vanilla upstream.  We need to have our own S3 bucket with our
own custom built binaries ready for download onto our nodes if we are to
make changes to `nodeup` behavior, which is sometimes necesasry for the
features we want to backport.  So this CircleCI build goes through all
the effort of building those assets and uploading them to S3.

Tweak `Gopkg.toml` and run `make dep-ensure`

Updates `Gopkg.toml` to attempt to work-around the fact that "goautoneg"
no longer lives at bitbucket.org.  The update process here was very
finnicky.  I had to make the update and delete some old generated files
to get `make dep-ensure` to run to completion.

Checks in the results of `make dep-ensure`.  I suspect that last time
there were changes to `Gopkg.toml` in [1] the changes to generated files
were not fully committed and so we've partly lost the ability to build
from this particular fork of kops.

[1] 0984f14

Update gitignore preventing checkin of go-bindata vendor

Upload to path without a `+`

Upload a duplicate copy of our assets to a path that doesn't include a
`+` sign.

Although the S3 issue can be worked around by referencing the path as
`%2B`, it seems `kops`, via the Go `url` package, will aggressively
convert it back into a `+` and not re-encode it.  The kops and Go
behaviors would be fine if S3 followed the spec, but it doesn't.  The
easiest and safest work-around to this whole mess is to just not have
any + signs in our path.

Expose API Server flags needed for aws pod identities

This adds the fields described in the documentation here:

https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/SELF_HOSTED_SETUP.md#kubernetes-api-server-configuration

Update k8s-1.12.yaml.template

fix: calico

Merge pull request #12 from getoutreach/fix-calico

fix: calico
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

9 participants