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

draft: monitor disk size (using latest/edge) #535

Draft
wants to merge 1 commit into
base: track/1.17
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,22 @@ jobs:

- name: Run integration tests
run: |
./tools/disk-space.sh &
juju add-model test-istio
tox -e ${{ matrix.integration-types }} -- --model test-istio
echo ------------- TESTS FINISHED -----------"
date "+%H:%M:%S %d/%m/%y"
timeout-minutes: 80

- name: Setup Debug Artifact Collection
run: mkdir tmp
if: failure()

- name: Collect disk space monitoring logs
if: failure() || cancelled()
run: |
cat disk-size-logs.txt | tee tmp/disk-size-logs.txt

- name: Collect charmcraft logs
if: failure()
run: |
Expand Down Expand Up @@ -135,8 +143,16 @@ jobs:

- name: Run observability integration tests
run: |
./tools/disk-space.sh &
juju add-model cos-test
tox -vve cos-integration -- --model cos-test
echo ------------- TESTS FINISHED -----------"
date "+%H:%M:%S %d/%m/%y"

- run: kubectl get pod/prometheus-k8s-0 -n knative-test -o=jsonpath='{.status}'
if: failure()

- name: Collect disk space monitoring logs
if: failure() || cancelled()
run: |
cat disk-size-logs.txt | tee tmp/disk-size-logs.txt
12 changes: 12 additions & 0 deletions tools/disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Infinite loop
while true; do
# Display disk usage
date "+%H:%M:%S %d/%m/%y" >> disk-size-logs.txt
df -h >> disk-size-logs.txt
echo "---------------------------------------" >> disk-size-logs.txt

# Wait for 20 seconds
sleep 20
done
Loading