Skip to content

Instantly share code, notes, and snippets.

@smalinskiy
smalinskiy / serve.go
Created March 12, 2025 09:27 — forked from rivo/serve.go
Graceful stop and restart for HTTP servers in Go
package main
import (
"context"
"fmt"
"net"
"net/http"
"os"
"os/exec"
"os/signal"
@smalinskiy
smalinskiy / gist:26741c92cab4dc216d10cd38bd4ca749
Created September 21, 2020 07:21 — forked from zzzeek/gist:f5bc2a104ce6eed5187e268ccfd73c01
turn off pacemaker and bootstrap galera manually
--- 1. prevent pacemaker from managing galera
# pcs resource unmanage galera
--- 2. make sure ***mysql is not running on any node***. To bootstrap, mysql has to be completely shut down:
# ps -ef | grep mysql
< nothing, on all three controllers >
--- 3. Choose the node you want to bootstrap and run mysqld_safe with --wsrep-new-cluster: