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

Upload container logs for live tests #15713

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

AlanCoding
Copy link
Member

SUMMARY

Looking at #15705, it seems the task manager isn't running, ping @jessicamack

We need to see the logs to get hints as to what is happening, but the tests don't upload the logs.

The "live" tests are weird, sometimes server logs are emitted in the pytest process, which are captured in the test output. But it's split, because some work is ping-ponged to the task system, so those logs can only be obtained by asynchronous getting the server logs after the tests finish.

This is already a solved problem, but wasn't solved for these tests.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@jessicamack jessicamack self-requested a review December 18, 2024 19:55
@AlanCoding
Copy link
Member Author

The output is inside the "docker-compose-logs" artifact, which extracts as a folder.

Current name is live-tests-.log. Has some stuff like:

2024-12-18 19:42:44,421 WARN exited: awx-rsyslogd (exit status 1; not expected)
2024-12-18 19:42:44,422 INFO spawned: 'awx-rsyslogd' with pid 2114
rsyslogd: could not open config file '/var/lib/awx/rsyslog/rsyslog.conf': Permission denied [v8.2102.0-106.el9 try https://www.rsyslog.com/e/2104 ]
rsyslogd: run failed with error -2104 (see rsyslog.h or try https://www.rsyslog.com/e/2104 to learn what that number means)
2024-12-18 19:42:44,430 INFO success: awx-rsyslogd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-12-18 19:42:44,430 WARN exited: awx-rsyslogd (exit status 1; not expected)
awx-rsyslogd stderr | rsyslogd: could not open config file '/var/lib/awx/rsyslog/rsyslog.conf': Permission denied [v8.2102.0-106.el9 try https://www.rsyslog.com/e/2104 ]
awx-rsyslogd stderr | rsyslogd: run failed with error -2104 (see rsyslog.h or try https://www.rsyslog.com/e/2104 to learn what that number means)
awx-rsyslogd stderr | 

@AlanCoding
Copy link
Member Author

I got rid of the trailing - character because the stuff after that failed to template anything (was blank).

Once the checks pass here I'll be happy to merge this.

@jessicamack
Copy link
Member

The output is inside the "docker-compose-logs" artifact, which extracts as a folder.

Current name is live-tests-.log. Has some stuff like:

2024-12-18 19:42:44,421 WARN exited: awx-rsyslogd (exit status 1; not expected)
2024-12-18 19:42:44,422 INFO spawned: 'awx-rsyslogd' with pid 2114
rsyslogd: could not open config file '/var/lib/awx/rsyslog/rsyslog.conf': Permission denied [v8.2102.0-106.el9 try https://www.rsyslog.com/e/2104 ]
rsyslogd: run failed with error -2104 (see rsyslog.h or try https://www.rsyslog.com/e/2104 to learn what that number means)
2024-12-18 19:42:44,430 INFO success: awx-rsyslogd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-12-18 19:42:44,430 WARN exited: awx-rsyslogd (exit status 1; not expected)
awx-rsyslogd stderr | rsyslogd: could not open config file '/var/lib/awx/rsyslog/rsyslog.conf': Permission denied [v8.2102.0-106.el9 try https://www.rsyslog.com/e/2104 ]
awx-rsyslogd stderr | rsyslogd: run failed with error -2104 (see rsyslog.h or try https://www.rsyslog.com/e/2104 to learn what that number means)
awx-rsyslogd stderr | 

what could have caused the permission issue here? it was fine previously and I don't remember any work around that being merged recently?

@jessicamack jessicamack enabled auto-merge (squash) December 18, 2024 20:06
@jessicamack jessicamack merged commit 65b104e into ansible:devel Dec 18, 2024
23 of 25 checks passed
@AlanCoding
Copy link
Member Author

I don't know. Pasting some from output:

2024-12-18T20:03:52.3629437Z #49 [stage-2 19/34] ADD tools/ansible/roles/dockerfile/files/rsyslog.conf /var/lib/awx/rsyslog/rsyslog.conf
2024-12-18T20:03:52.3630015Z #49 CACHED

and later

2024-12-18T20:03:52.3595186Z #23 [stage-2 33/34] RUN for dir in       /var/lib/awx       /var/lib/awx/rsyslog       /var/lib/awx/rsyslog/conf.d       /var/lib/awx/.local/share/containers/storage       /var/run/awx-rsyslog       /var/log/nginx       /var/lib/pgsql       /var/run/supervisor       /var/run/awx-receptor       /var/lib/nginx ;     do mkdir -m 0775 -p $dir ; chmod g+rwx $dir ; chgrp root $dir ; done &&     for file in       /etc/subuid       /etc/subgid       /etc/group       /etc/passwd       /var/lib/awx/rsyslog/rsyslog.conf ;     do touch $file ; chmod g+rw $file ; chgrp root $file ; done
2024-12-18T20:03:52.3596871Z #23 CACHED
2024-12-18T20:03:52.3596965Z 

Locally I can confirm

bash-5.1$ ls -la /var/lib/awx/rsyslog/rsyslog.conf
-rw-r-----. 1 awx root 351 Dec 18 20:44 /var/lib/awx/rsyslog/rsyslog.conf

That all seems okay, I can read this as awx user.

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

Successfully merging this pull request may close these issues.

2 participants