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

[BUG] pcs.auth shows empty failed execution with PCS version 0.11.3 #64277

Open
1 of 9 tasks
derdeagle opened this issue May 13, 2023 · 1 comment
Open
1 of 9 tasks

[BUG] pcs.auth shows empty failed execution with PCS version 0.11.3 #64277

derdeagle opened this issue May 13, 2023 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior dependency underlying Salt dependency issue needs-triage

Comments

@derdeagle
Copy link

derdeagle commented May 13, 2023

Description
With PCS version 0.11.3 the execution of pcs.auth fails without a message even though the execution itself was successful. After digging a bit through the state and module and setting the minion log level to trace I noticed that the output of the pcs host auth command is not in stdout (which is used by the pcs-state) but rather stderr which is not used. Please see the config and output below.

Minion log

2023-05-13 20:48:03,304 [salt.loaded.int.states.pcs:32  ][TRACE   ][2009] Output of pcs.auth: {'pid': 2125, 'retcode': 0, 'stdout': '', 'stderr': 'pcstest02.example.com: Authorized\npcstest01.example.com: Authorized\npcstest03.example.com: Authorized'}

State output

          ID: pcs_cluster_salttest_auth
    Function: pcs.auth
        Name: pcs_auth__auth
      Result: False
     Comment: 
     Started: 20:17:19.902411
    Duration: 7135.502 ms
     Changes:   

State config

pcs_cluster_{{ cluster }}_auth:
  pcs.auth:
  - name: pcs_auth__auth
  - nodes: {{ cluster_config["nodes"] }}
  - pcsuser: {{ cluster_config["pcsuser"] }}
  - pcspasswd: {{ cluster_config["pcspasswd"] }}

which gets rendered to:

pcs_cluster_salttest_auth:
  pcs.auth:
  - name: pcs_auth__auth
  - nodes: ['pcstest01.example.com', 'pcstest02.example.com', 'pcstest03.example.com']
  - pcsuser: hacluster
  - pcspasswd: haclusterpw

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Docker)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
Use the config shown above and apply the state.

Expected behavior
After changing the PCS-state to use stderr instead of stdout the state at least returned successfully which is what I expect. Yet I don't know if that might break something else.

Screenshots
I don't think screenshots would be of any help in this case.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

Master (Docker)

Salt Version:
          Salt: 3005.1
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.0
       libgit2: 1.1.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.17
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: 1.6.1
        Python: 3.7.13 (default, Apr 20 2022, 03:16:50)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 18.0.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.1
 
System Versions:
          dist: alpine 3.14.6 
        locale: UTF-8
       machine: x86_64
       release: 4.18.0-489.el8.x86_64
        system: Linux
       version: Alpine Linux 3.14.6 

Minion (VM, Rocky Linux 9)

Salt Version:
          Salt: 3005.1
 
Dependency Versions:
          cffi: 1.14.5
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.3
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: Not Installed
  pycryptodome: 3.14.0
        pygit2: Not Installed
        Python: 3.9.14 (main, Jan  9 2023, 00:00:00)
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 22.3.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: rocky 9.1 Blue Onyx
        locale: utf-8
       machine: x86_64
       release: 5.14.0-162.23.1.el9_1.x86_64
        system: Linux
       version: Rocky Linux 9.1 Blue Onyx

Additional context
Add any other context about the problem here.

@derdeagle derdeagle added Bug broken, incorrect, or confusing behavior needs-triage labels May 13, 2023
@derdeagle
Copy link
Author

derdeagle commented May 14, 2023

Taking a look at the PCS sources I think that commit "d4383f6cbd7986c5eb39b9cefaa8faefa175aca6" is causing the change. The first appearance of this commit is in the tag "v0.11.1.alpha.1~8" of PCS.

@OrangeDog OrangeDog added the dependency underlying Salt dependency issue label Oct 31, 2023
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 dependency underlying Salt dependency issue needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants