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

Extrafile_refs are ignored when specified in a Saltfile #18353

Closed
davidjb opened this issue Nov 21, 2014 · 7 comments
Closed

Extrafile_refs are ignored when specified in a Saltfile #18353

davidjb opened this issue Nov 21, 2014 · 7 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix Salt-SSH severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@davidjb
Copy link
Contributor

davidjb commented Nov 21, 2014

As per #9878 and #16733, extra_filerefs should now be able to be defined in a Saltfile, however my tests with the latest 2014.7 show these options get ignored if present.

My example Saltfile:

salt-ssh:
  extra_filerefs:
    - salt://mysql/defaults.yaml
    - salt://mysql/supported_params.yaml

I believe the SaltfileMixIn parser is ignoring these options because they're not (explicitly) part of the option list for salt-ssh.

In the SaltfileMixIn parser (https://github.com/saltstack/salt/blob/2014.7/salt/utils/parsers.py#L326), the cli_config variable has a hold of the Saltfile contents, including extra_filerefs, but the iteration over self.options_list (and self.option_groups) only steps through "known" options. extra_filerefs is thus never mixed into options.

In addition, even if I force the option to be copied (with a hack like:

        setattr(self.options, 'extra_filerefs', cli_config['extra_filerefs'])

), the options aren't present upon reaching the state wrapper code at https://github.com/saltstack/salt/blob/2014.7/salt/client/ssh/wrapper/state.py#L85. I'm not sure where they're supposed to end up, but both __opts__ and kwargs have no value for extra_filerefs.

I'm using the 2014.7 branch.

@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists Salt-SSH labels Nov 21, 2014
@jfindlay jfindlay added this to the Under Review milestone Nov 21, 2014
@jfindlay jfindlay self-assigned this Nov 21, 2014
@jfindlay
Copy link
Contributor

Thanks for reporting this. I'm going to look into it and try to reproduce the problem.

@thatch45
Copy link
Contributor

I am on it

@thatch45
Copy link
Contributor

Found a problem in saltfile loading....

thatch45 added a commit to thatch45/salt that referenced this issue Nov 21, 2014
@thatch45
Copy link
Contributor

Ok, that PR does it

@jfindlay jfindlay removed their assignment Nov 21, 2014
@jfindlay jfindlay added the fixed-pls-verify fix is linked, bug author to confirm fix label Nov 21, 2014
@davidjb
Copy link
Contributor Author

davidjb commented Nov 24, 2014

Thanks! Will be able to confirm with a fix to #17313, which is currently breaking my Ubuntu to RHEL provisioning.

@jfindlay jfindlay modified the milestones: Approved, Under Review Dec 1, 2014
@pykler
Copy link
Contributor

pykler commented Dec 15, 2014

Confirmed that this works for me (in the saltfile).

@davidjb
Copy link
Contributor Author

davidjb commented Jan 13, 2015

Confirmed also now. Thanks, closing!

@davidjb davidjb closed this as completed Jan 13, 2015
@jfindlay jfindlay added the Core relates to code central or existential to Salt label May 26, 2015
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 Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix Salt-SSH severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

4 participants