feat: add playbook labels to all alerts#310
Conversation
Every alert now has a `playbook:` label pointing to the corresponding page on operations.global.cloud.sap. This enables one-click navigation from alert notifications to triage procedures. Ref: PlusOne/CPE-KVM#236
|
Warning Review limit reached
More reviews will be available in 49 minutes and 24 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds playbook references to ten alert rules across the hypervisor operator alerting configuration. Three eviction-lifecycle alerts and seven operator-status alerts each gain a ChangesAlert playbook references
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/openstack-hypervisor-operator/alerts/operator.yaml`:
- Line 14: operator.yaml contains broken playbook links pointing at
docs/compute/kvm/playbooks/* (e.g., hypervisoronboardingstuck,
hypervisorevictionstuck, hypervisorevictedtoolong, hypervisortraitsyncfailed,
hypervisoraggregatesyncfailed, hypervisorreconcileerrors,
hypervisoroperatordown) that do not exist; either create corresponding
documentation pages at docs/compute/kvm/playbooks/<playbook-name> (preferably
markdown files with the playbook content and frontmatter) or update the paths in
charts/openstack-hypervisor-operator/alerts/operator.yaml (and any other files
referencing the same paths such as alerts/eviction.yaml) to point to the correct
existing doc location so all listed playbook links resolve.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 17e342e5-fb44-4b02-94a6-360994427244
📒 Files selected for processing (2)
charts/openstack-hypervisor-operator/alerts/eviction.yamlcharts/openstack-hypervisor-operator/alerts/operator.yaml
| labels: | ||
| severity: warning | ||
| type: hypervisor_operator | ||
| playbook: docs/compute/kvm/playbooks/hypervisoronboardingstuck |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify operator playbook documentation exists
# Expected: Find references to these playbook paths in the repository or documentation
echo "Searching for operator playbook path references..."
rg -i "hypervisoronboardingstuck|hypervisorevictionstuck|hypervisorevictedtoolong|hypervisortraitsyncfailed|hypervisoraggregatesyncfailed|hypervisorreconcileerrors|hypervisoroperatordown" \
--type md --type yaml -g '!alerts/' -C2
echo -e "\nSearching for playbook documentation structure..."
fd -t f -e md -i hypervisor | head -20Repository: cobaltcore-dev/openstack-hypervisor-operator
Length of output: 676
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "1) Search for exact referenced playbook paths..."
rg -n --hidden --no-ignore-vcs \
-S "docs/compute/kvm/playbooks/(hypervisoronboardingstuck|hypervisorevictionstuck|hypervisorevictedtoolong|hypervisortraitsyncfailed|hypervisoraggregatesyncfailed|hypervisorreconcileerrors|hypervisoroperatordown)" \
. || true
echo
echo "2) List any files whose path includes docs/compute/kvm/playbooks/"
fd -t f -i --type f "hypervisoronboardingstuck" . || true
fd -t f -i --type f "hypervisorevictionstuck" . || true
fd -t f -i --type f "hypervisorevictedtoolong" . || true
fd -t f -i --type f "hypervisortraitsyncfailed" . || true
fd -t f -i --type f "hypervisoraggregatesyncfailed" . || true
fd -t f -i --type f "hypervisorreconcileerrors" . || true
fd -t f -i --type f "hypervisoroperatordown" . || true
echo
echo "3) Check if docs/compute/kvm/playbooks exists and show a sample listing..."
if [ -d "docs/compute/kvm/playbooks" ]; then
ls -la "docs/compute/kvm/playbooks" | head -200
else
echo "Directory not found: docs/compute/kvm/playbooks"
fi
echo
echo "4) Search for 'playbooks/' directory references in charts docs..."
rg -n "compute/kvm/playbooks/" -S . || trueRepository: cobaltcore-dev/openstack-hypervisor-operator
Length of output: 2620
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "1) Search for exact referenced playbook paths..."
rg -n --hidden --no-ignore-vcs \
-S "docs/compute/kvm/playbooks/(hypervisoronboardingstuck|hypervisorevictionstuck|hypervisorevictedtoolong|hypervisortraitsyncfailed|hypervisoraggregatesyncfailed|hypervisorreconcileerrors|hypervisoroperatordown)" \
. || true
echo
echo "2) Locate any files by playbook name substring (any location, case-insensitive)..."
fd -t f -i "hypervisoronboardingstuck" .
fd -t f -i "hypervisorevictionstuck" .
fd -t f -i "hypervisorevictedtoolong" .
fd -t f -i "hypervisortraitsyncfailed" .
fd -t f -i "hypervisoraggregatesyncfailed" .
fd -t f -i "hypervisorreconcileerrors" .
fd -t f -i "hypervisoroperatordown" .
echo
echo "3) Check if docs/compute/kvm/playbooks exists and show a sample listing..."
if [ -d "docs/compute/kvm/playbooks" ]; then
ls -la "docs/compute/kvm/playbooks" | head -200
else
echo "Directory not found: docs/compute/kvm/playbooks"
fi
echo
echo "4) Search for playbooks/ directory references..."
rg -n "compute/kvm/playbooks/" -S . || trueRepository: cobaltcore-dev/openstack-hypervisor-operator
Length of output: 2620
Fix broken playbook doc references (docs/compute/kvm/playbooks/*) in operator.yaml
charts/openstack-hypervisor-operator/alerts/operator.yaml adds playbook links for:
hypervisoronboardingstuck,hypervisorevictionstuck,hypervisorevictedtoolong,hypervisortraitsyncfailed,hypervisoraggregatesyncfailed,hypervisorreconcileerrors,hypervisoroperatordown
But docs/compute/kvm/playbooks/ does not exist anywhere in this repo (only these references are present, including in alerts/eviction.yaml). Ensure the corresponding playbook docs/pages are added at docs/compute/kvm/playbooks/ (or update the paths to the correct location) before merging.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/openstack-hypervisor-operator/alerts/operator.yaml` at line 14,
operator.yaml contains broken playbook links pointing at
docs/compute/kvm/playbooks/* (e.g., hypervisoronboardingstuck,
hypervisorevictionstuck, hypervisorevictedtoolong, hypervisortraitsyncfailed,
hypervisoraggregatesyncfailed, hypervisorreconcileerrors,
hypervisoroperatordown) that do not exist; either create corresponding
documentation pages at docs/compute/kvm/playbooks/<playbook-name> (preferably
markdown files with the playbook content and frontmatter) or update the paths in
charts/openstack-hypervisor-operator/alerts/operator.yaml (and any other files
referencing the same paths such as alerts/eviction.yaml) to point to the correct
existing doc location so all listed playbook links resolve.
Without a ServiceMonitor, Prometheus cannot scrape the operator pod. This means HypervisorOperatorDown and HypervisorOperatorReconcileErrors alerts are blind (no up metric, no reconcile_errors_total). Enabled by default with 60s scrape interval.
Summary
playbook:label to all 10 alerts (7 in operator.yaml, 3 in eviction.yaml)Alerts updated
hypervisoronboardingstuckhypervisorevictionstuckhypervisorevictedtoolonghypervisortraitsyncfailedhypervisoraggregatesyncfailedhypervisorreconcileerrorshypervisoroperatordownevictionfailedevictionmigrationfailingevictionoutstandingramRef: PlusOne/CPE-KVM#236
Test plan
Summary by CodeRabbit