Saltstack the wrong path to the remote script prompt in Windows client

Source: Internet
Author: User
Tags saltstack

Saltstack in the Windows Client remote execution script prompts for wrong path

Environment:

Salt-master ==2018.3.0

Salt-minion ==2018.3.0

python== 2.7.5

Centos==7

Problem Description:

Salt A module that has a remote execution command Cmd.script , an error occurred while using the module:

Salt ' minion-id ' cmd.script salt://test.ps1 Shell=powershell

which salt:// to be /etc/salt.conf defined by Base path, which was stored under the Test.ps1 the Script

# Vim Test.ps1

echo Test

Return error message:

View Windows Client Logs c:\salt\var\log\salt\minion :

Viewing the catalog does Minion has been removed from Master Download to window Temp directory and random rename

after the investigation, the department because2018.3.0versionSalthave aBug, theBugis to convert the executed script into apythonthe listList, and then re-convert back to stringstringtype with a single quote "'", butWindowsthe script name path format with single quotation marks is not recognized, causing problems, which are visiblepythonsource code.

actually from 2017.4 version is available, 2017.7 version is fixed, but because another version of the branch is opened, 2018.3.0 did not fix the Bug , only 2018.3.1 was repaired.

https://github.com/saltstack/salt/pull/45716

https://github.com/saltstack/salt/pull/45716

Workaround:

Upgrade Salt-master to the 2018.3.1 version, upgrade salt-minion to the 2018.3.1 version and Master remain consistent.

Successfully re-executing the command and getting the results returned:

Experience:

    1. when selecting the version of the tool, you should pay more attention to the release note on the official website , choose a more normal and stable version to avoid the subsequent encounter more wonderful problems.

    2. in the question or help asker solve the problem, also pay attention to check version information, otherwise there will always be some situation: why I clearly follow correct solution to do is not?!

    3. In the process of solving, unconsciously can grasp a lot of things.

    4. Multi-crossing network and community, no one in China can answer.

Saltstack the wrong path to the remote script prompt in Windows client

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.