-
Notifications
You must be signed in to change notification settings - Fork 593
[aap_containerized] Collect same commands like other AAP plugins #4168
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
[aap_containerized] Collect same commands like other AAP plugins #4168
Conversation
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
|
@pmoravec at first glance this looks perfect. I will test it on multi-host and single host deployment as well. |
|
Hello @pmoravec this works as expected. Only change is to mask the |
Let collect same command outputs from containerized deployments, likewise we do collect from RPM based deployments in all other aap_* plugins today. Closes: sosreport#4168 Signed-off-by: Pavel Moravec <[email protected]>
5b0d868 to
ae7bb92
Compare
|
Good point. Obfuscation added, tested locally it works: |
| self.add_cmd_output(f"su - {username} -c 'podman exec -it" | ||
| f" {pod} bash -c \"{cmd}\"'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have probably discussed this in the past, but just for completeness sake, does runas not function here to avoid the embedded su calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont recall the original reason, but when I tried to use runas=username now, I am getting hung processes like:
aap 152503 0.0 0.0 3068 1664 pts/1 S 19:44 0:00 timeout 300s podman exec -it automation-controller-task bash -c awx-manage check_license --data
aap 152505 0.0 0.3 2023996 53964 pts/1 Sl 19:44 0:00 podman exec -it automation-controller-task bash -c awx-manage check_license --data
~~~
hung for minutes (while manual execution of the same takes a fraction of second).
TurboTurtle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM up to the comment about runas vs su. I'm fine if it goes in as written if there are outstanding issues preventing the use of runas, which I believe there may be.
|
Worth commenting the need of |
|
Couldn't hurt to add a comment or TODO on investigating how to get this working without the embedded |
Let collect same command outputs from containerized deployments, likewise we do collect from RPM based deployments in all other aap_* plugins today. Closes: sosreport#4168 Signed-off-by: Pavel Moravec <[email protected]>
ae7bb92 to
07cc430
Compare
|
I spent some time trying to identify the cause but without a luck. So I added just the explanation to the code. |
Let collect same command outputs from containerized deployments, likewise we do collect from RPM based deployments in all other aap_* plugins today.
Closes: #4168
Relevant-to: RHEL-129225
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines