mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle the MSI installer starting the salt-minion
It's not supposed to start the salt-minion when START_MINION="" is passed
This commit is contained in:
parent
0c91f8bb1c
commit
5d31b7e824
2 changed files with 9 additions and 6 deletions
|
@ -553,6 +553,8 @@ class SaltPkgInstall:
|
|||
elif pkg.endswith("msi"):
|
||||
# Install the package
|
||||
log.debug("Installing: %s", str(pkg))
|
||||
# START_MINION="" does not work as documented. The service is
|
||||
# still starting. We need to fix this for RC2
|
||||
ret = self.proc.run(
|
||||
"msiexec.exe", "/qn", "/i", str(pkg), 'START_MINION=""'
|
||||
)
|
||||
|
@ -560,6 +562,13 @@ class SaltPkgInstall:
|
|||
else:
|
||||
log.error("Invalid package: %s", pkg)
|
||||
return False
|
||||
|
||||
# Stop the service installed by the installer. We only need this
|
||||
# until we fix the issue where the MSI installer is starting the
|
||||
# salt-minion service when it shouldn't
|
||||
log.debug("Removing installed salt-minion service")
|
||||
self.proc.run(str(self.ssm_bin), "stop", "salt-minion")
|
||||
|
||||
# Remove the service installed by the installer
|
||||
log.debug("Removing installed salt-minion service")
|
||||
self.proc.run(str(self.ssm_bin), "remove", "salt-minion", "confirm")
|
||||
|
|
|
@ -1053,12 +1053,6 @@ class VM:
|
|||
if ret.returncode != 0:
|
||||
self.ctx.exit(ret.returncode, ret.stderr.strip())
|
||||
|
||||
# Maybe this will fix the issue with the MSI not installing
|
||||
cmd = ["icacls", remote_path, "/grant", "Administrator:(OI)(CI)F", "/T"]
|
||||
ret = self.run(cmd, capture=True, check=False)
|
||||
if ret.returncode != 0:
|
||||
self.ctx.exit(ret.returncode, ret.stderr.strip())
|
||||
|
||||
def write_and_upload_dot_env(self, env: dict[str, str]):
|
||||
if not env:
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue