fix(updater): PostgreSQL 大版本提示改为导出再恢复并更正地址相关注释
This commit is contained in:
4 files changed
+9
-10
No files matched your search
+5
-6
@@ -977,11 +977,10 @@ detect_node_ip() {
|
||||
fi
|
||||
}
|
||||
|
||||
# warn_dynamic_node_ip warns when NODE_IP is a DHCP lease. The address is written into
|
||||
# the database connection string, pg_hba, the network policies, the panel certificate
|
||||
# and the default nip.io domain, and nothing re-addresses a live install, so a lease
|
||||
# that later comes back different takes the whole platform down (the watchdog then
|
||||
# reports host-address). `ip -o addr` marks a leased address "dynamic".
|
||||
# warn_dynamic_node_ip warns when NODE_IP is a DHCP lease. The address is the k3s node's
|
||||
# and is written into the network policies, the panel certificate and the default nip.io
|
||||
# domain, and nothing re-addresses a live install, so a lease that later comes back
|
||||
# different takes the platform down (the watchdog then reports host-address). `ip -o addr` marks a leased address "dynamic".
|
||||
warn_dynamic_node_ip() {
|
||||
if ip -4 -o addr show 2>/dev/null | awk -v ip="$NODE_IP" '
|
||||
{ split($4, a, "/"); if (a[1] == ip && / dynamic /) found = 1 }
|
||||
@@ -3275,7 +3274,7 @@ deploy_postgres() {
|
||||
--postgres-image "$POSTGRES_IMAGE" | kube apply -f -
|
||||
if ! kube -n "$CONTROL_NS" rollout status "deployment/${PG_DEPLOYMENT}" --timeout=600s; then
|
||||
diagnose_rollout "deployment/${PG_DEPLOYMENT}"
|
||||
die "${PG_DEPLOYMENT} did not become ready (docs/troubleshooting.md §13c)"
|
||||
die "${PG_DEPLOYMENT} did not become ready (docs/troubleshooting.md §16)"
|
||||
fi
|
||||
ensure_postgres_role
|
||||
ok "${PG_DEPLOYMENT} ready: pods at ${PG_SERVICE_ADDR}, this host at 127.0.0.1:${PG_HOST_PORT}"
|
||||
|
||||
@@ -98,7 +98,7 @@ func (p postgresFeed) latest(ctx context.Context, current updates.Version) (post
|
||||
if !mine.Supported {
|
||||
rel.note = fmt.Sprintf("PostgreSQL %s reached end of life on %s and gets no more fixes", key, mine.EOLDate)
|
||||
if newest != "" {
|
||||
rel.note += fmt.Sprintf("; the current major is %s (pg_upgrade, see docs/operations.md §4)", newest)
|
||||
rel.note += fmt.Sprintf("; the current major is %s (a dump and restore, see docs/operations.md §4)", newest)
|
||||
}
|
||||
}
|
||||
return rel, nil
|
||||
|
||||
@@ -37,7 +37,7 @@ func TestPostgresFeedComparesWithinTheMajor(t *testing.T) {
|
||||
}{
|
||||
{"17.4", "17.10", nil},
|
||||
{"18.6", "18.6", nil},
|
||||
{"13.22", "13.23", []string{"PostgreSQL 13 reached end of life on 2025-11-13", "current major is 18"}},
|
||||
{"13.22", "13.23", []string{"PostgreSQL 13 reached end of life on 2025-11-13", "current major is 18", "dump and restore"}},
|
||||
{"9.6.3", "9.6.24", []string{"PostgreSQL 9.6 reached end of life"}},
|
||||
}
|
||||
for _, c := range cases {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// addressFor is short: nothing reaches the database or the panel while the
|
||||
// address is gone, so a DHCP renewal that lands on a new lease is an outage.
|
||||
// addressFor is short: the cluster and the panel are down while the address
|
||||
// is gone, so a DHCP renewal that lands on a new lease is an outage.
|
||||
addressFor = 5 * time.Minute
|
||||
// clockFor leaves room for an NTP daemon that was just enabled (by the
|
||||
// installer, or after a reboot) to reach its first synchronization.
|
||||
|
||||
Reference in new issue
Block a user