Manage the RSKj node config so upgrades can't mis-network nodes #715
No Reviewers
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
Infrastructure metrics, alerts, notifications, etc.
service
discourse
Kosmos Community Forums
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
lightning
Lightning address, lndhub, etc.
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
All your base are belong to us
User interface, process design, etc.
This won't be fixed
release
major
release
minor
release
patch
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#715
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
rsk-testnet-6was found syncing the mainnet chain and filling its disk. This PR fixes the underlying cookbook gap.What happened: the rskj package owns
/etc/rsk/node.conf. Itspostinstre-asks theshared/configdebconf question on every configure, then re-pointsnode.confat the selected network's shipped config. That debconf state is not reliably preserved across upgrades: after the plain 9.0.1 → 9.0.5 upgrade on 2026-11-28, the question fell back to the template default (mainnet), the newly added restart notification restarted the service, and the node began syncing mainnet from genesis into a fresh database while its real 156 GB testnet database sat idle. The cookbook only ever pinned the network withdebconf-set-selections, and never managednode.confor the config file itself.Fix: stop relying on debconf. After the package is configured, the recipe templates our own
/etc/rsk/kosmos-<network>.conf(including the RPC bind/CORS settings the openresty proxies need, which were previously only hand-edited on the node) and manages/etc/rsk/node.confas a symlink to it, with the service restart ordered after that. A package upgrade can no longer mis-network the node.Validation: the live node was recovered (wrong-network DB removed, repointed to testnet, resumed syncing normally) and converged twice — the second run is idempotent. The
kosmos_rskInSpec suite was run against the recovered node: 17/17 pass. The publicrsk-testnet.kosmos.orgAPI reportsnet_version31 (testnet). Cookbook bumped to 0.6.1.The rskj package owns /etc/rsk/node.conf: its postinst re-asks the `shared/config` debconf question on every configure and re-points node.conf at the selected network's shipped config. That debconf state is not reliably preserved across upgrades. After the plain 9.0.1 -> 9.0.5 upgrade, the question fell back to the template default ("mainnet"), the service was restarted, and rsk-testnet-6 started syncing the mainnet chain from genesis into a fresh database while its real testnet data sat idle. Stop relying on debconf: template our own node config (with the RPC bind/CORS settings the openresty proxies need) and manage the node.conf symlink from Chef, after the package has been configured. The restart then happens with the correct config, and a package upgrade can no longer flip the network. Bump the cookbook to 0.6.1 and extend the InSpec test to assert the managed config and the symlink target.