Skip to content

Commit 0794c85

Browse files
committed
test(ci): collect source-watcher diagnostics in cozyreport
Last run exposed 7 PackageSources stuck with Ready=Unknown reason=Progressing for 30 minutes (openbao-application, qdrant-application, vpn-application, vpa, linstor, virtualprivatecloud-application, capi-provider-bootstrap-kubeadm). PackageSourceReconciler copies its Ready condition straight from the owned ArtifactGenerator, so the real culprit lives in source-watcher — but the current cozyreport bundle does not include any source-watcher artifacts, so we cannot tell whether the OCIRepository fetch is the bottleneck, the ArtifactGenerator queue is starved, or something else entirely. Add a dedicated source-watcher section to hack/cozyreport.sh that captures: - all ArtifactGenerators (list + full YAML) - all OCIRepositories (list + full YAML) - source-watcher pod listing and full logs (current and previous) - events in cozy-fluxcd namespace Signed-off-by: Ivan Okhotnikov <[email protected]>
1 parent d1ee154 commit 0794c85

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎hack/cozyreport.sh‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,24 @@ kubectl get packagesources --no-headers | awk '$3 != "True"' | \
134134
kubectl describe packagesource $NAME > $DIR/describe.txt 2>&1
135135
done
136136

137+
echo "Collecting source-watcher diagnostics..."
138+
DIR=$REPORT_DIR/kubernetes/source-watcher
139+
mkdir -p $DIR
140+
# PackageSource copies its Ready condition straight from ArtifactGenerator.Status,
141+
# so a stuck PackageSource ultimately means a stuck ArtifactGenerator or its OCIRepository source.
142+
kubectl get artifactgenerators -A > $DIR/artifactgenerators.txt 2>&1 || true
143+
kubectl get artifactgenerators -A -o yaml > $DIR/artifactgenerators.yaml 2>&1 || true
144+
kubectl get ocirepositories -A > $DIR/ocirepositories.txt 2>&1 || true
145+
kubectl get ocirepositories -A -o yaml > $DIR/ocirepositories.yaml 2>&1 || true
146+
kubectl get pods -n cozy-fluxcd -l app.kubernetes.io/name=source-watcher -o wide > $DIR/pods.txt 2>&1 || true
147+
kubectl get pods -n cozy-fluxcd -l app.kubernetes.io/name=source-watcher -o name 2>/dev/null | \
148+
while read POD; do
149+
POD=${POD#pod/}
150+
kubectl logs -n cozy-fluxcd $POD --all-containers --prefix --tail=2000 > $DIR/$POD.log 2>&1 || true
151+
kubectl logs -n cozy-fluxcd $POD --all-containers --prefix --tail=2000 --previous > $DIR/$POD-previous.log 2>&1 || true
152+
done
153+
kubectl get events -n cozy-fluxcd --sort-by=.lastTimestamp > $DIR/events.txt 2>&1 || true
154+
137155
echo "Collecting cozystack apps..."
138156
DIR=$REPORT_DIR/cozystack-apps
139157
mkdir -p $DIR

0 commit comments

Comments
 (0)