Browse Source

test-log-collect.sh: Verify journal consinstency before gathering logs

Change-Id: I7633d4cf4c3b8aa7e8a76710b26f2a97efad5b85
Markos Chandras 9 months ago
parent
commit
57949bdd13
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      test-log-collect.sh

+ 4
- 0
test-log-collect.sh View File

@@ -197,6 +197,10 @@ store_artifacts /var/log/ "${WORKING_DIR}/logs/host"
197 197
 # Store the ara sqlite database in the openstack-ci expected path
198 198
 store_artifacts "${TESTING_HOME}/.ara/ansible.sqlite" "${WORKING_DIR}/logs/ara-report/"
199 199
 
200
+# Verify the integrity of the journal files but do not fail if one of them is not usable
201
+echo "Verifying journal files consistency..."
202
+find /var/log/journal/ -type f -name "*.journal" -exec bash -c 'sudo journalctl --file={} --verify || true' \;
203
+
200 204
 # Gather host etc artifacts
201 205
 for service in ${COMMON_ETC_LOG_NAMES}; do
202 206
     store_artifacts "/etc/${service}" "${WORKING_DIR}/logs/etc/host/"

Loading…
Cancel
Save