Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: disable label separation when binding socket #3150

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

abn
Copy link
Contributor

@abn abn commented Feb 15, 2025

This change ensures that when mounting unix sockets for enabling dind access, security opt label=disable is set for the container.

Ref: https://docs.podman.io/en/latest/markdown/podman-system-service.1.html#access-the-unix-socket-from-inside-a-container

See-also: supabase/supabase#33603

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

At present when using rootless podman with SELinux enabled, supbase start command fails at health check step.

Relates-to: #3099

2025-02-15T15:52:11.439823Z ERROR source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::sources::docker_logs: Listing currently running containers failed. error=error trying to connect: Permission denied (os error 13)

What is the new behavior?

When executing supabase start using rootless podman with SELinux enabled, the development environment starts correctly.

Additional context

2025-02-15T15:52:11.439435Z  INFO vector::topology::running: Running healthchecks.
2025-02-15T15:52:11.439488Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439510Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439519Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439524Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439528Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439536Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439540Z  INFO vector::topology::builder: Healthcheck passed.
2025-02-15T15:52:11.439732Z  INFO vector: Vector has started. debug="false" version="0.28.1" arch="x86_64" revision="ff15924 2023-03-06"
2025-02-15T15:52:11.439823Z ERROR source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::sources::docker_logs: Listing currently running containers failed. error=error trying to connect: Permission denied (os error 13)
2025-02-15T15:52:11.445682Z  INFO vector::internal_events::api: API server running. address=0.0.0.0:9001 playground=http://0.0.0.0:9001/playground
2025-02-15T15:52:11.445706Z  INFO vector::app: All sources have finished.
2025-02-15T15:52:11.445708Z  INFO vector: Vector has stopped.
2025-02-15T15:52:11.446959Z  INFO vector::topology::running: Shutting down... Waiting on running components. remaining_components="logflare_rest, logflare_db, logflare_kong, logflare_realtime, logflare_auth, logflare_functions, logflare_storage" time_remaining="59 seconds left"
Stopping containers...
supabase_vector_service-playground container is not ready: starting
Try rerunning the command with --debug to troubleshoot the error.

This change ensures that when mounting unix sockets for enabling dind
access, security opt `label=disable` is set for the container.
@abn abn requested a review from a team as a code owner February 15, 2025 17:38
@coveralls
Copy link

coveralls commented Feb 15, 2025

Pull Request Test Coverage Report for Build 13364385539

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 58.551%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/start/start.go 2 3 66.67%
Files with Coverage Reduction New Missed Lines %
internal/debug/postgres.go 3 64.86%
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 13336018446: -0.05%
Covered Lines: 7809
Relevant Lines: 13337

💛 - Coveralls

@sweatybridge sweatybridge merged commit 23706be into supabase:develop Feb 17, 2025
13 checks passed
@github-actions github-actions bot mentioned this pull request Feb 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants