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

salt-call ignores --config-dir resulting in failing gpg renderer #34037

Closed
bobrik opened this issue Jun 15, 2016 · 4 comments
Closed

salt-call ignores --config-dir resulting in failing gpg renderer #34037

bobrik opened this issue Jun 15, 2016 · 4 comments
Assignees
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 P4 Priority 4 Renderers severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@bobrik
Copy link
Contributor

bobrik commented Jun 15, 2016

Description of Issue/Question

Setup

I have GPG home not in /etc/salt/gpgkeys, but in /foo/salt/bar/gpgkeys.

Steps to Reproduce Issue

salt-call --local --file-root=/foo/salt/bar/states --pillar-root=/foo/salt/bar/pillar --config-dir=/foo/salt/bar state.highstate

I see logs:

, received: gpg: keyblock resource `/etc/salt/gpgkeys/secring.gpg': file open error

I expect gpg to use config dir provided via cli args.

Versions Report

# salt --versions-report
Salt Version:
           Salt: 2015.8.3

Dependency Versions:
         Jinja2: 2.8
       M2Crypto: 0.21.1
           Mako: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.2.0
         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
           RAET: Not Installed
        Tornado: 4.3
            ZMQ: 4.0.5
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.2
          ioflo: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: 1.2.5
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: 0.3.8
          smmap: 0.9.0
        timelib: Not Installed

System Versions:
           dist: debian 8.4
        machine: x86_64
        release: 4.4.10-cloudflare
         system: debian 8.4
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 15, 2016

@bobrik I think the issue lies here I believe that should be grabbing config-dir from opts.

When in pdb I found this:

(Pdb) p salt.syspaths.CONFIG_DIR, 'gpgkeys'
('/etc/salt', 'gpgkeys')
(Pdb) p __opts__['config_dir']
'/test'

also to note I believe you can specify gpg_keydir in your minion configuration to get this working.

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior P4 Priority 4 Renderers Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Jun 15, 2016
@Ch3LL Ch3LL added this to the Approved milestone Jun 15, 2016
rallytime pushed a commit to rallytime/salt that referenced this issue Jun 23, 2016
This change makes it possible for --config-dir to work from the CLI.

Fixes saltstack#34037
@rallytime
Copy link
Contributor

@bobrik Can you give the fix in #34257 a try?

@rallytime rallytime added the fixed-pls-verify fix is linked, bug author to confirm fix label Jun 23, 2016
@rallytime rallytime modified the milestones: C 8, Approved Jun 23, 2016
@rallytime rallytime self-assigned this Jun 23, 2016
@bobrik
Copy link
Contributor Author

bobrik commented Jun 26, 2016

@rallytime LGTM, thanks!

@rallytime
Copy link
Contributor

Great! Thanks for confirming @bobrik!

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 P4 Priority 4 Renderers 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