Skip to content

Commit 005c267

Browse files
authored
chore: add disk reference to the recovery docs (#753)
* chore: add timesyncd support this change will ensure that we're using timesyncd when configuring hosts. Signed-off-by: Kevin Carter <[email protected]> * chore: add disk reference to the recovery docs Signed-off-by: Kevin Carter <[email protected]> * fix: move timesyncd tasks to main Signed-off-by: Kevin Carter <[email protected]> --------- Signed-off-by: Kevin Carter <[email protected]>
1 parent 40a7b50 commit 005c267

File tree

7 files changed

+36
-11
lines changed

7 files changed

+36
-11
lines changed

ansible/inventory/genestack/group_vars/all/all.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ kube_webhook_token_auth_url_skip_tls_verify: false
124124

125125
## NTP Settings
126126
# Start the ntpd or chrony service and enable it at system boot.
127-
ntp_enabled: true
128-
ntp_manage_config: true
127+
ntp_enabled: false
128+
ntp_manage_config: false
129129
ntp_servers:
130130
- "0.pool.ntp.org iburst"
131131
- "1.pool.ntp.org iburst"

ansible/roles/host_setup/defaults/main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,8 @@ host_specific_kernel_modules: []
128128
# Optional user defined list of sysctl options in the same dict item format as
129129
# above.
130130
user_kernel_options: []
131+
132+
# Limited to two servers, the first one is the primary and the second one is the backup.
133+
host_ntp_server:
134+
- 0.pool.ntp.org
135+
- 1.pool.ntp.org

ansible/roles/host_setup/handlers/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@
3838
name: "queue_max.service"
3939
state: "restarted"
4040
enabled: true
41+
42+
- name: Reload systemd-timesyncd
43+
ansible.builtin.systemd:
44+
name: systemd-timesyncd.service
45+
state: restarted
46+
enabled: true

ansible/roles/host_setup/tasks/main.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,16 @@
122122
retries: 5
123123
delay: 2
124124

125-
# this is added to remove conflicts with systemd-timesyncd and ntpsec with kubespray installation
126-
- name: Ensure conflicting time synchronization packages are removed
127-
package:
128-
name:
129-
- ntpsec
130-
- systemd-timesyncd
131-
state: absent
132-
purge: yes
125+
- name: Ensure timesyncd is running
126+
ansible.builtin.service:
127+
name: systemd-timesyncd
128+
state: started
129+
enabled: true
130+
notify: Reload systemd-timesyncd
131+
132+
- name: Create systemd-timesyncd configuration file
133+
ansible.builtin.template:
134+
src: timesyncd.conf.j2
135+
dest: /etc/systemd/timesyncd.conf
136+
mode: "0644"
137+
notify: Reload systemd-timesyncd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Time]
2+
NTP={{ host_ntp_server | first }}
3+
FallbackNTP={{ host_ntp_server | last }}
4+
#RootDistanceMaxSec=5
5+
#PollIntervalMinSec=32
6+
#PollIntervalMaxSec=2048
7+
#ConnectionRetrySec=30
8+
#SaveIntervalSec=60

ansible/roles/host_setup/vars/ubuntu.yml

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ _host_distro_packages:
5555
- rsync
5656
- software-properties-common
5757
- sysstat
58+
- systemd-timesyncd
5859
- time
5960
- vlan
6061
- wget

docs/openstack-data-disk-recovery.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ modprobe nbd max_part=8
3838
### Connect qemu-nbd to the Disk File
3939

4040
``` shell
41-
qemu-nbd --connect=/dev/nbd0 /var/lib/nova/instances/00000000-0000-0000-0000-000000000000
41+
qemu-nbd --connect=/dev/nbd0 /var/lib/nova/instances/00000000-0000-0000-0000-000000000000/disk
4242
```
4343

4444
- This command associates the instance disk file with the `/dev/nbd0` block device.

0 commit comments

Comments
 (0)