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 variant override to updog arguments #923

Merged
merged 1 commit into from
May 11, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented May 8, 2020

If --variant is given, updog will use its argument to look for updates, rather
than the currently running variant. This allows for manually changing between
variants that you know are compatible.

Implementation note: running_version() was removed so that the current variant
isn't as easily used by accident when the user intended to override it.

Testing done:

Starting with a 1.15 AMI with this change:

[ec2-user@ip-192-168-11-222 ~]$ apiclient -u /
  "os": {
    "variant_id": "aws-k8s-1.15",
    ...

A 1.16 image in a test repo only shows up when --variant is specified:

bash-5.0# updog check-update -a --ignore-waves
bash-5.0# updog check-update -a --ignore-waves --variant aws-k8s-1.16
aws-k8s-1.16 0.3.2

Updates OK:

bash-5.0# updog update -i 0.3.2 --variant aws-k8s-1.16 -n -r
Starting update to 0.3.2
** Updating immediately **

...reboot, reconnect...

[ec2-user@ip-192-168-11-222 ~]$ apiclient  -u /
  "os": {
    "variant_id": "aws-k8s-1.16",
    ...

Instance is running, connects to my cluster, and runs a pod OK.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

If --variant is given, updog will use its argument to look for updates, rather
than the currently running variant.  This allows for manually changing between
variants that you know are compatible.

Implementation note: running_version() was removed so that the current variant
isn't as easily used by accident when the user intended to override it.
@tjkirch tjkirch merged commit 24ce799 into bottlerocket-os:develop May 11, 2020
@tjkirch tjkirch deleted the updog-variant-arg branch May 11, 2020 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants