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

_pillar func breaks fileserver globals #22941

Closed
bersace opened this issue Apr 22, 2015 · 5 comments
Closed

_pillar func breaks fileserver globals #22941

bersace opened this issue Apr 22, 2015 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 Pillar severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@bersace
Copy link
Contributor

bersace commented Apr 22, 2015

Hi,

It's the same bug as #22844 , but in master workers.

When calling _pillar function, a fileclient is instanciate at https://github.com/saltstack/salt/blob/2014.7/salt/pillar/__init__.py#L116 . This overwrite global __opts__ in fileserver.roots with file_roots as pillar_roots. This break fetching of state sls.

In fact, it depends on which worker is queried. This make it a bit hard to reproduce. Here is a log:

On minion :

[DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://lib.sls'
*** CUSTOM *** {'path': 'lib.sls', 'saltenv': 'base', 'cmd': '_serve_file', 'loc': 0}
*** CUSTOM *** {'path': 'lib.sls', 'saltenv': 'base', 'cmd': '_serve_file', 'loc': 69}
[INFO    ] Fetching file from saltenv 'base', ** done ** 'lib.sls'
{{ env }}:

{%- block all %}
  '*':
    - pillar-lib
{%- endblock %}

And on master

[INFO    ] AES payload received with command _serve_file
*** CUSTOM *** serve_file /usr/local/src/salt-local-bug/pillar/lib.sls 0
{{ env }}:

{%- block all %}
  '*':
    - pillar-lib
{%- endblock %}

EOF
[INFO    ] AES payload received with command _serve_file
*** CUSTOM *** serve_file /usr/local/src/salt-local-bug/salt/lib.sls 69

EOF

As you can see, a pillar file is served by _serve_file.

_serve_file must always server from file_roots.

@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 Pillar labels Apr 22, 2015
@jfindlay jfindlay added this to the Approved milestone Apr 22, 2015
@jfindlay
Copy link
Contributor

@bersace, thanks for your work on this.

@jfindlay jfindlay added the fixed-pls-verify fix is linked, bug author to confirm fix label Apr 29, 2015
@rallytime
Copy link
Contributor

@bersace Since your pull request has been merged, do you think this issue should be closed?

@bersace
Copy link
Contributor Author

bersace commented May 4, 2015

@rallytime actually, the issue is not fixed for master/minion mode in 2015.2. Needs on last PR. I'm not using 2015.2 right now. It's on my TODO :/

@rallytime
Copy link
Contributor

@bersace No problem! Thanks for the update.

@rallytime rallytime removed the fixed-pls-verify fix is linked, bug author to confirm fix label May 4, 2015
@jfindlay jfindlay added Core relates to code central or existential to Salt and removed Core relates to code central or existential to Salt labels May 26, 2015
@bersace
Copy link
Contributor Author

bersace commented May 30, 2017

I switched to Ansible.

@bersace bersace closed this as completed May 30, 2017
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 P3 Priority 3 Pillar severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

3 participants