You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve gateway state ownership across RPM erase and reinstall #735
Erasing and reinstalling the documentdb-gateway RPM can recreate its system
account with a different numeric UID while per-major gateway state remains
owned by the old UID.
The retained state includes /var/lib/documentdb-local/<major>/gateway/tls. After reinstall, the gateway
can no longer read its existing certificate and private key and fails with a
permission error.
This was found during clean-host installer E2E work but is intentionally
separated from the minimal installer PR because it is an RPM package lifecycle
issue.
Actual behavior
Install and configure a stand-alone instance.
Record the UID of documentdb-gateway and the ownership of the per-major
TLS directory.
Erase documentdb-gateway.
Reinstall documentdb-gateway.
The recreated account may receive another UID while the retained TLS files
keep the original numeric owner.
Gateway startup fails when it tries to reuse that TLS state.
Expected behavior
An RPM erase and reinstall must preserve a resolvable owner for retained
per-major gateway state. Reinstalling the package must not make existing TLS
material unreadable.
Acceptance criteria
The gateway system account has a stable UID across RPM erase and
reinstall, or retained state is safely reassigned before service start.
Package-owned global runtime and configuration state is still removed
according to the RPM lifecycle contract.
Per-major TLS state remains readable by documentdb-gateway.
The retained account remains a locked system account with a non-login
shell and /nonexistent home.
RPM lifecycle coverage includes a discriminating erase/reinstall test.
Debian purge behavior remains independently defined and tested.
Applied:packaging, bug Project fields suggested: Component packaging · Priority P2 · Effort M · Status Triage Confidence: 0.88 (llm)
Reasoning
LLM: RPM lifecycle bug where gateway system account UID instability after erase/reinstall causes TLS state to become unreadable, breaking gateway startup; scoped to packaging scripts with no schema changes.
If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.
👋 @guanzhousongmicrosoft — this issue has been assigned for 22 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
The root cause is fixed on main (b566aa3): the documentdb-gateway system account is kept on erase, so a reinstall finds retained TLS state owned by the same UID, and e2e-rhel-scenarios.sh checks that. Still open: an erase → reinstall → gateway-reads-TLS test on a systemd-capable lane.
Activity
documentdb-triage-tool commentedon Sep 3, 2026
🤖 Auto-triaged by documentdb-triage-tool.
Applied:
packaging,bugProject fields suggested: Component
packaging· PriorityP2· EffortM· StatusTriageConfidence: 0.88 (llm)
Reasoning
LLM: RPM lifecycle bug where gateway system account UID instability after erase/reinstall causes TLS state to become unreadable, breaking gateway startup; scoped to packaging scripts with no schema changes.
If a label is wrong, remove it manually and ping
@patty-chowso the rules can be tuned. The bot will not re-label items that already have component labels.guanzhousongmicrosoft commentedon Oct 6, 2026
1.0 blocker, same root cause as #771 item 5. The fix is in review.
documentdb-triage-tool commentedon Oct 28, 2026
👋 @guanzhousongmicrosoft — this issue has been assigned for 22 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
documentdb-triage-tool commentedon Nov 11, 2026
👋 @guanzhousongmicrosoft — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
Merged PR 2343171: packaging: fix remove, purge, upgrade and rerun pa…
guanzhousongmicrosoft commentedon Nov 23, 2026
The root cause is fixed on main (b566aa3): the
documentdb-gatewaysystem account is kept on erase, so a reinstall finds retained TLS state owned by the same UID, ande2e-rhel-scenarios.shchecks that. Still open: an erase → reinstall → gateway-reads-TLS test on a systemd-capable lane.