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

Add reboot in cleanup after package removal before file removal #9384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Feature: Setup containerized proxy

Scenario: Clean up sumaform leftovers on the containerized proxy
When I perform a full salt minion cleanup on "proxy"
And I reboot the "proxy" host through SSH, waiting until it comes back

Scenario: Log in as admin user
Given I am authorized for the "Admin" section
Expand Down
8 changes: 8 additions & 0 deletions testsuite/features/step_definitions/salt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@
# Transactional systems could have also installed salt-minion via sumaform
_result, code = node.run('rpm -q salt-minion', check_errors: false)
node.run('transactional-update --continue -n pkg rm salt-minion', check_errors: false) if code.zero?
# Reboot needed here after package removal but before file removal
step %(I reboot the "#{host}" host through SSH, waiting until it comes back)
node.run('rm -Rf /var/cache/salt/minion /var/run/salt /run/salt /var/log/salt /etc/salt', check_errors: false) if code.zero?
elsif rh_host?(host)
node.run('yum -y remove --setopt=clean_requirements_on_remove=1 venv-salt-minion', check_errors: false)
Expand All @@ -544,6 +546,8 @@
else
if transactional_system?(host)
node.run('transactional-update --continue -n pkg rm salt salt-minion', check_errors: false)
# Reboot needed here after package removal but before file removal
step %(I reboot the "#{host}" host through SSH, waiting until it comes back)
elsif rh_host?(host)
node.run('yum -y remove --setopt=clean_requirements_on_remove=1 salt salt-minion', check_errors: false)
elsif deb_host?(host)
Expand All @@ -553,6 +557,10 @@
end
node.run('rm -Rf /root/salt /var/cache/salt/minion /var/run/salt /run/salt /var/log/salt /etc/salt /var/tmp/.root*', check_errors: false)
end
if transactional_system?(host)
# Reboot needed after file removal as well
step %(I reboot the "#{host}" host through SSH, waiting until it comes back)
end
step %(I disable the repositories "tools_update_repo tools_pool_repo" on this "#{host}" without error control)
end

Expand Down
Loading