-
Notifications
You must be signed in to change notification settings - Fork 45
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
Prevent downgrade when not possible #2858
Prevent downgrade when not possible #2858
Conversation
Hello alexandre-allard-scality,My role is to assist you with the merge of this Status report is not available. |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
|
@@ -16,6 +18,13 @@ Correct saltenv "{{ saltenv }}" for downgrade to "{{ dest_version }}": | |||
|
|||
{%- endif %} | |||
|
|||
{%- if not defaults.downgrade_supported and not pillar.force_downgrade | default(False) %} |
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.
Maybe we want this pillar entry below the metalk8s
one ? pillar.metalk8s.force_downgrade
or even something like pillar.metalk8s.downgrade.force
?
Same for defaults, may be downgrade.supported
, but I'm not sure the downgrade
dict would be useful for anything else in the future.
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'd put everything under metalk8s.downgrade
, either using both .supported
and .force
, or with a single key, maybe naming it .enabled
?
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.
(No strong opinion about the place for force_downgrade
but maybe since it's only a pillar key that will be passed to orchestrate I would say to be consistent metalk8s.orchestrate.force_downgrade
(or metalk8s.orchestrate.downgrade.force
as you want))
Also here the check is wrong I think, because we can downgrade from 2.6.1 to 2.6.0 for example. IMO you should add a check about the destination version here
@@ -16,6 +18,13 @@ Correct saltenv "{{ saltenv }}" for downgrade to "{{ dest_version }}": | |||
|
|||
{%- endif %} | |||
|
|||
{%- if not defaults.downgrade_supported and not pillar.force_downgrade | default(False) %} |
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'd put everything under metalk8s.downgrade
, either using both .supported
and .force
, or with a single key, maybe naming it .enabled
?
@@ -16,6 +18,13 @@ Correct saltenv "{{ saltenv }}" for downgrade to "{{ dest_version }}": | |||
|
|||
{%- endif %} | |||
|
|||
{%- if not defaults.downgrade_supported and not pillar.force_downgrade | default(False) %} |
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.
(No strong opinion about the place for force_downgrade
but maybe since it's only a pillar key that will be passed to orchestrate I would say to be consistent metalk8s.orchestrate.force_downgrade
(or metalk8s.orchestrate.downgrade.force
as you want))
Also here the check is wrong I think, because we can downgrade from 2.6.1 to 2.6.0 for example. IMO you should add a check about the destination version here
salt/metalk8s/defaults.yaml
Outdated
# Define if the downgrade from this version is supported. | ||
# It should be set to false if manual operations are needed | ||
# (e.g. downgrade of etcd), prior to downgrading the cluster. | ||
# The downgrade can still be forced setting force_downgrade to True | ||
# in the pillar. | ||
downgrade_supported: false |
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.
Do we really want a pillar key to say downgrade is supported ? Because it's supported from 2.6.1 to 2.6.0 for example but will never be supported from 2.6.x to 2.5.x ... so to me we should just have a check about the version in the precheck
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.
Good point
{%- if not defaults.downgrade_supported and not pillar.force_downgrade | default(False) %} | ||
|
||
Downgrade from current version is not supported: | ||
test.fail_without_changes |
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.
To be clear I would add a clear comment here something like "etcd downgrade not supported blablabla" + Maybe a link to a github issue for this #1750 (maybe we want to do some cleaning in the ticket (and talk about 2.6 instead of non-released 2.3) but no related to this PR)
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'd rather link to 2.6.0 release notes, where we will explain this limitation, but agreed, additional help would be very useful for users.
be085bd
to
4c32721
Compare
History mismatchMerge commit #a3d20c5c5aa3cb729e2af0ae64ea6b3e32c5a06a on the integration branch It is likely due to a rebase of the branch Please use the |
4a71f07
to
126332f
Compare
/reset |
Reset completeI have successfully deleted this pull request's integration branches. |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
|
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, just a small comment for the message to display in case the downgrade isn't supported.
Branches have divergedThis pull request's source branch To avoid any integration risks, please re-synchronize them using one of the
Note: If you choose to rebase, you may have to ask me to rebuild |
We now set a boolean in `defaults.yaml` telling if we support downgrade from a version or not. It should be set to false if manual operations are needed (e.g. downgrade of etcd), prior to downgrading the cluster The cluster can still be force setting `metalk8s.downgrade.enabled` to `True` in the pillar. The check will fail early before anything got upgraded to avoid having an half upgraded cluster situation. Refs: #2852
This option is used to by-pass the precheck in downgrade orchestrate, preventing a user from downgrading for unsupported path. This is here in case one still want to downgrade its cluster, for example, if he already has done some manual operations to ensure the downgrade will work (e.g. manual downgrade of etcd). Refs: #2852
126332f
to
292705b
Compare
History mismatchMerge commit #d17744acf01c7b674bd0e966f6a25fea51e72a42 on the integration branch It is likely due to a rebase of the branch Please use the |
/reset |
Reset completeI have successfully deleted this pull request's integration branches. |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following reviewers are expecting changes from the author, or must review again: |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following reviewers are expecting changes from the author, or must review again: |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
/approve |
Build failedThe build for commit did not succeed in branch w/2.7/improvement/2852-prevent-downgrade-when-not-possible. The following options are set: approve |
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.
Not tested but LGTM
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye alexandre-allard-scality. |
Component: salt, scripts, downgrade
Context: See #2852 :)
Summary:
Acceptance criteria:
Closes: #2852