Skip to content

nixos/pm-apps: remove pm-kaneo + pm-postgres oci-containers (compose is their manager) - #3847

Merged
dezren39 merged 1 commit into
mainfrom
fix/pm-apps-compose-kaneo-postgres
Nov 1, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/pm-apps-compose-kaneo-postgres

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What

Removes the pm-kaneo and pm-postgres oci-container declarations from nixos/services/pm-apps. Kaneo and its PostgreSQL are — and throughout the incident remained — managed by the pm-stack module's compose path (pm-kaneo.service + pm-kaneo.timer running ~/pm-stack/deploy.sh). Grist, Pad, and ready-for-agent are untouched.

Why (2026-11-01 incident)

The code#1752 migration declared oci-containers for Kaneo/PostgreSQL but its activation never completed: the pm-stack compose units stayed enabled, and the compose self-heal timer resurrected the compose stack at 2026-11-01 00:35. From then:

  • docker-pm-kaneo.service failed at every activation — Bind for 127.0.0.1:5173 failed: port is already allocated (the compose container holds it), restart-looping to start-limit-hit.
  • Two PostgreSQL postmasters ran against the single pm-stack_postgres_data volume (the oci postmaster, up since 2026-10-30, and the compose postmaster from 00:35). Verified live: both accepting connections on the same PGDATA; the oci postmaster had zero client connections while the compose postmaster held Kaneo's pool (4 backends).

Interim state (already applied to the laptop today)

  • docker-pm-postgres.service stopped — the idle second postmaster is gone; the compose postmaster is now the only one on the data volume.
  • docker-pm-kaneo.service stopped + both units reset-failed.
  • Kaneo never went down: compose stack healthy, GET 127.0.0.1:5173 → 200 throughout.
  • Note: /etc/systemd/system is read-only on this host, so the units could not be disabled outside a switch — if the laptop reboots before this PR lands via a switch, both units will start again (kaneo failing, postgres double-running). Landing this with the pending fold switch removes them declaratively.

Decision left open

Completing the #1752 migration for Kaneo/PostgreSQL instead would mean disabling the pm-stack compose service+timer and planning the cutover. This PR takes the other branch — compose is the single declared manager — because that is what has actually been running the PM stack. The module header records the history either way.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Kaneo and its PostgreSQL are compose-managed by the pm-stack module
(pm-kaneo.service + self-heal timer running ~/pm-stack/deploy.sh) and
have been throughout: the #1752 oci migration for them never
completed, and the duplicate declarations actively fought the live
stack — docker-pm-kaneo failed at every activation (port 5173 held
by the compose container) and two postmasters ran against the one
pm-stack_postgres_data volume from 2026-11-01 00:35 until the oci
postmaster (zero client connections; compose serves Kaneo) was
stopped later that day. Grist, Pad and ready-for-agent are
unaffected and stay declared here.

Interim laptop state (already applied): docker-pm-kaneo and
docker-pm-postgres stopped + reset-failed; Kaneo verified up via
compose the whole time. This PR makes the removal declarative at
the next switch.
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 17:03
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8835fb4f-34db-434f-b9b7-1267ece8e7b9
Commits

Reviewing files that changed from the base of the PR and between 147432d and b19a53c.

Files selected for processing: 1
  • nixos/services/pm-apps/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T17:04:27.552290Z b19a53c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Incident record: #3849 (two postmasters on the PM data volume + this unit's start-limit loop; interim laptop actions and the reboot caveat are documented there). This PR is the durable fix referenced in that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant