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

st2stream doesn't return errors to st2client #5317

Open
minsis opened this issue Aug 3, 2021 · 0 comments
Open

st2stream doesn't return errors to st2client #5317

minsis opened this issue Aug 3, 2021 · 0 comments
Labels

Comments

@minsis
Copy link
Contributor

minsis commented Aug 3, 2021

SUMMARY

This is specific to a pack install and I'm not sure if anything else is affected by st2stream not returning errors to st2client.

Carrying part of the conversion over from #5303 (comment)

The scenario here is when installing a pack without having the global stream_view permissions st2stream errors out, but never sends that error back to st2client to inform the user. The error is however logged in the st2stream log file.

STACKSTORM VERSION

Known versions this happens on
st2 3.4.1, on Python 3.6.8
st2 3.5.0, on Python 3.6.8

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/

  • OL7
  • HA install with a controller node running web, redis, rabbitmq, and mongo and 2 cluster nodes running everything else.

Steps to reproduce the problem

See the setup is in the other thread as its specific to RBAC and nothing else.

Expected Results

st2stream should return an error to st2client so it can be reported to the user as to what the failure is.

The log does record this error

2021-08-03 19:02:29,809 139735081647144 DEBUG error_handling [-] API call failed: User "packuser" doesn't have required permission "stream_view" (exception_class='ResourceTypeAccessDeniedError',exception_message='User "packuser" doesn\'t have required permission "stream_view"',exception_data={'permission_type': 'stream_view', 'user_db': <UserDB: UserDB(id=60f6a1e06a82029b060389a6, is_service=False, name="packuser", nicknames={})>})

Actual Results

Without the st2stream returning an error st2client fails out with an AttributeError exception. The process(s) still continues in the background. The full debug output is also in the other thread.

Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/shell.py", line 408, in run
    func(args)
  File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/commands/resource.py", line 48, in decorate
    return func(*args, **kwargs)
  File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/commands/pack.py", line 274, in run_and_print
    packs = instance.result['output']['packs_list']
AttributeError: 'Execution' object has no attribute 'result'

Thanks!

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

No branches or pull requests

2 participants