Skip to content

Commit

Permalink
Merge pull request #6100 from pmem/pmem_ras-fix
Browse files Browse the repository at this point in the history
common: increase PMEM RAS' sensitivity
  • Loading branch information
janekmi committed Jun 19, 2024
2 parents 5e51a25 + 3874e91 commit 0f3c4ec
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/pmem_ras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ jobs:
linux:
name: PMEM_RAS
if: github.repository == 'pmem/pmdk'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [[self-hosted, ras_controller]]
runs-on: [self-hosted, ras_controller]
env:
WORKDIR: utils/gha-runners

Expand All @@ -50,16 +46,15 @@ jobs:
# 'sed' command is used to filter out IP addresses from the ansible output, it will show up as the 'ras_runner' instead.
# 'tee' command is used to save the overall output to the file. This file is needed for the next step.
- name: Prepare and run RAS Linux tests via ansible-playbook
run: |
cd $WORKDIR
ansible-playbook -i $ras_runner, run-ras-linux.yml -e "host=all ansible_user=$ras_user" | sed 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/ras_runner/' | tee playbook_output.txt
working-directory: ${{ env.WORKDIR }}
run: ansible-playbook -i $ras_runner, run-ras-linux.yml -e "host=all ansible_user=$ras_user" | sed 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/ras_runner/' | tee playbook_output.txt

# This simple step will look through the output in search of specific fail strings.
# If any phrase is found in the file, the workflow will fail.
# The workflow will fail if any of the expected phrases are found in the file.
- name: Fail the workflow if the playbook finished with a failure
working-directory: ${{ env.WORKDIR }}
run: |
cd $WORKDIR
if grep -E 'fatal: \[ras_runner\]: FAILED!|failed: \[ras_runner\]' "playbook_output.txt"; then
if grep -E '(fatal|failed): \[ras_runner\]' playbook_output.txt; then
exit 1
else
exit 0
Expand Down

0 comments on commit 0f3c4ec

Please sign in to comment.