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_proxy.configure_proxy Creates Invalid Proxy Config File #53341

Closed
Silvenga opened this issue Jun 3, 2019 · 1 comment
Closed

salt_proxy.configure_proxy Creates Invalid Proxy Config File #53341

Silvenga opened this issue Jun 3, 2019 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Proxy-Minion severity-high 2nd top severity, seen by most users, causes major problems Silicon v3004.0 Release code name

Comments

@Silvenga
Copy link

Silvenga commented Jun 3, 2019

Description of Issue

Two issues:

  • When salt_proxy.configure_proxy was ran, /etc/salt/proxy existed and contained default data. It appear like it was left over from an older version of SaltStack. The master property was empty, so the proxy minion failed to connect to the master.
  • When the /etc/salt/proxy file was removed manually, salt_proxy.configure_proxy created an invalid yaml file which caused salt-proxy to fail to startup:
Command '[u'salt-proxy', u'--proxyid={{ minion }}', u'-l', u'info', u'-d']' failed with return code: 1
2019-06-02 21:56:26,055 [salt.loaded.int.module.cmdmod:778 ][ERROR   ][80325] stderr: [ERROR   ] Error parsing configuration file: /etc/salt/proxy - conf should be a document, not <type 'unicode'>.

The file contained:

master = {{ salt master }}

Setup

Using the following state, with either an empty proxy configuration file or the default (just comments).

proxy.sls

Ensure proxy for minion {{ minion }} exists:
  salt_proxy.configure_proxy:
    - proxyname: {{ minion }}
    - start: true

Steps to Reproduce Issue

salt-call state.apply proxy

Versions Report

salt-call --versions-report                                                                                                                              [10:00PM]

Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.12.3
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: 4.0.1
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5

System Versions:
           dist: Ubuntu 18.04 bionic
         locale: ISO-8859-1
        machine: x86_64
        release: 4.15.0-45-generic
         system: Linux
        version: Ubuntu 18.04 bionic
@cmcmarrow cmcmarrow added the Bug broken, incorrect, or confusing behavior label Jun 3, 2019
@cmcmarrow cmcmarrow added this to the Approved milestone Jun 3, 2019
@cmcmarrow cmcmarrow added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jun 3, 2019
@sagetherage sagetherage added Proxy-Minion severity-high 2nd top severity, seen by most users, causes major problems Silicon v3004.0 Release code name labels Jun 15, 2021
@sagetherage sagetherage modified the milestones: Approved, Silicon Jun 15, 2021
@garethgreenaway
Copy link
Contributor

Looks like this was potentially fixed in PR #52171 I was unable to reproduce it using the latest release. The proxy file is written in the correct format and a proxy minion starts up. Salt version 2018.3.3 is also several years old and subject to many CVE issues. Closing this out one but if the problem persists with later versions please open a new issue. Thanks!

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 Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Proxy-Minion severity-high 2nd top severity, seen by most users, causes major problems Silicon v3004.0 Release code name
Projects
None yet
Development

No branches or pull requests

4 participants