Skip to content

Commit 38e6382

Browse files
Vicente-Chengbk201connorkuehljillian-maroket
authored
doc: update the ntp configuration (#472)
Signed-off-by: Vicente Cheng <[email protected]> Co-authored-by: Kiefer Chang <[email protected]> Co-authored-by: Connor Kuehl <[email protected]> Co-authored-by: Jillian <[email protected]>
1 parent 8fca7a9 commit 38e6382

File tree

10 files changed

+64
-134
lines changed

10 files changed

+64
-134
lines changed

docs/host/host.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,33 @@ When Ksmtuned starts, initialize `pages_to_scan` in KSM to 1000 (**Minimum Pages
251251
KSM starts when the available memory falls below the **Threshold Coefficient**. If it detects that it is running, `pages_to_scan` increments by 300 (**Boost**) every minute until it reaches 5000 (**Maximum Pages**).
252252

253253
KSM will stop when the available memory is above the **Threshold Coefficient**. If it detects that it is stopped, `pages_to_scan` decrements by 100 (**Decay**) every minute until it reaches 1000 (**Minimum Pages**).
254+
255+
## NTP Configuration
256+
257+
Time synchronization is an important aspect of distributed cluster architecture. Because of this, Harvester now provides a simpler way for configuring NTP settings.
258+
259+
In previous Harvester versions, NTP settings were mainly configurable [during the installation process](https://docs.harvesterhci.io/v1.2/install/harvester-configuration#osntp_servers). To modify the settings, you needed to manually update the configuration file on each node.
260+
261+
Beginning with version v1.2.0, Harvester is supporting NTP configuration on the Harvester UI Settings screen (**Advanced** > **Settings**). You can configure NTP settings for the entire Harvester cluster at any time, and the settings are applied to all nodes in the cluster.
262+
263+
![](/img/v1.3/host/harvester-ntp-settings.png)
264+
265+
You can set up multiple NTP servers at once.
266+
267+
![](/img/v1.3/host/harvester-ntp-settings-multiple.png)
268+
269+
You can check the settings in the `node.harvesterhci.io/ntp-service` annotation in Kubernetes nodes:
270+
- `ntpSyncStatus`: Status of the connection to NTP servers (possible values: `disabled`, `synced` and `unsynced`)
271+
- `currentNtpServers`: List of existing NTP servers
272+
273+
```
274+
$ kubectl get nodes harvester-node-0 -o yaml |yq -e '.metadata.annotations.["node.harvesterhci.io/ntp-service"]'
275+
{"ntpSyncStatus":"synced","currentNtpServers":"0.suse.pool.ntp.org 1.suse.pool.ntp.org"}
276+
```
277+
278+
> **Note:**
279+
>
280+
> 1. Do not modify the NTP configuration file on each node. Harvester will automatically sync the settings that you configured on the Harvester UI to the nodes.
281+
> 1. If you upgraded Harvester from an earlier version, the **ntp-servers** list on the Settings screen will be empty (see screenshot). You must manually configure the NTP settings because Harvester is unaware of the previous settings and is unable to detect conflicts.
282+
283+
![](/img/v1.3/host/harvester-ntp-settings-empty.png)

docs/install/update-harvester-configuration.md

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -69,88 +69,9 @@ If you upgrade from a version before `v1.1.2`, the `cloud-init` file in examples
6969
7070
## NTP servers
7171
72-
### Runtime change
73-
74-
1. Log in to a Harvester node and become root. See [how to log into a Harvester node](../troubleshooting/os.md#how-to-log-in-to-a-harvester-node) for more details.
75-
1. Edit `/etc/systemd/timesyncd.conf` and specify NTP servers in the `NTP=` setting:
76-
77-
```
78-
[Time]
79-
NTP = 0.suse.pool.ntp.org 1.suse.pool.ntp.org
80-
```
81-
82-
1. Restart the `systemd-timesyncd.service` service:
83-
84-
```
85-
systemctl restart systemd-timesyncd.service
86-
```
87-
88-
1. Display the timesync status:
89-
90-
```
91-
timedatectl timesync-status
92-
```
93-
94-
### Configuration persistence
95-
96-
1. Backup the elemental `cloud-init` file `/oem/90_custom.yaml` as follows:
97-
98-
```
99-
cp /oem/90_custom.yaml /oem/install/90_custom.yaml.$(date --iso-8601=minutes)
100-
```
101-
102-
1. Edit `/oem/90_custom.yaml` and update the yaml path `stages.initramfs[0].timesyncd`. The `timesyncd` map must be in the following format:
103-
104-
```
105-
stages:
106-
initramfs:
107-
- ...
108-
timesyncd:
109-
NTP: 0.suse.pool.ntp.org 1.suse.pool.ntp.org
110-
```
111-
112-
1. Edit `/oem/90_custom.yaml` and update the yaml path `stages.initramfs[0].systemctl.enable`. The array must have the two services (`systemd-timesyncd` and `systemd-time-wait-sync`) enabled:
113-
114-
```
115-
stages:
116-
initramfs:
117-
- ...
118-
systemctl:
119-
enable:
120-
systemd-timesyncd
121-
systemd-time-wait-sync
122-
disable: []
123-
start: []
124-
mask: []
125-
```
126-
127-
## SSH keys of user `rancher`
128-
129-
### Runtime change
130-
131-
1. Log in to a Harvester node as user `rancher`. See [how to log into a Harvester node](../troubleshooting/os.md#how-to-log-in-to-a-harvester-node) for more details.
132-
1. Edit `/home/rancher/.ssh/authorized_keys` to add or remove keys.
133-
134-
### Configuration persistence
135-
136-
1. Backup the elemental `cloud-init` file `/oem/90_custom.yaml` as follows:
137-
138-
```
139-
cp /oem/90_custom.yaml /oem/install/90_custom.yaml.$(date --iso-8601=minutes)
140-
```
141-
142-
1. Edit `/oem/90_custom.yaml` and update the yaml path `stages.network[0].authorized_keys.rancher`. Add or remove keys in the `rancher` array:
143-
144-
```
145-
stages:
146-
network:
147-
- ...
148-
authorized_keys:
149-
rancher:
150-
- key1
151-
- key2
152-
```
72+
We introduce the new mechanism for the NTP configuration in Harvester v1.2.0.
15373
74+
For more information about NTP settings in Harvester v1.2.0 and later versions, see the [NTP servers](../host/host.md#ntp-configuration).
15475
15576
## Password of user `rancher`
15677
24.6 KB
Loading
79.5 KB
Loading
165 KB
Loading
24.6 KB
Loading
79.5 KB
Loading
165 KB
Loading

versioned_docs/version-v1.2/host/host.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,33 @@ When Ksmtuned starts, initialize `pages_to_scan` in KSM to 1000 (**Minimum Pages
251251
KSM starts when the available memory falls below the **Threshold Coefficient**. If it detects that it is running, `pages_to_scan` increments by 300 (**Boost**) every minute until it reaches 5000 (**Maximum Pages**).
252252

253253
KSM will stop when the available memory is above the **Threshold Coefficient**. If it detects that it is stopped, `pages_to_scan` decrements by 100 (**Decay**) every minute until it reaches 1000 (**Minimum Pages**).
254+
255+
## NTP Configuration
256+
257+
Time synchronization is an important aspect of distributed cluster architecture. Because of this, Harvester now provides a simpler way for configuring NTP settings.
258+
259+
In previous Harvester versions, NTP settings were mainly configurable [during the installation process](https://docs.harvesterhci.io/v1.2/install/harvester-configuration#osntp_servers). To modify the settings, you needed to manually update the configuration file on each node.
260+
261+
Beginning with version v1.2.0, Harvester is supporting NTP configuration on the Harvester UI Settings screen (**Advanced** > **Settings**). You can configure NTP settings for the entire Harvester cluster at any time, and the settings are applied to all nodes in the cluster.
262+
263+
![](/img/v1.2/host/harvester-ntp-settings.png)
264+
265+
You can set up multiple NTP servers at once.
266+
267+
![](/img/v1.2/host/harvester-ntp-settings-multiple.png)
268+
269+
You can check the settings in the `node.harvesterhci.io/ntp-service` annotation in Kubernetes nodes:
270+
- `ntpSyncStatus`: Status of the connection to NTP servers (possible values: `disabled`, `synced` and `unsynced`)
271+
- `currentNtpServers`: List of existing NTP servers
272+
273+
```
274+
$ kubectl get nodes harvester-node-0 -o yaml |yq -e '.metadata.annotations.["node.harvesterhci.io/ntp-service"]'
275+
{"ntpSyncStatus":"synced","currentNtpServers":"0.suse.pool.ntp.org 1.suse.pool.ntp.org"}
276+
```
277+
278+
> **Note:**
279+
>
280+
> 1. Do not modify the NTP configuration file on each node. Harvester will automatically sync the settings that you configured on the Harvester UI to the nodes.
281+
> 1. If you upgraded Harvester from an earlier version, the **ntp-servers** list on the Settings screen will be empty (see screenshot). You must manually configure the NTP settings because Harvester is unaware of the previous settings and is unable to detect conflicts.
282+
283+
![](/img/v1.2/host/harvester-ntp-settings-empty.png)

versioned_docs/version-v1.2/install/update-harvester-configuration.md

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -69,60 +69,9 @@ If you upgrade from a version before `v1.1.2`, the `cloud-init` file in examples
6969
7070
## NTP servers
7171
72-
### Runtime change
73-
74-
1. Log in to a Harvester node and become root. See [how to log into a Harvester node](../troubleshooting/os.md#how-to-log-in-to-a-harvester-node) for more details.
75-
1. Edit `/etc/systemd/timesyncd.conf` and specify NTP servers in the `NTP=` setting:
76-
77-
```
78-
[Time]
79-
NTP = 0.suse.pool.ntp.org 1.suse.pool.ntp.org
80-
```
81-
82-
1. Restart the `systemd-timesyncd.service` service:
83-
84-
```
85-
systemctl restart systemd-timesyncd.service
86-
```
87-
88-
1. Display the timesync status:
89-
90-
```
91-
timedatectl timesync-status
92-
```
93-
94-
### Configuration persistence
95-
96-
1. Backup the elemental `cloud-init` file `/oem/90_custom.yaml` as follows:
72+
We introduce the new mechanism for the NTP configuration in Harvester v1.2.0.
9773
98-
```
99-
cp /oem/90_custom.yaml /oem/install/90_custom.yaml.$(date --iso-8601=minutes)
100-
```
101-
102-
1. Edit `/oem/90_custom.yaml` and update the yaml path `stages.initramfs[0].timesyncd`. The `timesyncd` map must be in the following format:
103-
104-
```
105-
stages:
106-
initramfs:
107-
- ...
108-
timesyncd:
109-
NTP: 0.suse.pool.ntp.org 1.suse.pool.ntp.org
110-
```
111-
112-
1. Edit `/oem/90_custom.yaml` and update the yaml path `stages.initramfs[0].systemctl.enable`. The array must have the two services (`systemd-timesyncd` and `systemd-time-wait-sync`) enabled:
113-
114-
```
115-
stages:
116-
initramfs:
117-
- ...
118-
systemctl:
119-
enable:
120-
systemd-timesyncd
121-
systemd-time-wait-sync
122-
disable: []
123-
start: []
124-
mask: []
125-
```
74+
For more information about NTP settings in Harvester v1.2.0 and later versions, see the [NTP servers](../host/host.md#ntp-configuration).
12675
12776
## SSH keys of user `rancher`
12877

0 commit comments

Comments
 (0)