-
Notifications
You must be signed in to change notification settings - Fork 4
fix: BED-9657 Add secrets.toml mount to example docker-compose #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
juggernot325
wants to merge
1
commit into
main
Choose a base branch
from
fix/BED-9657-fix-docker-example
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: SpecterOps/OpenHound
Length of output: 202
🏁 Script executed:
Repository: SpecterOps/OpenHound
Length of output: 5108
🤖 get_repo_knowledge executed:
get_repo_knowledge SpecterOps/OpenHound /tmp/coderabbit-repo-knowledge/specterops-openhound-5094e42a/architectureLength of output: 14298
🌐 Web query:
Docker Compose service secrets and volumes duplicate target same container path behavior official documentation💡 Result:
In Docker Compose, defining multiple volumes, secrets, or configs that target the same container path is considered a configuration error and is generally prevented by Compose to ensure deployment consistency [1][2][3]. Key behavioral details regarding this conflict: 1. Duplicate Mount Point Detection: Docker Compose validates configuration during the project load phase. If a service definition attempts to map multiple resources (such as volumes, bind mounts, or tmpfs) to the exact same destination path inside the container, Compose will throw an error and refuse to deploy the service [2][3]. This is a safety mechanism to prevent ambiguous filesystem states where it is unclear which source should prevail [3]. 2. Merging Rules: When using multiple Compose files (e.g., a base file and an override file), Compose merges list-based attributes like volumes and secrets based on their unique keys. For volumes, configs, and secrets, the unique key is the target path inside the container [4][5]. If an override file attempts to define a new mount for an existing target path, it is treated as a conflict or will override the previous definition depending on the specific implementation context, but the final, resolved model must not contain duplicate targets [4][5][6]. 3. Default Locations: - Volumes: You define the target path explicitly [7]. - Secrets: By default, secrets are mounted as files into /run/secrets/<secret_name> [8]. If you specify a custom target path for a secret using the long syntax, that path must also be unique relative to other mounts [9][10]. 4. Troubleshooting and Best Practices: - If you encounter a "Duplicate mount points" error, check your service definition and all merged override files for redundant entries [1][3]. - Be aware that ending slashes in path definitions can sometimes lead to issues in how Compose evaluates "sameness" or uniqueness [1]. Consistently defining paths without trailing slashes is recommended to avoid evaluation bugs [1]. - If you need to replace a mount, ensure the override file provides a unique configuration that replaces or complements the base rather than simply appending a conflicting entry [6]. In summary, you cannot bind multiple conflicting sources to the same container path. If such a configuration exists, Compose will detect it and report a failure at runtime during the validation phase [2][3].
Citations:
Remove the duplicate
/app/.dlt/secrets.tomlmounts.The
*scheduleranchor adds a bind mount to all scheduler services. Each service also defines a Docker secret at the same target. Compose rejects this duplicate mount configuration during deployment. Keep the bind mount only on the required service, or remove the service-specific mounts after confirming the shared file contains all required credentials.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the rabbit is right.
When using docker-compose, we don't use the generic
secrets.tomlfile because each specific scheduler relies on its ownsecrets_<extension_name>.toml. This is an edit to the shared config used by all schedulers, but they do not all share the same secrets.toml file.Adding secrets.toml mount here would duplicate each scheduler's existing
/app/.dlt/secrets.tomlmount and cause a conflict.I think the real issue here is lack of documentation around the secrets.toml behavior, which I have a ticket for here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StranDutton, agreed. Each scheduler uses its ownsecrets_<extension_name>.tomlfile. The shared${HOME}/.dlt/secrets.tomlbind mount conflicts with the scheduler-specific secret mount at/app/.dlt/secrets.toml.Remove the shared bind mount. Keep the scheduler-specific secret mounts. BED-8924 is the correct follow-up for the missing documentation.
🐇
✏️ Learnings added
You are interacting with an AI system.