mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-13 00:38:49 +00:00
feat: add script for graceful shutdown and process cleanup
- Introduced a new script `dev-kill-all.sh` to handle graceful shutdown of development processes and cleanup of stale PID files. - Updated Makefile to include a `kill` command that utilizes the new script for improved process management. - Enhanced the shutdown process to verify that required ports are free after termination of processes.
This commit is contained in:
parent
687316b8d6
commit
80ea58848b
14
CHANGELOG.md
14
CHANGELOG.md
@ -13,6 +13,20 @@ The format is based on [Keep a Changelog][keepachangelog] and adheres to [Semant
|
|||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
## [0.63.1] - 2025-11-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
\n
|
||||||
|
### Changed
|
||||||
|
- Increased the default minimum cluster size for database environments from 1 to 3.
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Prevented unnecessary cluster recovery attempts when a node starts up as the first node (fresh bootstrap).
|
||||||
|
|
||||||
## [0.63.0] - 2025-11-10
|
## [0.63.0] - 2025-11-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -21,7 +21,7 @@ test-e2e:
|
|||||||
|
|
||||||
.PHONY: build clean test run-node run-node2 run-node3 run-example deps tidy fmt vet lint clear-ports install-hooks kill
|
.PHONY: build clean test run-node run-node2 run-node3 run-example deps tidy fmt vet lint clear-ports install-hooks kill
|
||||||
|
|
||||||
VERSION := 0.63.0
|
VERSION := 0.63.1
|
||||||
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||||
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.commit=$(COMMIT)' -X 'main.date=$(DATE)'
|
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.commit=$(COMMIT)' -X 'main.date=$(DATE)'
|
||||||
|
|||||||
@ -17,7 +17,7 @@ database:
|
|||||||
rqlite_join_address: ""
|
rqlite_join_address: ""
|
||||||
cluster_sync_interval: "30s"
|
cluster_sync_interval: "30s"
|
||||||
peer_inactivity_limit: "24h"
|
peer_inactivity_limit: "24h"
|
||||||
min_cluster_size: 1
|
min_cluster_size: 3
|
||||||
ipfs:
|
ipfs:
|
||||||
cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
||||||
api_url: "http://localhost:{{.IPFSAPIPort}}"
|
api_url: "http://localhost:{{.IPFSAPIPort}}"
|
||||||
|
|||||||
@ -17,7 +17,7 @@ database:
|
|||||||
rqlite_join_address: "{{.RQLiteJoinAddress}}"
|
rqlite_join_address: "{{.RQLiteJoinAddress}}"
|
||||||
cluster_sync_interval: "30s"
|
cluster_sync_interval: "30s"
|
||||||
peer_inactivity_limit: "24h"
|
peer_inactivity_limit: "24h"
|
||||||
min_cluster_size: 1
|
min_cluster_size: 3
|
||||||
ipfs:
|
ipfs:
|
||||||
cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
||||||
api_url: "http://localhost:{{.IPFSAPIPort}}"
|
api_url: "http://localhost:{{.IPFSAPIPort}}"
|
||||||
|
|||||||
@ -826,9 +826,12 @@ func (r *RQLiteManager) performPreStartClusterDiscovery(ctx context.Context, rql
|
|||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
if discoveredPeers == 0 {
|
// CRITICAL FIX: Skip recovery if no peers were discovered (other than ourselves)
|
||||||
r.logger.Warn("No peers discovered during pre-start discovery window, will attempt solo recovery")
|
// Only ourselves in the cluster means this is a fresh bootstrap, not a recovery scenario
|
||||||
// Continue anyway - might be the only node left
|
if discoveredPeers <= 1 {
|
||||||
|
r.logger.Info("No peers discovered during pre-start discovery window - skipping recovery (fresh bootstrap)",
|
||||||
|
zap.Int("discovered_peers", discoveredPeers))
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger final sync to ensure peers.json is up to date with latest discovered peers
|
// Trigger final sync to ensure peers.json is up to date with latest discovered peers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user