salt icon indicating copy to clipboard operation
salt copied to clipboard

Windows salt-minion service behaves differently to salt-minion.exe

Open dimm037 opened this issue 13 years ago • 3 comments

I've been experimenting with salt Windows packages. Generally, the packaging system works as documented until I'd tried to install the subversion package. Essentially, this is what I'd observed:

When pulling configuration:

On the minion, run salt-call.exe pkg.install svn. Works as expected, the subversion package is installed and can be seen in the "Uninstall or change a program" view.

When the salt-minion run from within a cmd session:

Also, works as expected.

When pushing a configuration:

On the master, run salt 'SaltMinionWindows' pkg.install svn. The master indicates the package is installed and to an extent the package is, i.e. the uninstall (and maybe others) registry is correctly set, files are copied to the correct location. However, the program does not appear in the "Uninstall or change a program" view.

It is quite likely there's a problem with the Windows subversion msi package, however, this doesn't explain the differences between push and pull.

Here is the subversion sls configuration file:

svn:
  1.8.4:
    full_name: "Subversion"
    installer: salt://win/repo/svn/Setup-Subversion-1.8.4.msi
    install_flags: "/passive /norestart /log %temp%\\svnInstall.log"
    uninstaller: salt://win/repo/svn/Setup-Subversion-1.8.4.msi
    uninstall_flags: "/passive /norestart /log %temp%\\svnUninstall.log"
    reboot: False
    msiexec: True

This is stored in a file called svn.sls and placed in srv/salt/win/repo/svn along with the subversion installer. The subversion installer can be downloaded from http://sourceforge.net/projects/win32svn/files/latest/download.

dimm037 avatar Nov 05 '13 18:11 dimm037

Interesting. Generally the salt-call and salt commands are executed in a basically identical fashion on the minion, I wonder what's different here?

Can you please post the results of salt --versions-report on the master and salt-call --versions-report on the minion?

@UtahDave ping

basepi avatar Nov 05 '13 21:11 basepi

Master version report:
           Salt: 0.17.1
         Python: 2.7.3 (default, Sep 26 2013, 20:03:06)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.4.1
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.3
Minion version report:
           Salt: 0.17.1
         Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
         Jinja2: 2.7.1
       M2Crypto: 0.21.1
 msgpack-python: 0.3.0
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.2

dimm037 avatar Nov 05 '13 23:11 dimm037

I did a little more digging and have found the problem. The issue is that the subversion msi appears to install for the "current users" and since the salt service is running as a Local Administrator, the msi properties are not appropriately set. Adding a msi property of ALLUSERS=1 appears to fix the problem.

dimm037 avatar Nov 08 '13 02:11 dimm037