salt icon indicating copy to clipboard operation
salt copied to clipboard

pkg.list_pkgs on Windows minion returns com_error

Open djs52 opened this issue 13 years ago • 8 comments

Possible duplicate of #4522, but using the latest Windows 32 bit installer from the website (marked 0.15.2), I still see

djs-admin@master:~$ sudo salt 'windows.*' pkg.list_pkgs
windows:
    Traceback (most recent call last):
      File "salt/minion.py", line 443, in _thread_return
      File "salt/modules/win_pkg.py", line 214, in list_pkgs
      File "salt/modules/win_pkg.py", line 251, in _get_msi_software
      File "win32com/client/util.py", line 84, in next
    com_error: (-2147217392, 'OLE error 0x80041010', None, None)

This is on Server 2003.

djs52 avatar May 31 '13 10:05 djs52

Thanks for the report! I'll have @UtahDave look into it. =)

basepi avatar May 31 '13 18:05 basepi

@djs52 are you getting this error on every invocation of pkg.list_pkgs? so far I haven't been able to reproduce this.

I'm wondering if some particular package isn't providing all the properties that the module is expecting. I may add a try/except in there to make it a little more robust.

UtahDave avatar May 31 '13 23:05 UtahDave

@UtahDave - yes, every invocation of pkg.list_pkgs or pkg.install. I'll try 0.15.3 when it is ready and let you know...

djs52 avatar Jun 03 '13 13:06 djs52

@UtahDave - same problem with 0.15.3.

I have also tried installing from source on a clean XP machine, in the hope of addressing some of these myself. I've not been able to reproduce the com_error running from source (latest git); could there be something different in the packages you are generating?

djs52 avatar Jun 05 '13 12:06 djs52

It's definitely possible. We use bbfreeze and esky to pull all the deps into one consolidated package that we can install.

Have you tried freezing the build?

UtahDave avatar Jun 05 '13 15:06 UtahDave

Are you still seeing this error with the 0.15.3 installer?

UtahDave avatar Jun 05 '13 15:06 UtahDave

Nailed it. It turns out I don't have the MSI provider installed on either of my test platforms (it's optional on Server 2003 and all 64 bit OSes), but I did on the XP machine I used to try running from source.

Pull request coming your way shortly. This isn't necessarily the best fix, but it works well enough for now.

djs52 avatar Jun 06 '13 09:06 djs52

Awesome! Thanks!

UtahDave avatar Jun 06 '13 21:06 UtahDave