We have an easy way to check the syntax of the corosync config:
However, I see that
(aside: this came up for me because the Corosync documentation recommends using hostnames and I only found out that Proxmox recommends against it when running pve7to8 last year... and I never changed it because, well, y'know, you don't touch corosync when you don't have to)
What tool(s) is
Any other ideas for config linting strategies?
Backstory
This topic of linting corosync came up while I was in the Weehooey Proxmox training and we talked about about the syntactic check, but didn't know if there was a semantic check.
When thinking about how to help detect and prevent issues like https://forum.proxmox.com/threads/the-pve-cluster-mysteriously-rebooted-almost-simultaneously.164851, I remembered about the semantic checks of
corosync -t -c /etc/pve/corosync.confHowever, I see that
pve7to8 will check the semantics of the corosync config. For example:
Code:
Checking nodelist entries..
WARN: pve1: ring0_addr 'pve1-corosync-0' resolves to '172.16.3.31'.
Consider replacing it with the currently resolved IP address.
WARN: pve2: ring0_addr 'pve2-corosync-0' resolves to '172.16.3.32'.
Consider replacing it with the currently resolved IP address.
WARN: pve3: ring0_addr 'pve3-corosync-0' resolves to '172.16.3.33'.
Consider replacing it with the currently resolved IP address.
(aside: this came up for me because the Corosync documentation recommends using hostnames and I only found out that Proxmox recommends against it when running pve7to8 last year... and I never changed it because, well, y'know, you don't touch corosync when you don't have to)
What tool(s) is
pve7to8 using under the hood to lint corosync.conf? Can we run the checks independently?Any other ideas for config linting strategies?
Backstory
This topic of linting corosync came up while I was in the Weehooey Proxmox training and we talked about about the syntactic check, but didn't know if there was a semantic check.
When thinking about how to help detect and prevent issues like https://forum.proxmox.com/threads/the-pve-cluster-mysteriously-rebooted-almost-simultaneously.164851, I remembered about the semantic checks of
pve7to8 and wondered if it would have caught the issue of only having a single ring and what other checks it may have that could be useful in the field. And then... can we run that in isolation?
Last edited: