-
Notifications
You must be signed in to change notification settings - Fork 14
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
auto migrate scripts and snippets #35
Conversation
integration-snippets/README.md
Outdated
The following are provided for that purpose: | ||
* `UPGRADE_OPTIONS` can be used to to pass log level to the commands. | ||
* `UPGRADE_ARGS` could be used to to pass apiconfig if config files are | ||
available instead of enviornment variables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: environment
# calico/kube-controller initContainer | ||
|
||
This container will be responsible for checking if the datastore needs to be | ||
migrated and block startup until the migration is finished. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems just from reading the description that this container does everything the Node Daemonset initContainer
does except for starting the migration itself. Is there a reason we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, reading the rest of this, I see it is for the different components we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a good thought. I've changed it a bit though and should have changes pushed soon, and it diverges a bit more. What was there before worked but I think what I have now better matches the intended behavior.
pkg/commands/needed.go
Outdated
>1 There was a problem checking if migration is needed. | ||
|
||
Description: | ||
TBD.... blah blah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops 😀, I'll fix that
#!/bin/sh | ||
|
||
# This script checks if upgrade is needed and returns 0 if no upgrade | ||
# is needed. If upgrade is needed then check if it is in progress and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script no longer checks if there is an upgrade in progress. We either need to remove this in the comments or add the checks for progress to make it consistent. I think it might be better to check if it is in progress since otherwise this will just keep polling if an upgrade is needed even if it wasn't started.
done | ||
|
||
if [ $needed -eq 1 ]; then | ||
echo "No data migration is needed. Continuing on." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment at the top says that if $needed
is 0
, then no upgrade is needed. I think it conflicts with the handling in this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe I worded that poorly. Maybe it would be clearer phrased this way. This script checks if upgrade is needed and if no upgrade is needed then returns 0.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yea, I think I got the variable $needed
and the return value mixed up. Ignore my confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, should just need to change the libcalico-go
revision once those changes are merged.
- Add new commands to calico-upgrade - Add new scripts for automating upgrade - Add manifest snippets for automating upgrade - Add temporary manifest generation template - Glide update - Add RBAC for completion job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a skim but LGTM.
New migration automation