This CLI helper tool gathers all log lines related to resource | req-id from particular folder with logs. All related resources and their IDs used in Tempest tests are stored in machine-readable YAML file with the following format:
: status: PASSED|FAILED resources: <openstack-service name (nova|neutron|glance|keystone)>: <resource-name (port|server|security-group|router)>: <request-id (req-xxxx) >: name: <resource name (test-port-mytest|test-vm-)> id/uuid: request: http: error: status_code: <>
Extract/save all openstack logs to folder (ex. pod-logs)
Generate a tempest report using the report_parcer tool with the format as descideb above
Run log_helper tool using two options:
python3 log_helper.py <folder-with-logs> <tempest-report-yaml>
python3 log_helper.py <folder-with-logs> <resource-id>
or
python3 log_helper.py <folder-with-logs> <resource-id> <log-level>
Example:
python3 log_helper.py pod-logs req-aabbb391-ff60-4893-9b20-60f6a29749c9 ERROR