Skip to content

zed: yoga merge #899

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

Merged
merged 6 commits into from
Jan 29, 2024
Merged
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
39 changes: 39 additions & 0 deletions etc/kayobe/ansible/reset-bls-entries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# Custom playbook to reset Boot Loader Specification (BLS) entries to resolve
# an issue with GRUB defaulting to an old kernel. This is adapted from a Bash
# script in diskimage-builder:
# https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/rhel/post-install.d/03-reset-bls-entries

- name: Reset BLS entries
hosts: overcloud
become: true
tags:
- reset-bls-entries
tasks:
- name: Get machine ID
command: cat /etc/machine-id
register: machine_id
check_mode: false

- name: Find entries with wrong machine ID
ansible.builtin.find:
paths: /boot/loader/entries
patterns: "*.conf"
register: bls_entries
check_mode: false

# We set force to false to avoid replacing an existing BLS entry with the
# correct machine ID.
- name: Rename entries with wrong machine ID
copy:
src: "/boot/loader/entries/{{ item }}"
dest: "/boot/loader/entries/{{ item | ansible.builtin.regex_replace('^[a-f0-9]*', machine_id.stdout) }}"
force: false
remote_src: true
with_items: "{{ bls_entries.files | map(attribute='path') | reject('search', machine_id.stdout) | map('basename') }}"

- name: Remove entries with wrong machine ID
file:
path: "/boot/loader/entries/{{ item }}"
state: absent
with_items: "{{ bls_entries.files | map(attribute='path') | reject('search', machine_id.stdout) | map('basename') }}"
1 change: 1 addition & 0 deletions etc/kayobe/environments/ci-aio/automated-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cat << EOF | sudo tee -a /etc/hosts
EOF

if sudo vgdisplay | grep -q lvm2; then
sudo pvresize $(sudo pvs --noheadings | head -n 1 | awk '{print $1}')
sudo lvextend -L 4G /dev/rootvg/lv_home -r || true
sudo lvextend -L 4G /dev/rootvg/lv_tmp -r || true
fi
Expand Down
9 changes: 0 additions & 9 deletions etc/kayobe/kolla/config/prometheus/cadvisor.rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ groups:
summary: "Container Volume usage (instance {{ $labels.instance }})"
description: "Container Volume usage is above 80%"

- alert: ContainerVolumeIoUsage
expr: (sum(container_fs_io_current{name!=""}) BY (instance, name) * 100) > 80
for: 5m
labels:
severity: warning
annotations:
summary: "Container Volume IO usage (instance {{ $labels.instance }})"
description: "Container Volume IO usage is above 80%"

- alert: ContainerHighThrottleRate
expr: rate(container_cpu_cfs_throttled_seconds_total[3m]) > 1
for: 1m
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Removes bogus ContainerVolumeUsage alert. This rule wasn't correctly measuring
container volume IO and could cause spurious alerts.
7 changes: 7 additions & 0 deletions releasenotes/notes/reset-bls-entries-b2bded62c5887937.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Add a new ``reset-bls-entries.yml`` custom playbook which will rename
existing Boot Loader Specification (BLS) entries using the current machine
ID for each host. This should fix an issue with Grub not selecting the most
recent kernel during boot.