Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_servermanager.py should check win version and bitness #30350

Closed
twangboy opened this issue Jan 14, 2016 · 1 comment
Closed

win_servermanager.py should check win version and bitness #30350

twangboy opened this issue Jan 14, 2016 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior Execution-Module P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Milestone

Comments

@twangboy
Copy link
Contributor

win_servermanager.py relies on the ServerManager powershell module.

The ServerManager module is only available on 64bit windows versions 2008R2 and higher.

If a user (for some horrible reason) has 32bit salt installed on 64bit Windows 2008R2 or higher, it will launch a 32bit powershell window which will not be able to find the ServerManager module and will return the following to the master:

mh-windows01:
    ----------
    +:
        :
    Add-WindowsFeature:
        The
    At:
        char:31
    Import-Module:
        The
    correct:
        try
    message:
        Import-Module : The specified module 'ServerManager' was not loaded because no
        valid module file was found in any module directory.
        At line:1 char:1
        + Import-Module ServerManager ; Add-WindowsFeature -Name Web-Server
        -erroraction  ...
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo          : ResourceUnavailable: (ServerManager:String) [Imp
           ort-Module], FileNotFoundException
            + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
           ands.ImportModuleCommand

        Add-WindowsFeature : The term 'Add-WindowsFeature' is not recognized as the
        name of a cmdlet, function, script file, or operable program. Check the
        spelling of the name, or if a path was included, verify that the path is
        correct and try again.
        At line:1 char:31
        + Import-Module ServerManager ; Add-WindowsFeature -Name Web-Server
        -erroraction  ...
        +                               ~~~~~~~~~~~~~~~~~~
            + CategoryInfo          : ObjectNotFound: (Add-WindowsFeature:String) [],
           CommandNotFoundException
            + FullyQualifiedErrorId : CommandNotFoundException
    name:
        a
    spelling:
        the
    valid:
        file

A check should be made in the virtual function to check for versions higher than 2008R2 and 64bitness.

@twangboy
Copy link
Contributor Author

#29169

Related:
#28324

@jfindlay jfindlay added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps Execution-Module labels Jan 14, 2016
@jfindlay jfindlay added this to the Approved milestone Jan 14, 2016
@twangboy twangboy modified the milestones: B 2, Approved Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
None yet
Development

No branches or pull requests

2 participants