Skip to content

Commit 14f8eda

Browse files
authored
Merge pull request #899 from stackhpc/zed-yoga-merge
zed: yoga merge
2 parents 5b2b98b + f05a3cf commit 14f8eda

File tree

5 files changed

+52
-9
lines changed

5 files changed

+52
-9
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
# Custom playbook to reset Boot Loader Specification (BLS) entries to resolve
3+
# an issue with GRUB defaulting to an old kernel. This is adapted from a Bash
4+
# script in diskimage-builder:
5+
# https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/rhel/post-install.d/03-reset-bls-entries
6+
7+
- name: Reset BLS entries
8+
hosts: overcloud
9+
become: true
10+
tags:
11+
- reset-bls-entries
12+
tasks:
13+
- name: Get machine ID
14+
command: cat /etc/machine-id
15+
register: machine_id
16+
check_mode: false
17+
18+
- name: Find entries with wrong machine ID
19+
ansible.builtin.find:
20+
paths: /boot/loader/entries
21+
patterns: "*.conf"
22+
register: bls_entries
23+
check_mode: false
24+
25+
# We set force to false to avoid replacing an existing BLS entry with the
26+
# correct machine ID.
27+
- name: Rename entries with wrong machine ID
28+
copy:
29+
src: "/boot/loader/entries/{{ item }}"
30+
dest: "/boot/loader/entries/{{ item | ansible.builtin.regex_replace('^[a-f0-9]*', machine_id.stdout) }}"
31+
force: false
32+
remote_src: true
33+
with_items: "{{ bls_entries.files | map(attribute='path') | reject('search', machine_id.stdout) | map('basename') }}"
34+
35+
- name: Remove entries with wrong machine ID
36+
file:
37+
path: "/boot/loader/entries/{{ item }}"
38+
state: absent
39+
with_items: "{{ bls_entries.files | map(attribute='path') | reject('search', machine_id.stdout) | map('basename') }}"

etc/kayobe/environments/ci-aio/automated-setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cat << EOF | sudo tee -a /etc/hosts
77
EOF
88

99
if sudo vgdisplay | grep -q lvm2; then
10+
sudo pvresize $(sudo pvs --noheadings | head -n 1 | awk '{print $1}')
1011
sudo lvextend -L 4G /dev/rootvg/lv_home -r || true
1112
sudo lvextend -L 4G /dev/rootvg/lv_tmp -r || true
1213
fi

etc/kayobe/kolla/config/prometheus/cadvisor.rules

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ groups:
3333
summary: "Container Volume usage (instance {{ $labels.instance }})"
3434
description: "Container Volume usage is above 80%"
3535

36-
- alert: ContainerVolumeIoUsage
37-
expr: (sum(container_fs_io_current{name!=""}) BY (instance, name) * 100) > 80
38-
for: 5m
39-
labels:
40-
severity: warning
41-
annotations:
42-
summary: "Container Volume IO usage (instance {{ $labels.instance }})"
43-
description: "Container Volume IO usage is above 80%"
44-
4536
- alert: ContainerHighThrottleRate
4637
expr: rate(container_cpu_cfs_throttled_seconds_total[3m]) > 1
4738
for: 1m
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Removes bogus ContainerVolumeUsage alert. This rule wasn't correctly measuring
5+
container volume IO and could cause spurious alerts.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Add a new ``reset-bls-entries.yml`` custom playbook which will rename
5+
existing Boot Loader Specification (BLS) entries using the current machine
6+
ID for each host. This should fix an issue with Grub not selecting the most
7+
recent kernel during boot.

0 commit comments

Comments
 (0)