Windows pkg.list_pkgs not working
I've discovered an issue with installers on 64 bit Windows.
So I've noticed with regedit if the installer uses this path it works:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
But if it uses this path it doesn't:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Depending on how you're accessing the registry through python it might return the first path on 64 bit windows instead of the second path. I would expect this if you're running 32 bit python. You should probably check both paths.
-Greg
Thanks for the report!
It's working on 64-bit Windows Server 2008+2012 using the AMD64 installer. I don't think this is a problem if you're not using the 32bit installer, except if it means that only 64-bit packages are shown.
Here's what I've been able to determine:
If the software is installed from the master using salt 'minion' pkg.install Firefox then everything works as expected. salt 'minion' pkg.list_pkgs will show Firefox in the list.
If I install or uninstall the software manually, it won't show up or be removed from pkg.list_pkgs until the minion is restarted.
On the minion salt-call --local pkg.list_pkgs always returns the correct list of items.
@gtmacdonald Is this still a problem on more recent versions of Salt? (The fix referenced above is definitely in 2015.5.0 or newer...maybe even some of the later 2014.7 releases...)
This issue happens when the Windows version is 64bit but installed with 32bit of Salt-minion. The 32bit of Salt-minion would be able to fetch the registry keys which stored 64bit software. By installing the 64bit salt-minion on 64bit machine, the pkg.list_pkgs module function works. $salt-master --version salt-master 2015.5.3 (Lithium) $salt 'minion' test.versions_report Salt: 2015.5.3 Python: 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] <--Please note this is an indication of your are running 64bit salt-minion Jinja2: 2.7.3 M2Crypto: 0.21.1 msgpack-python: 0.4.5 msgpack-pure: Not Installed pycrypto: 2.6 libnacl: Not Installed PyYAML: 3.11 ioflo: Not Installed PyZMQ: 14.6.0 RAET: Not Installed ZMQ: 4.0.5 Mako: Not Installed Tornado: Not Installed
Fixed by #23433