Skip to content

Instantly share code, notes, and snippets.

The Proxmox Corosync fallacy

TL;DR Distinguish the role of Corosync in Proxmox clusters from the rest of the stack and appreciate the actual reasons behind unexpected reboots or failed quorums.


ORIGINAL POST The Proxmox Corosync fallacy

@vladbabii
vladbabii / prox-migrate.sh
Created March 26, 2024 12:19
migrate proxmox containers from current host to a remote. doing stop, backup, rsync then start. also sets 'migrated' tag and disables onboot start on source
#!/bin/bash
# Read the ID from the first argument
id="$1"
MODE="stop"
STORAGE_LOCAL="backups3"
STORAGE_LOCAL_PATH="/storage3/pve-backup"
REMOTE_HOST="outbound"
@EverythingSmartHome
EverythingSmartHome / esp32-voice.yaml
Last active March 19, 2025 14:39
ESP32 & ESPHome Voice Assistant
esphome:
name: esp32-mic-speaker
friendly_name: esp32-mic-speaker
on_boot:
- priority: -100
then:
- wait_until: api.connected
- delay: 1s
- if:
condition:
@mattpascoe
mattpascoe / bindparse.awk
Created August 29, 2022 21:09
Parse bind zone files to produce dcm.pl output.
#!/usr/bin/awk -f
#
# Author: Matt Pascoe - [email protected]
#
# This awk script is used to extract relevant information from a bind zone
# file and build the appropriate fields for passing into
# a dcm.pl module. This can be used to bootstrap a new database from existing
# site data.
#
# You can simply cat a file and pipe it to this script
@gwire
gwire / local-acme.conf
Last active September 22, 2024 00:31
nginx config snippet to allow acme validation for TLS certificate
## Only permit acme-challenge requests that match the ACME spec,
## return 403 for everything else
## RFC8555 specifies a base64url token (no "=")
## with at least 128 bits of entropy (ie 22 chars minimum)
## root matches the "webroot" directory used in the certbot configuration
location ~ "^/.well-known/acme-challenge/([A-Za-z0-9_-]{22,})$" {
default_type "text/plain";
root /var/www/acme/;
}
@marfillaster
marfillaster / router.cfg
Last active April 1, 2025 15:07
MikroTik RouterOS v7 dual DHCP WAN recursive failover w/ PCC load-balancing; and recursive ECMP
# feb/11/2022 11:00:55 by RouterOS 7.2rc3
# software id = 9QK9-C798
#
# model = RB5009UG+S+
# serial number = XXXXXXXXXX
/ip settings set allow-fast-path=no
/interface bridge add admin-mac=FF:FF:FF:FF:FF:FF auto-mac=no name=bridge
@bgarcial
bgarcial / Makefile
Last active April 4, 2023 15:14
Steps/actions needed to be done to deploy loki logging backend on staging aks cluster.
loki-install:
sh ./variables.sh
sh ./setup-loki-fluentbit.sh
version: '2.4'
services:
#prom:
# image: prom/prometheus:latest
# container_name: prom
# restart: unless-stopped
# volumes:
# - ./conf/prometheus.yml:/etc/prometheus/prometheus.yml:ro
# - ./conf/alerts:/etc/prometheus/alerts
@arriqaaq
arriqaaq / ns.sh
Created September 9, 2021 05:25
Network namespaces [Bridge + VETH]
#!/usr/bin/env bash
if [[ $EUID -ne 0 ]]; then
echo "You must be root to run this script"
exit 1
fi
BR_ADDR="10.10.0.1"
BR_DEV="br0"
@marfillaster
marfillaster / guide.md
Last active March 17, 2025 13:26
yubikey ssh ykcs11 in osx

Generate key

brew install ykman yubico-piv-tool

# Generate key
ykman piv keys generate -aRSA2048 --pin-policy ONCE --touch-policy CACHED 9a public.pem


# Generate self signed key
ykman piv certificates generate -s "CN=yubi-1 ssh" -aSHA256 9a public.pem