salt icon indicating copy to clipboard operation
salt copied to clipboard

Request for better Err/Debug info for file.managed

Open rickh563 opened this issue 11 years ago • 3 comments

Salt: 2015.2.0rc1 Function: file.managed Minion: Windows

) Details:

Windows install fails. I setup an install for Oracle JDK 8u31. Looks like it is O.K. but fails. On the minion, I can do a salt-call and successfully install the software. But from the master it fails.

I think I had the name and version incorrect. It would be helpful if there were more debug info that just that it failed. Is there with debug logging, either on the master or Windows minion?

Ref: ZD-184

rickh563 avatar Feb 27 '15 15:02 rickh563

This is failing again. I turned on TRACE level logging on the minion, and it doesn't look like it provides anything useful:

2015-03-01 05:57:12,264 [salt.state ][INFO ][932] Executing state pkg.installed for oracle-jdk 2015-03-01 05:57:13,233 [salt.minion ][TRACE ][932] Check main poller timeout 1 2015-03-01 05:57:13,420 [salt.loaded.int.module.cmdmod][INFO ][932] Executing command ['c:\salt\var\cache\salt\minion\files\base\win\repo\oracle-jdk\jdk-8u31-windows-x64.exe', 'INSTALLCFG=c:\oracle-jdk-installcfg'] in directory 'C:\Windows\system32\config\systemprofile' 2015-03-01 05:57:13,452 [salt.loaded.int.module.cmdmod][TRACE ][932] output: 2015-03-01 05:57:13,452 [salt.utils.winapi][DEBUG ][932] Initializing COM library After this, it queries the installed packages again and finds the JDK not installed.

freimer avatar Mar 01 '15 06:03 freimer

There is a second problem in that Python 2.7.9 (64-bit) is not being detected properly on Windows hosts. I installed it locally with salt-call, and from the master salt minion pkg.list_pkgs does not list it:

PS C:\salt> $msi.GetType().InvokeMember('ProductsEx', 'GetProperty', $null, $msi, ('', 's-1-1-0', 7)) | select @{name='n
ame'; expression={$_.GetType().InvokeMember('InstallProperty', 'GetProperty', $null, $_, ('ProductName'))} }, @{name='ve
rsion';expression={$_.GetType().InvokeMember('InstallProperty', 'GetProperty', $null, $_, ('VersionString'))}}

name                                                        version
----                                                        -------
Java 8 Update 31 (64-bit)                                   8.0.310
Java SE Development Kit 8 Update 31 (64-bit)                8.0.310.13
AWS Tools for Windows                                       3.7.512.0
aws-cfn-bootstrap                                           1.4.3
Microsoft Visual C++ 2008 Redistributable - x64 9.0.3072... 9.0.30729.6161
EC2ConfigService                                            2.3.313.0
7-Zip 9.20 (x64 edition)                                    9.20.00.0
Java Auto Updater                                           2.8.31.13
Python 2.7.9 (64-bit)                                       2.7.9150


PS C:\salt>

[root@master srv]# salt i-002751fa pkg.list_pkgs 
i-002751fa:
    ----------
    7zip:
        9.20.00.0
    AWS PV Drivers:
        7.2.0
    AWS Tools for Windows:
        3.7.512.0
    EC2ConfigService:
        2.3.313.0
    Java 8 Update 31 (64-bit):
        8.0.310
    Java Auto Updater:
        2.8.31.13
    Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161:
        9.0.30729.6161
    Windows Driver Package - Amazon Inc. (xenbus) System  (09/10/2014 7.2.4.1):
        09/10/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xeniface) System  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xennet) Net  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xenvbd) SCSIAdapter  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xenvif) System  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    aws-cfn-bootstrap:
        1.4.3
    oracle-jdk:
        8.0.310.13
    salt-minion:
        v2014.7.2
[root@master srv]# 

salt-call locally on the Windows box does list it though, so something is wrong between the minion and master:

PS C:\salt> .\salt-call pkg.list_pkgs
[INFO    ] Executing command 'Powershell " $msi = New-Object -ComObject WindowsInstaller.Installer; $msi.GetType().Invok
eMember(\'ProductsEx\', \'GetProperty\', $null, $msi, (\'\', \'s-1-1-0\', 7)) | select @{       name=\'name\';       exp
ression={$_.GetType().InvokeMember(\'InstallProperty\', \'GetProperty\', $null, $_, (\'ProductName\'))}     },     @{
    name=\'version\';       expression={$_.GetType().InvokeMember(\'InstallProperty\', \'GetProperty\', $null, $_, (\'Ve
rsionString\'))}     } | Write-host "' in directory 'C:\\Users\\Administrator'
local:
    ----------
    7zip:
        9.20.00.0
    AWS PV Drivers:
        7.2.0
    AWS Tools for Windows:
        3.7.512.0
    EC2ConfigService:
        2.3.313.0
    Java 8 Update 31 (64-bit):
        8.0.310
    Java Auto Updater:
        2.8.31.13
    Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161:
        9.0.30729.6161
    Windows Driver Package - Amazon Inc. (xenbus) System  (09/10/2014 7.2.4.1):
        09/10/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xeniface) System  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xennet) Net  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xenvbd) SCSIAdapter  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    Windows Driver Package - Amazon Inc. (xenvif) System  (09/09/2014 7.2.4.1):
        09/09/2014 7.2.4.1
    aws-cfn-bootstrap:
        1.4.3
    oracle-jdk:
        8.0.310.13
    python2:
        2.7.9150
    salt-minion:
        v2014.7.2
PS C:\salt>

freimer avatar Mar 01 '15 06:03 freimer

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

stale[bot] avatar Oct 16 '17 20:10 stale[bot]