volume/local: Make host resolution backwards compatible#47185
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jan 23, 2024
Merged
volume/local: Make host resolution backwards compatible#47185thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
09b24d1 to
6387429
Compare
thaJeztah
reviewed
Jan 23, 2024
6387429 to
f8dd745
Compare
robmry
reviewed
Jan 23, 2024
thaJeztah
reviewed
Jan 23, 2024
bddccfd to
cb33e4f
Compare
Good call from @robmry; let's look at that
799dd22 to
0157e3d
Compare
robmry
approved these changes
Jan 23, 2024
Contributor
robmry
left a comment
There was a problem hiding this comment.
LGTM - although duplicating the code seems like a bit of a shame... could factor it out into a closure that returns a bool to say whether it did anything?
Commit 8ae94ca added a DNS resolution of the `device` part of the volume option. The previous way to resolve the passed hostname was to use `addr` option, which was handled by the same code path as the `nfs` mount type. The issue is that `addr` is also an SMB module option handled by kernel and passing a hostname as `addr` produces an invalid argument error. To fix that, restore the old behavior to handle `addr` the same way as before, and only perform the new DNS resolution of `device` if there is no `addr` passed. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
0157e3d to
0d51cf9
Compare
Contributor
Author
|
Removed the duplication, not using a closure though it would make it less readable and more complex than plain duplication IMO. |
Member
|
Seeing failures like this quite frequently in the BuildKit integration tests. Not specifically this address, but seems to be general lookup / "not found" failures (?) Either way; it's not related to this PR, so kicked CI again. Hoping one day we have stats / metrics from CI, so that we can identify flaky tests. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Commit 8ae94ca added a DNS resolution of the
devicepart of the volume option.The previous way to resolve the passed hostname was to use
addroption, which was handled by the same code path as thenfsmount type.The issue is that
addris also an SMB module option handled by kernel and passing a hostname asaddrproduces an invalid argument error.To fix that, restore the old behavior to handle
addrthe same way as before, and only perform the new DNS resolution ofdeviceif there is noaddrpassed.NOTE: While kernel docs don't mention the
addroption (https://www.kernel.org/doc/html/latest/admin-guide/cifs/usage.html#use-instructions), it's actually present in the source: https://github.com/torvalds/linux/blob/7ed2632ec7d72e926b9e8bcc9ad1bb0cd37274bf/fs/smb/client/fs_context.c#L166- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)