Skip to content

Commit b5012c4

Browse files
authored
Feat: Quorum Status (#5278)
1 parent 204ec64 commit b5012c4

File tree

5 files changed

+64
-18
lines changed

5 files changed

+64
-18
lines changed

.github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/autolabeler-config.json

Lines changed: 48 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/validate-filenames.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/build.func

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ build_container() {
11431143
$PW
11441144
"
11451145
# This executes create_lxc.sh and creates the container and .conf file
1146-
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" $?
1146+
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/create_lxc.sh)" $?
11471147

11481148
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
11491149
if [ "$CT_TYPE" == "0" ]; then

ct/create_lxc.sh renamed to misc/create_lxc.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,17 @@ msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
207207
CONTAINER_STORAGE=$(select_storage container)
208208
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
209209

210+
# Check Cluster Quorum if in Cluster
211+
if [ -f /etc/pve/corosync.conf ]; then
212+
msg_info "Checking Proxmox cluster quorum status"
213+
if ! pvecm status | awk -F':' '/^Quorate/ { exit ($2 ~ /Yes/) ? 0 : 1 }'; then
214+
printf "\e[?25h"
215+
msg_error "Cluster is not quorate. Start all nodes or configure quorum device (QDevice)."
216+
exit 210
217+
fi
218+
msg_ok "Cluster is quorate"
219+
fi
220+
210221
# Update LXC template list
211222
msg_info "Updating LXC Template List"
212223
#check_network

0 commit comments

Comments
 (0)