saltstack / saltstack/salt

[BUG] _modules/ do not override native module on Windows

Open
#58,471 6 comments 0 reactions 1 assignee View on GitHub

@xeacott is already working on this.

Since Sep 23, 2020.

bug Windows
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
I put a copy of file.py module in /srv/salt/_modules, did a litlle change on the module /srv/salt/_modules/file.py (something simple like adding a log.info line to some function)
sync'd module to minions, confirmed all minions got the custom module
Windows minion still executed the native module, while in Linux minions the response was from the custom module

Looks like do not override native modules on Windows

Steps to Reproduce the behavior
Copy a native module to /srv/salt/_modules
cp /usr/lib/python3.6/site-packages/salt/modules/file.py /srv/salt/_modules/

Make a change to a function, synchronize the module to Windows minion and execute.
Verify if the change has been takne by Windows minion

Expected behavior
Windows minion should use custom module

Versions Report
3001.1 py3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.