Hi,
I wanted to share my bits with you concerning my home lab cluster made of:
- Permanent on-state machines
- Ad-hoc machines (in order to reduce power consumption)
Of course, besides the "usual" problems of voting (solved by assigning a much higher number of votes to the permanently-on machines), also a communication problem occurs if you try to power on a ad-hoc host which features an older version of corosync.
I solved this problem by running this script (manually) whenever the adhoc machine is not recognised in the web interface:
This downloades the "corosync.conf" from a (supposedly sane) permanent on machine and replaces the local corosync.conf (old) so that the machine can become active again in the cluster. No check on the corosync version is performed. Possibly the proper way to do this would be to try to fetch all corosync from all cluster nodes and decide with votes which is the latest / most reliable / ...
I'm not even sure why Proxmox didn't include this feature by default
I know this is not officially supported by Proxmox Developers, but if somebody is interested, please add this to the wiki if you feel interested. I don't know where/if I can create wiki pages so
I wanted to share my bits with you concerning my home lab cluster made of:
- Permanent on-state machines
- Ad-hoc machines (in order to reduce power consumption)
Of course, besides the "usual" problems of voting (solved by assigning a much higher number of votes to the permanently-on machines), also a communication problem occurs if you try to power on a ad-hoc host which features an older version of corosync.
I solved this problem by running this script (manually) whenever the adhoc machine is not recognised in the web interface:
Code:
#!/bin/bash
# Host to import from
source="192.168.1.231"
# Enter local mode
systemctl stop pve-cluster
/usr/bin/pmxcfs -l
# Backup file
mkdir -p /etc/corosync/backups
prefix=`date '+%Y%m%d_%H%M%S'`
cp /etc/corosync/corosync.conf /etc/corosync/backups/corosync-$prefix.conf
# Copy new file from source
scp root@$source:/etc/corosync/corosync.conf /etc/corosync/corosync.conf
# End local mode
killall pmxcfs
# Restart pve-cluster and corosync
systemctl restart pve-cluster
systemctl restart corosync
This downloades the "corosync.conf" from a (supposedly sane) permanent on machine and replaces the local corosync.conf (old) so that the machine can become active again in the cluster. No check on the corosync version is performed. Possibly the proper way to do this would be to try to fetch all corosync from all cluster nodes and decide with votes which is the latest / most reliable / ...
I'm not even sure why Proxmox didn't include this feature by default
I know this is not officially supported by Proxmox Developers, but if somebody is interested, please add this to the wiki if you feel interested. I don't know where/if I can create wiki pages so