Skip to content

Commit

Permalink
Merge pull request #1257 from stackhpc/hook-hostname-fix
Browse files Browse the repository at this point in the history
Add hooks for fixing hostname bug in Multinode for Caracal upgrade job
  • Loading branch information
markgoddard authored Sep 11, 2024
2 parents f693a52 + 043644b commit b5bdd8a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions etc/kayobe/ansible/fix-hostname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@
cmd: hostnamectl set-hostname "{{ inventory_hostname }}"
when: current_hostname.stdout != inventory_hostname
become: true

- name: Reboot hosts
import_playbook: "{{ playbook_dir | realpath }}/reboot.yml"
vars:
reboot_hosts: fix-hostname
when: current_hostname.stdout != inventory_hostname
2 changes: 1 addition & 1 deletion etc/kayobe/ansible/reboot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Reboot the host
hosts: seed-hypervisor:seed:overcloud:infra-vms
hosts: "{{ reboot_hosts | default('seed-hypervisor:seed:overcloud:infra-vms') }}"
serial: "{{ lookup('env', 'ANSIBLE_SERIAL') | default(1, true) }}"
gather_facts: false
vars:
Expand Down
2 changes: 1 addition & 1 deletion etc/kayobe/environments/ci-multinode/inventory/groups
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
controllers

[fix-hostname:children]
storage
overcloud
3 changes: 3 additions & 0 deletions etc/kayobe/environments/ci-multinode/reboot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# Ensure that the reboot playbook is always executed using the boostrap user
reboot_with_bootstrap_user: true

0 comments on commit b5bdd8a

Please sign in to comment.