feat(ansible): add corosync-qnetd role for NAS quorum#688
Open
mpeterson wants to merge 1 commit into
Open
Conversation
Add a lightweight Ansible role to provision the corosync-qnetd quorum device on a dedicated VM (qnetd-01). This provides a third vote for the 2-node NAS cluster, enabling proper majority quorum instead of relying on two_node mode with no-quorum-policy=ignore. Components: - roles/corosync_qnetd: installs corosync-qnetd, configures firewall (port 5403), initializes NSS cert database, enables the service - playbooks/corosync_qnetd/setup.yaml: targets the qnetd host group - sample_inventory/qnetd.yaml: sample inventory for the qnetd host - playbooks/setup.yaml: imports the new qnetd playbook DNS zone update (qnetd-01 A record → 10.3.25.13) and serial bump must be applied to the local inventories zone file at deploy time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a lightweight Ansible role and playbook to provision the corosync-qnetd quorum device on a dedicated VM (
qnetd-01, IP10.3.25.13).This provides a third vote for the 2-node NAS cluster (
zfs-cluster), enabling proper majority quorum (2 of 3) instead of relying ontwo_node: 1mode withno-quorum-policy=ignore.Components
ansible/roles/corosync_qnetd/defaults/main.yamlansible/roles/corosync_qnetd/tasks/main.yamlansible/roles/corosync_qnetd/handlers/main.yamlansible/playbooks/corosync_qnetd/setup.yamlqnetdhost groupansible/sample_inventory/qnetd.yamlansible/playbooks/setup.yamlDeploy-time steps (not in this PR)
These must be done at the maintenance window when deploying:
ansible/inventories/qnetd.yamlwithqnetd-01.lan.peterson.com.ar(10.3.25.13)qnetd-01 IN A 10.3.25.13toansible/inventories/files/bind9/dynamic/lan.peterson.com.ar.zoneand bump SOA serial (2026041104 → 2026041901), then run bind9 playbook withforce_dynamic_zone_update=trueansible-playbook playbooks/corosync_qnetd/setup.yaml -i inventories/qnetd.yamlcorosync-qdeviceon nas-01/nas-02, runpcs qdevice setup model net --qnetd-hostname qnetd-01andpcs quorum device add model net host=qnetd-01 algorithm=ffsplitpcs property set no-quorum-policy=stopContext
Addresses the quorum gap identified after the STONITH incident (#656) where a switch auto-update caused corosync quorum loss. With qnetd providing a third vote, single-node failures result in proper quorum behavior instead of relying on the unsafe
no-quorum-policy=ignoresetting.