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

Pepper no longer respecting --out flag #228

Open
Zylatis opened this issue May 1, 2023 · 5 comments
Open

Pepper no longer respecting --out flag #228

Zylatis opened this issue May 1, 2023 · 5 comments

Comments

@Zylatis
Copy link

Zylatis commented May 1, 2023

Hi,

I have been using this without problem for a while but suddenly now all calls like pepper chase grains.item hub_info --out=json

return this

{
    "return": [
        {
            "chase": {
                "jid": "11111",
                "out": "nested",
                "ret": {
                    "data": {
                       <redacted>
                    }
                },
                "retcode": 0
            }
        }
    ]
}

which is borking my post processing a bit. I suspect maybe some weird package upgrade? I am on ubuntu and pepper 0.7.6 (i have tried an uninstall and reinstall etc)

@barneysowood
Copy link
Collaborator

Hi,

Thanks for the problem report. The --out option relies on an installed copy of salt to provide the outputters. Can you confirm what version of salt you have installed? Could you please include the output from salt --versions-report?

Thanks,

Barney

@ggiesen
Copy link

ggiesen commented Jul 17, 2023

Also encountering this issue. Might this be due to OneDir?

@ggiesen
Copy link

ggiesen commented Jul 17, 2023

FWIW I used a virtualenv to work around this (and installed a separate copy of Salt in it), whatever mechanism pip uses to generate an executable doesn't appear to work in relenv. Example state file:

pkg_python3-virtualenv:
  pkg.installed:
    - name: python3-virtualenv

virtualenv_/opt/pepper:
  virtualenv.managed:
    - name: /opt/pepper
    - user: root
    - pip_upgrade: True
    - pip_pkgs:
        - salt-pepper
        - salt
    - require:
        - pkg_python3-virtualenv

file_symlink_/usr/local/bin/pepper:
  file.symlink:
    - name: /usr/local/bin/pepper
    - target: /opt/pepper/bin/pepper

@ggiesen
Copy link

ggiesen commented Jul 18, 2023

According to @s0undt3ch, salt-pip should install the pepper script in /opt/saltstack/salt/extras-3.10/bin (it is not), so I've filed a bug in the salt repo: saltstack/salt#64662

@Sxderp
Copy link

Sxderp commented Oct 3, 2023

I believe this issue has to do with OneDir. The --output flag is only used to reach into Salt's outputters / renderers. It's likely masked since most installs of Pepper already have Salt installed. As OneDir migrations occur and the Salt modules are no longer available globally the issue will come up more often.

It's a bit annoying that the current solutions are:

  1. Install Pepper in the Salt directory with salt-pip (Ew).
  2. Install the entirety of Salt back into a global (or virtualenv) location /just/ for the outputters (Ew).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants