salt icon indicating copy to clipboard operation
salt copied to clipboard

windows2003 minion always return error with the module pkg.install

Open coolias opened this issue 13 years ago • 8 comments

Hi, All

I want to use windows 2003 client , so I download it from here http://docs.saltstack.com/topics/installation/windows.html!

First, I install Salt-Minion-0.14.1-win32-Setup.exe on my windows 2003 (i386) which is a virtual machine(vmare), config it, and then, by this doc http://docs.saltstack.com/ref/windows-package-manager.html?highlight=windows, create my own software repository which has firefox and httpd.

below, is my command output:

[root@c6x64 httpd]# salt 'win2003_3' test.ping
win2003_3:
    True

[root@c6x64 httpd]# salt-run winrepo.genrepo
{'firefox': {'15.0.1': {'full_name': 'Mozilla Firefox 15.0.1 (x86 en-US)',
                        'install_flags': ' -ms',
                        'installer': 'salt://win/repo/firefox/English/Firefox Setup 15.0.1.exe',
                        'locale': 'en_US',
                        'reboot': False,
                        'uninstall_flags': ' /S',
                        'uninstaller': '%ProgramFiles(x86)%/Mozilla Firefox/uninstall/helper.exe'},
             '16.0.2': {'full_name': 'Mozilla Firefox 16.0.2 (x86 en-US)',
                        'install_flags': ' -ms',
                        'installer': 'salt://win/repo/firefox/English/Firefox Setup 16.0.2.exe',
                        'locale': 'en_US',
                        'reboot': False,
                        'uninstall_flags': ' /S',
                        'uninstaller': '%ProgramFiles(x86)%/Mozilla Firefox/uninstall/helper.exe'},
             '17.0.1': {'full_name': 'Mozilla Firefox 17.0.1 (x86 en-US)',
                        'install_flags': ' -ms',
                        'installer': 'salt://win/repo/firefox/English/Firefox Setup 17.0.1.exe',
                        'locale': 'en_US',
                        'reboot': False,
                        'uninstall_flags': ' /S',
                        'uninstaller': '%ProgramFiles(x86)%/Mozilla Firefox/uninstall/helper.exe'}},
 'httpd': {'2.0.64': {'full_name': 'Httpd 2.0.64 (x86)',
                      'install_flags': ' /quiet',
                      'installer': 'salt://pkg/windows/xp/i386/httpd-2.0.64-win32-x86-no_ssl.msi',
                      'reboot': False},
           '2.2.21': {'full_name': 'Httpd 2.2.21 (x86)',
                      'install_flags': ' /quiet',
                      'installer': 'salt://pkg/windows/xp/i386/httpd-2.2.21-win32-x86-no_ssl.msi',
                      'reboot': False},
           '2.2.22': {'full_name': 'Httpd 2.2.22 (x86)',
                      'install_flags': ' /quiet',
                      'installer': 'salt://pkg/windows/xp/i386/httpd-2.2.22-win32-x86-no_ssl.msi',
                      'reboot': False}}}
[root@c6x64 httpd]# salt 'win2003_3' pkg.refresh_db
win2003_3:
    True

[root@c6x64 httpd]# salt 'win2003_3' pkg.available_version firefox
win2003_3:
    Traceback (most recent call last):
      File "salt/minion.py", line 423, in _thread_return
      File "salt/modules/win_pkg.py", line 68, in latest_version
      File "salt/modules/win_pkg.py", line 159, in list_pkgs
      File "salt/modules/win_pkg.py", line 200, in _get_msi_software
      File "win32com/client/util.py", line 84, in next
    com_error: (-2147217392, 'OLE error 0x80041010', None, None)

[root@c6x64 httpd]# salt 'win2003_3' pkg.install firefox
win2003_3:
    Traceback (most recent call last):
      File "salt/minion.py", line 423, in _thread_return
      File "salt/modules/win_pkg.py", line 365, in install
      File "salt/modules/win_pkg.py", line 159, in list_pkgs
      File "salt/modules/win_pkg.py", line 200, in _get_msi_software
      File "win32com/client/util.py", line 84, in next
    com_error: (-2147217392, 'OLE error 0x80041010', None, None)

you see, when I run pkg.*, the minion always return this error: com_error: (-2147217392, 'OLE error 0x80041010', None, None).

coolias avatar Apr 17 '13 02:04 coolias

Just now, I test it in the source environment, which all created by this doc http://docs.saltstack.com/topics/installation/windows.html?highlight=windows#installation-from-source, except the 2 step "Install Microsoft Visual Studio 2008 Express" (take too long time, I omit it, and I dont know whether if doing this for the next test...).

in addition to this error, other two errors were founded:

  1. after installed, start minion in the cmd, got the wmi error:
C:\Python27\Scripts>python salt-minion
[ERROR   ] Unable to import Python wmi module, some core grains will be missing
Traceback (most recent call last):
  File "c:\Python27\lib\site-packages\salt\grains\core.py", line 48, in <module>

    import wmi
ImportError: No module named wmi
[ERROR   ] The Salt Master has cached the public key for this node, this salt mi
nion will wait for 10 seconds before attempting to re-authenticate
[ERROR   ] The Salt Master has cached the public key for this node, this salt mi
nion will wait for 10 seconds before attempting to re-authenticate
[ERROR   ] The Salt Master has cached the public key for this node, this salt mi
nion will wait for 10 seconds before attempting to re-authenticate
[ERROR   ] Unable to import Python wmi module, some core grains will be missing
Traceback (most recent call last):
  File "c:\Python27\lib\site-packages\salt\grains\core.py", line 48, in <module>

    import wmi
ImportError: No module named wmi

so I pip install wmi, and fix it

C:\Python27\Scripts>python salt-minion
[WARNING ] Failed to import module dnsutil, this is due most likely to a syntax
error. Traceback raised:
Traceback (most recent call last):
  File "c:\Python27\lib\site-packages\salt\loader.py", line 567, in gen_function
s
    ), fn_, path, desc
  File "c:\Python27\lib\site-packages\salt\modules\dnsutil.py", line 15, in <mod
ule>
    no_dig = bool(subprocess.call([ 'which', 'dig' ]))
  File "c:\Python27\lib\subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "c:\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 2]

this error, I dont know how to fix, just omit it and then, I run pkg.* in the master, got the same error : com_error: (-2147217392, 'OLE error 0x80041010', None, None)

coolias avatar Apr 17 '13 05:04 coolias

no one encountered this problem?

coolias avatar Apr 20 '13 10:04 coolias

Sorry about the late reply! it looks liek this slipped through (I am very behind on triage right now). @UtahDave is the one to take a look at this

thatch45 avatar Apr 22 '13 18:04 thatch45

@coolias for the surface error you're getting here try setting this in your minion config:

multiprocessing: False

I don't think this will fix the underlying problem, but will help get to the root of the problem.

UtahDave avatar Apr 22 '13 18:04 UtahDave

@UtahDave

be already: multiprocessing: False, this is my minion config:

master: 192.168.0.200
id: win2003
master_port: 4506
ipc_mode: tcp
root_dir: c:\
pki_dir: /etc/salt/pki
cachedir: /var/cache/salt
renderer: yaml_jinja
open_mode: False
multiprocessing: False

coolias avatar Apr 24 '13 03:04 coolias

The multiprocessing bug is still active, but the pkg.install bug has been fixed.

UtahDave avatar Apr 29 '13 23:04 UtahDave

Hmm. I'm still seeing this in 0.15.1:

$ sudo salt 'winserver2003*' grains.item saltversion
winserver2003:
  saltversion: 0.15.1
$ sudo salt 'winserver2003*' pkg.install nut
winserver2003:
    Traceback (most recent call last):
      File "salt/minion.py", line 428, in _thread_return
      File "salt/modules/win_pkg.py", line 421, in install
      File "salt/modules/win_pkg.py", line 216, in list_pkgs
      File "salt/modules/win_pkg.py", line 257, in _get_msi_software
      File "win32com/client/util.py", line 84, in next
    com_error: (-2147217392, 'OLE error 0x80041010', None, None)

djs52 avatar May 17 '13 10:05 djs52

I was bitten by this too, installing VC 2008 Express on server 2003. Installing the MSI provider resolved the issue. It might be worth mentioning this in the install docs.

olliewalsh avatar Jun 11 '13 23:06 olliewalsh