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

platform api: list update when non-nil #39

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

jahkeup
Copy link
Member

@jahkeup jahkeup commented Aug 20, 2020

Issue number:

n/a

Description of changes:

When using the update-api update platform, the node lists itself as having updates available when it does not. This is because the response includes a nil update in its list. The update itself isn't inspected and instead the response is checked for len(availableUpdatesResponse.Updates()) > 0. The nil element makes this evaluate to true and then the node will cycle through update attempts.

Testing done:

Nodes in a cluster running Bottlerocket 0.5.0 upgrades successfully to an artificial 0.5.1 then stabilize.

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.

@jahkeup jahkeup mentioned this pull request Aug 20, 2020
@samuelkarp
Copy link
Contributor

When using the update-api update platform, the node lists itself as having updates available when it does not. This is because the response includes a nil update in its list.

Do we have an issue to track this bug in the update API?

Signed-off-by: Jacob Vallejo <jakeev@amazon.com>
@etungsten
Copy link
Contributor

When using the update-api update platform, the node lists itself as having updates available when it does not. This is because the response includes a nil update in its list.

Do we have an issue to track this bug in the update API?

This is an issue specific to the update-api platform in brupop.
The update API return structure looks like:

{
   "update_state":"Idle",
   "available_updates":[
      "0.5.0"
   ],
   "chosen_update":null,
   "active_partition":{
      "image":{
         "arch":"aarch64",
         "version":"0.5.0",
         "variant":"aws-k8s-1.17"
      },
      "next_to_boot":true
   },
   "staging_partition":null,
   "most_recent_command":{
      "cmd_type":"refresh",
      "cmd_status":"Success",
      "timestamp":"2020-08-20T18:44:43.574977236Z",
      "exit_status":0,
      "stderr":""
   }
}

@jahkeup jahkeup merged commit 5adfc9e into bottlerocket-os:develop Aug 20, 2020
@jahkeup jahkeup deleted the update-api-listavailable branch August 20, 2020 21:59
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