Repository navigation
Closed
Labels
Execution-ModuleP3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRegressionThe issue is a bug that breaks functionality known to work in previous releases.WindowsZRELEASED - Boronbugbroken, incorrect, or confusing behaviorseverity-criticaltop severity, seen by most users, serious issuesseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Description of Issue/Question
After upgrading to the Dev branch, I was unable to run "win_servermanager.list_available" on a minion. The functionality was previously available on 2015.8.3
Setup
Master Version: 2016.3.0rc1-1112-gb628b55 (Boron)
Minion Version: v2016.3.0rc2-348-g111e927
The command run: "salt win_servermanager.list_available"
Windows Version: 2008 R2 Enterprise
Steps to Reproduce Issue
The error message in return is:
The term 'Get-WindowsFeature' is not recognized as the name of a cmdlet, functi
on, script file, or operable program. Check the spelling of the name, or if a p
ath was included, verify that the path is correct and try again.
At line:1 char:19
+ Get-WindowsFeature <<<< -erroraction silentlycontinue -warningaction silentl
ycontinue
+ CategoryInfo : ObjectNotFound: (Get-WindowsFeature:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Versions Report
salt --versions-report
Salt Version:
Salt: 2016.3.0rc1-1112-gb628b55
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: 0.21.1
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.7.0
Python: 2.7.5 (default, Oct 11 2015, 17:47:16)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 1.5
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
libgit2: 0.21.0
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pygit2: 0.21.4
python-gnupg: Not Installed
smmap: 0.8.1
timelib: Not Installed
System Versions:
dist: redhat 7.2 Maipo
machine: x86_64
release: 3.10.0-327.10.1.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.2 Maipo
Possible Solution
When looking at win_servermanager.py between versions 2015.8.3 and 2016.3.0, we noticed:
2015.8.3:
return __salt__['cmd.run'](
'Import-Module ServerManager ; {0}'.format(func),
shell='powershell',
python_shell=True)Notice how the command imports a module.
2016.3.0
cmd = 'Get-WindowsFeature -erroraction silentlycontinue ' \
'-warningaction silentlycontinue'
return __salt__['cmd.shell'](cmd, shell='powershell')This version does not run a Import-Module cmdlet. Running cmd.shell with the leading Import-Module ServerManager; solves the issue.
Metadata
Metadata
Assignees
Labels
Execution-ModuleP3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsRegressionThe issue is a bug that breaks functionality known to work in previous releases.WindowsZRELEASED - Boronbugbroken, incorrect, or confusing behaviorseverity-criticaltop severity, seen by most users, serious issuesseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
jfindlay commentedon May 5, 2016
@aclemetson, thanks for reporting. Ping @twangboy.
twangboy commentedon May 6, 2016
@meggiebot This needs to be merged forward