-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Salt is reporting as failed to install package even if the package is installed #59992
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
The Chrome installer is unique in that the version reported by Salt immediately after the installer completes is not the same as the actual version installed. There must be some processes still completing that eventually set the correct version in the registry. Additionally, you're also never sure exactly which version of Chrome you're going to get as they don't make older versions available. The same url always points you to the latest release. That is why in the public winrepo we use It looks like you're trying to pin Chrome to a specific version. This may cause problems if the minions have access to the internet and chrome is allowed to update itself. The reason I think this is failing for you is that the version is not matching exactly. Salt does a |
Hi, I have executed the chrome installation with version latest. But same issue persists. Applied a retry logic as well with pkg.install thinking if the installation takes some time to update the registry keys and salt is reading the keys before that and throwing the message as failed to install. But same error... Below is the list_pkgs after chrome is installed. Attached is the chrome installation log by pkg.installed. |
It doesn't look like chrome was installed. It's not showing up in |
So, the problem you're trying to solve then is installing chrome from an installer hosted on S3? If I'm reading the salt code correctly, s3 should be a supported file protocol for the winrepo installer. So, you should be able to specify the s3 url in the
Then you shouldn't need the file.managed part of the state. |
Google Chrome package is getting installed through Salt, as you can see on top I have pasted a screenshot saying installation is success. I see it in the minion's add/remove program as well. Also in the salt-minion.log attached above you can see logs with installation success but printed with level Error ( This is a point to be noted ). Even though package is installed successfully the minion is returning the installation as False and I have checked the same with minion version 3002 and 3003 both. The list_pkgs is not detecting the package installed by Salt master and if I run pkg.remove chrome it will will say the package is not installed (Another point to be noted). But list_available will say that the package is available with version details. Another point to be noted is that the same issue ( Though package is getting installed actually, salt is reporting that it is not installed based on the minion return as False) is happening for all other software like DotNet, TreeSize, 7Zip, VeraCrypt etc. I just gave example of Google Chrome here. We can use the S3 URL directly also, I have checked initially with that but same issue was reported. Once the actual issue is resolved we will fine tune this thing. |
If possible, can you replicate the state files, pillar info and win repo packages mentioned above in your local system with Salt version 3002 or above and try to reproduce the issue. I am not actually a Windows guy so not sure if I am missing anything in the whole process. |
Also I enabled Trace log today and I found two suspicious information which might have some relation to this whole issue. Though the installation is successful as I said previously I see the return code from the minion after installation is 2 which is False ('Success': False). The above screenshot tells that Salt is trying to find something in the windows registry but it is not able to. Not sure if these two contain any valueable information. |
|
Hello,
I have a setup of one Salt master (Linux) and one Salt minion (Windows). In the Salt master I have created /srv/salt/chrome/init.sls file (Screenshot 1). I have also configured package repo for Windows under /srv/salt/win/repo-ng/salt-repo-ng/chrome.sls. (Screenshot 2) When I did pkg.refresh_db the repos gets updated inside the Cache directory of Minion.
Now when I am running salt "minion" state.apply chrome it is actually installing the package but returning as Failed to install package.( Screenshot 3). When I am running pkg.remove it is saying the package is not installed.
So I guess some how Salt is not able to detect the package though I have verified the registry keys as well and everything looks normal.
Screenshot 1:
Screenshot 2:
Screenshot 3:
Screenshot of Salt master version report:
Screenshot of Salt minion version report:
Pillar information:
Also attached the minion log file in Debug mode.
salt_minion.log
The text was updated successfully, but these errors were encountered: