mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Debugging downgrade failures
This commit is contained in:
parent
0681720f50
commit
e29a663367
3 changed files with 16 additions and 3 deletions
|
@ -50,10 +50,18 @@ def test_salt_downgrade_minion(salt_call_cli, install_salt, salt_systemd_setup):
|
|||
"""
|
||||
Test an downgrade of Salt Minion.
|
||||
"""
|
||||
print(
|
||||
f"DGM test_salt_downgrade_minion, install_salt prev_version, '{install_salt.prev_version}'",
|
||||
flush=True,
|
||||
)
|
||||
is_downgrade_to_relenv = packaging.version.parse(
|
||||
install_salt.prev_version
|
||||
) >= packaging.version.parse("3006.0")
|
||||
|
||||
print(
|
||||
f"DGM test_salt_downgrade_minion, install_salt prev_version, '{install_salt.prev_version}', is_downgrade_to_relenv '{is_downgrade_to_relenv}'",
|
||||
flush=True,
|
||||
)
|
||||
if is_downgrade_to_relenv:
|
||||
original_py_version = install_salt.package_python_version()
|
||||
|
||||
|
@ -95,6 +103,11 @@ def test_salt_downgrade_minion(salt_call_cli, install_salt, salt_systemd_setup):
|
|||
|
||||
time.sleep(60) # give it some time
|
||||
|
||||
dgm_ps = salt_call_cli.run("--local", "ps -ef")
|
||||
print(
|
||||
f"DGM test_salt_downgrade_minion, post downgrade, ps -ef '{dgm_ps}'", flush=True
|
||||
)
|
||||
|
||||
# Verify there is a new running minion by getting its PID and comparing it
|
||||
# with the PID from before the upgrade
|
||||
new_minion_pids = _get_running_named_salt_pid(process_name)
|
||||
|
|
|
@ -10,8 +10,8 @@ def test_services(install_salt, salt_call_cli):
|
|||
"""
|
||||
Check if Services are enabled/disabled
|
||||
"""
|
||||
if not install_salt.upgrade:
|
||||
install_salt.install()
|
||||
## DGM if not install_salt.upgrade:
|
||||
## DGM install_salt.install()
|
||||
|
||||
services_disabled = []
|
||||
services_enabled = []
|
||||
|
|
|
@ -518,7 +518,7 @@ class SaltPkgInstall:
|
|||
ret = self.proc.run(self.pkg_mngr, "install", "-y", *self.pkgs)
|
||||
if not platform.is_darwin() and not platform.is_windows():
|
||||
# Make sure we don't have any trailing references to old package file locations
|
||||
## assert ret.returncode == 0
|
||||
assert ret.returncode == 0
|
||||
assert "/saltstack/salt/run" not in ret.stdout
|
||||
log.info(ret)
|
||||
self._check_retcode(ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue