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

The function "module.run" is using its deprecated version and will expire in version "Sodium" #44425

Closed
eradman opened this issue Nov 7, 2017 · 5 comments
Labels
Question
Milestone

Comments

@eradman
Copy link
Contributor

@eradman eradman commented Nov 7, 2017

Description of Issue/Question

While running from top-of-tree (salt 2017.7.0-786-g1bbaef6) I now receive this warning when running states that use module.run:

[WARNING ] The function "module.run" is using its deprecated version and will expire in version "Sodium".

What is the new method for running modules within a state?

Steps to Reproduce Issue

install_forks:
  module.run:
    - name: cpan.install
    - module: 'forks'
    - unless:
      - perl -e 'use forks;'
@gtmanfred
Copy link
Contributor

@gtmanfred gtmanfred commented Nov 7, 2017

https://docs.saltstack.com/en/develop/topics/releases/2017.7.0.html#state-module-changes

This is noted in the release notes for 2017.7.0

The format for module.run is just changing to be more readable

Daniel

@gtmanfred gtmanfred added the Question label Nov 7, 2017
@gtmanfred gtmanfred added this to the Blocked milestone Nov 7, 2017
@kiemlicz
Copy link
Contributor

@kiemlicz kiemlicz commented Oct 19, 2018

I'm unable to use this new form. (I've missed setting the proper option in minion config)
For the following:

    redis_{{ container_id }}_command:
      module.run:
        - docker.run:
          - name: {{ container_id }}
          - cmd: 'redis-cli ping

It fails with:

2018-10-19 13:40:46,460 [salt.utils.decorators:544 ][WARNING ][17352] The function "module.run" is using its deprecated version and will expire in version "Sodium".
2018-10-19 13:40:46,461 [salt.state       :310 ][ERROR   ][17352] Module function redis_e6854d63f785d4e71b5f988608b330801a2949aa90a8ad07283f45e1f775c59f_command is not available

Salt 2018.3.2 (minion and master)

@gtmanfred
Copy link
Contributor

@gtmanfred gtmanfred commented Oct 19, 2018

did you set

use_superseded:
  - module.run

in /etc/salt/minion and restart the minion?

@kiemlicz
Copy link
Contributor

@kiemlicz kiemlicz commented Oct 19, 2018

I did not, thank you for pointing this out

@b-a-t
Copy link

@b-a-t b-a-t commented Nov 15, 2018

see also #44882

nick-wang added a commit to nick-wang/drbd-nfs-terraform that referenced this issue Aug 6, 2019
Fix the error when using module.run to make partitions.
[WARNING ] The function "module.run" is using its deprecated
 version and will expire in version "Sodium".
[ERROR   ] Module function partition.mkpart is not available

Must modify the minion configuration before running 'module.run',
so add in pre_installation

Refer to:
saltstack/salt#44425
saltstack/salt#44882
nick-wang added a commit to nick-wang/ha-sap-terraform-deployments that referenced this issue Oct 30, 2019
Fix the error when using module.run to make partitions.
[WARNING ] The function "module.run" is using its deprecated
 version and will expire in version "Sodium".
[ERROR   ] Module function partition.mkpart is not available

Must modify the minion configuration before running 'module.run',
so add in pre_installation

Refer to:
  saltstack/salt#44425
  saltstack/salt#44882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question
Projects
None yet
Development

No branches or pull requests

4 participants