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

Commits on May 5, 2020

  1. salt: Add a special case for salt downgrade

    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
    TeddyAndrieux committed May 5, 2020
    Configuration menu
    Copy the full SHA
    e3916c8 View commit details
    Browse the repository at this point in the history
  2. salt: make salt.minion.running idempotent

    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)
    NicolasT authored and TeddyAndrieux committed May 5, 2020
    Configuration menu
    Copy the full SHA
    48f0a82 View commit details
    Browse the repository at this point in the history
  3. salt: Do not use module.wait to wait after salt-minion restart

    `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 committed May 5, 2020
    Configuration menu
    Copy the full SHA
    83be7dc View commit details
    Browse the repository at this point in the history

Commits on May 6, 2020

  1. salt: Run 'salt-minion' package install states at the end

    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
    TeddyAndrieux committed May 6, 2020
    Configuration menu
    Copy the full SHA
    52b73d2 View commit details
    Browse the repository at this point in the history
  2. salt: Increase timeout for Reconfigure salt-minion

    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
    TeddyAndrieux committed May 6, 2020
    Configuration menu
    Copy the full SHA
    282e0d9 View commit details
    Browse the repository at this point in the history