Skip to content

Fix launchd domain mismatch between container system start/stop - #2050

Draft
JaewonHur wants to merge 1 commit into
apple:mainfrom
JaewonHur:use-user-501-only
Draft

Fix launchd domain mismatch between container system start/stop#2050
JaewonHur wants to merge 1 commit into
apple:mainfrom
JaewonHur:use-user-501-only

Conversation

@JaewonHur

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

getDomainString() picked gui/ or user/ based on the calling shell's launchd session type (Aqua vs Background), so registering the apiserver from a GUI Terminal and stopping it from tmux/ssh computed different domains, causing bootout to silently target a domain the service was never registered in.

Always resolve to user/ instead: it's the parent of the Aqua session domain for the same UID, so lookups from GUI shells still find it, and start/stop now agree regardless of which shell invokes them.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

getDomainString() picked gui/<uid> or user/<uid> based on the calling
shell's launchd session type (Aqua vs Background), so registering the
apiserver from a GUI Terminal and stopping it from tmux/ssh computed
different domains, causing bootout to silently target a domain the
service was never registered in.

Always resolve to user/<uid> instead: it's the parent of the Aqua
session domain for the same UID, so lookups from GUI shells still find
it, and start/stop now agree regardless of which shell invokes them.
@JaewonHur
JaewonHur marked this pull request as draft July 31, 2026 18:30
@JaewonHur

Copy link
Copy Markdown
Contributor Author

Has some issue when container system needs a GUI alert for user, like asking keychain password.

@github-actions

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 24.35%
Integration 66.19%
Combined 75.6%

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