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

Bugfix/fix salt upgrade downgrade #2525

Merged
merged 5 commits into from
May 6, 2020

Conversation

TeddyAndrieux
Copy link
Collaborator

Component:

'salt', 'lifecycle'

Context:

Various issue for upgrade and downgrade

Summary:

  • Special case to handle salt-minion downgrade
  • Fix salt-minion upgrade and downgrade during orchestrate

Fixes: #2524

TeddyAndrieux and others added 2 commits May 5, 2020 19:41
In our custom package manager salt module, add a special case to handle
Salt downgrade, as `yum` do not handle downgrade dependencies properly
you need to provide all dependencies explicitly.

Sees: #2523
Until now, we use `module.run` to execute `test.ping` after restarting
`salt-minion`. The `module.run` state has `changes` though,
unconditionally. As such, when re-running any state including
`salt.minion.running` (e.g., all highstates), this causes changes to be
reported.

Currently, when bringing a cluster to highstate, only these `module.run`
'states' cause any 'changes' to be reported, giving the impression our
states are not idempotent. The `test.ping` call is inherently
idempotent though...

As such, changing the approach slightly and instead of using
`module.run`, running `test.ping` from a `__slot__` call whose result is
set as the `result` of a `test.configurable_test_state` state, wich
`changes` set to `False`. As such, this state will now properly fail
when `test.ping` returns `False`, but no `changes` will be reported when
this state is applied.

(cherry picked from commit b26d64a)
@TeddyAndrieux TeddyAndrieux requested a review from a team May 5, 2020 17:44
@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Hello teddyandrieux,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Conflict

A conflict has been raised during the creation of
integration branch w/2.6/bugfix/fix-salt-upgrade-downgrade with contents from w/2.5/bugfix/fix-salt-upgrade-downgrade
and development/2.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/2.6/bugfix/fix-salt-upgrade-downgrade origin/development/2.6
 $ git merge origin/w/2.5/bugfix/fix-salt-upgrade-downgrade
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/2.6/bugfix/fix-salt-upgrade-downgrade

@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

`module.wait` add some `changes` to the output when a `test.sleep` does
not do any change, so use a `test.configurable_test_state` with a `slot`
instead so that this state never report any changes (which is expected)
@TeddyAndrieux TeddyAndrieux force-pushed the bugfix/fix-salt-upgrade-downgrade branch from a706c41 to 433199f Compare May 5, 2020 18:13
@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

History mismatch

Merge commit #0c567ff26f05a03d8d904b7ed16e494e2687836e on the integration branch
w/2.1/bugfix/fix-salt-upgrade-downgrade is merging a branch which is neither the current
branch bugfix/fix-salt-upgrade-downgrade nor the development branch
development/2.1.

It is likely due to a rebase of the branch bugfix/fix-salt-upgrade-downgrade and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

@TeddyAndrieux
Copy link
Collaborator Author

/reset

@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Reset complete

I have successfully deleted this pull request's integration branches.

@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Conflict

A conflict has been raised during the creation of
integration branch w/2.6/bugfix/fix-salt-upgrade-downgrade with contents from w/2.5/bugfix/fix-salt-upgrade-downgrade
and development/2.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/2.6/bugfix/fix-salt-upgrade-downgrade origin/development/2.6
 $ git merge origin/w/2.5/bugfix/fix-salt-upgrade-downgrade
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/2.6/bugfix/fix-salt-upgrade-downgrade

@bert-e
Copy link
Contributor

bert-e commented May 5, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

gdemonet
gdemonet previously approved these changes May 5, 2020
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

:shipit:

Install salt-minion salt state may also upgrade and downgrade
salt-minion package, and this salt version change may have impact on
the running salt states, so make this salt states running at the end of
the state.

Refs: #2524
In `deploy_node` orchestrate during `Reconfigure salt-minion` salt state
we may upgrade, downgrade salt-minion package and restart salt-minion
service so salt-minion may miss some of the salt-master job query,
increase timeout so that minion have time to upgrade, downgrade and
restart if needed

Fixes: #2524
@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

History mismatch

Merge commit #ae308f70f6eb213dadc5d1d269a7238270db5f41 on the integration branch
w/2.1/bugfix/fix-salt-upgrade-downgrade is merging a branch which is neither the current
branch bugfix/fix-salt-upgrade-downgrade nor the development branch
development/2.1.

It is likely due to a rebase of the branch bugfix/fix-salt-upgrade-downgrade and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

@TeddyAndrieux
Copy link
Collaborator Author

/reset

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

Reset complete

I have successfully deleted this pull request's integration branches.

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

Conflict

A conflict has been raised during the creation of
integration branch w/2.6/bugfix/fix-salt-upgrade-downgrade with contents from w/2.5/bugfix/fix-salt-upgrade-downgrade
and development/2.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/2.6/bugfix/fix-salt-upgrade-downgrade origin/development/2.6
 $ git merge origin/w/2.5/bugfix/fix-salt-upgrade-downgrade
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/2.6/bugfix/fix-salt-upgrade-downgrade

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@TeddyAndrieux
Copy link
Collaborator Author

/approve

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

Build failed

The build for commit did not succeed in branch w/2.6/bugfix/fix-salt-upgrade-downgrade.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.0

  • ✔️ development/2.1

  • ✔️ development/2.2

  • ✔️ development/2.3

  • ✔️ development/2.4

  • ✔️ development/2.5

  • ✔️ development/2.6

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented May 6, 2020

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.0

  • ✔️ development/2.1

  • ✔️ development/2.2

  • ✔️ development/2.3

  • ✔️ development/2.4

  • ✔️ development/2.5

  • ✔️ development/2.6

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3

Please check the status of the associated issue None.

Goodbye teddyandrieux.

@bert-e bert-e merged commit 282e0d9 into development/2.0 May 6, 2020
@bert-e bert-e deleted the bugfix/fix-salt-upgrade-downgrade branch May 6, 2020 10:45
TeddyAndrieux added a commit that referenced this pull request May 11, 2020
`deploy_node` orchestrate of 2.4.0, 2.4.1, 2.4.2, 2.4.3, and 2.5.0 does
not handle Salt downgrade so to downgrade to these versions we first
need to downgrade all Salt minions manually, add a procedure in the
documentation to do it.

Sees: e3916c8
Refs: #2525
TeddyAndrieux added a commit that referenced this pull request May 11, 2020
`deploy_node` orchestrate of 2.4.0, 2.4.1, 2.4.2, 2.4.3, and 2.5.0 does
not handle Salt downgrade so to downgrade to these versions we first
need to downgrade all Salt minions manually, add a procedure in the
documentation to do it.

Sees: e3916c8
Refs: #2525
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

4 participants