Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Acceptance test saves Docker container logs, but only for those still running at the end of the test. It should collect logs from stopped containers, too.

https://issues.apache.org/jira/browse/HDDS-11106

How was this patch tested?

Changed ozone/test.sh to simulate stopped container:

COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export COMPOSE_DIR

export SECURITY_ENABLED=false
export OZONE_REPLICATION_FACTOR=3

# shellcheck source=/dev/null
source "$COMPOSE_DIR/../testlib.sh"

start_docker_env

sleep 30
docker-compose ps
docker-compose stop httpfs recon

sleep 30
docker-compose ps

sleep 30

Log files after "test" finished:

$ ls -1sh result
total 656K
   0 dn-audit-2581c25f46e7.log
   0 dn-audit-71ca6309050a.log
   0 dn-audit-90d141c9629a.log
116K docker-ozone-datanode-2.log
124K docker-ozone-datanode-3.log
 16K docker-ozone-httpfs-1.log
108K docker-ozone-om-1.log
 76K docker-ozone-recon-1.log
 40K docker-ozone-s3g-1.log
148K docker-ozone-scm-1.log
4.0K om-audit-63d6dd0df5be.log
   0 s3g-audit-0bbd3a47ba4e.log
 24K scm-audit-0b998d695c2b.log

Without the patch, logs for httpfs and recon are missing:

$ ls -1sh result
total 624K
   0 dn-audit-09c25669fa47.log
   0 dn-audit-aad129e3fa83.log
   0 dn-audit-d8981fc63cc9.log
148K docker-ozone-datanode-2.log
140K docker-ozone-datanode-3.log
104K docker-ozone-om-1.log
 40K docker-ozone-s3g-1.log
160K docker-ozone-scm-1.log
   0 om-audit-ec2b7675c0fa.log
   0 s3g-audit-fa2b1d870aa0.log
 32K scm-audit-7750e6277429.log

@adoroszlai adoroszlai self-assigned this Jul 7, 2024
@adoroszlai adoroszlai requested review from sadanand48 and smengcl July 7, 2024 17:58
Copy link
Contributor

@sadanand48 sadanand48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai for the patch, LGTM.

@adoroszlai adoroszlai merged commit 3e70cf4 into apache:master Jul 8, 2024
@adoroszlai adoroszlai deleted the HDDS-11106 branch July 8, 2024 15:25
@adoroszlai
Copy link
Contributor Author

Thanks @sadanand48 for the review.

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