Skip to content
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

🐛 remove duplicate fix for btrfs/zfs support #8376

Merged

Conversation

cannonpalms
Copy link
Contributor

@cannonpalms cannonpalms commented Mar 26, 2023

If btrfs or zfs is used CAPD adds the /dev/mapper mount twice. This PR ensures we only do it once.

xref to where kind implements this: kubernetes-sigs/kind#1464

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #8317

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 26, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: cannonpalms / name: Cannon Palms (f6fa4ec)

@k8s-ci-robot
Copy link
Contributor

Welcome @cannonpalms!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 26, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @cannonpalms. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 26, 2023
@cannonpalms cannonpalms changed the title fix(capd): remove hack for btrfs/zfs support 🐛 fix(capd): remove hack for btrfs/zfs support Mar 26, 2023
@fabriziopandini
Copy link
Member

/hold
I don't have a way to test this, but there is something I struggle to understand

The code in kind adds a dev mapper for all the containers started by kind; the code in CAPD does the same for all the containers started by CAPD.

The two code paths do not overlap, and they must be kept ~in sync because we use the same base images (which is the only thing shared between kind and CAPD at this point).

Given that, if the mount is required for the containers started by kind, we should not drop adding the same mount for the containers started by CAPD... am I missing something?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2023
@fabriziopandini
Copy link
Member

Also, please add Fixes #8317 to the PR body

@cannonpalms
Copy link
Contributor Author

Hmm, I see what you mean. I may have fixed the duplicate mount point issue, but re-broke the original problem. I wrote this on an airplane, so let me take a deeper look tomorrow. I appreciate the feedback.

@killianmuldoon
Copy link
Contributor

/ok-to-test

I should be able to try to test this on my setup - will report back if I figure out what the interaction is here.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 4, 2023
@killianmuldoon
Copy link
Contributor

The issue here isn't that this overlaps with Kind - the update in #8157 added a second code path which mounts /dev/mapper. If we remove one it should work.

@killianmuldoon
Copy link
Contributor

@cannonpalms do you think you'll have time to come back to this?

@cannonpalms
Copy link
Contributor Author

cannonpalms commented Oct 19, 2023

Picking this back up. Apologies for radio silence! It took me this long just to clear my GitHub notifications /s.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 19, 2023
@guettli
Copy link
Contributor

guettli commented Nov 6, 2023

@cannonpalms I don't have a btrfs system, so can't test. But we are doing a workshop, and I have concerns that some partitipants have btrfs. Could you check the above PR and tell us if it works for you?

@cannonpalms
Copy link
Contributor Author

@cannonpalms I don't have a btrfs system, so can't test. But we are doing a workshop, and I have concerns that some partitipants have btrfs. Could you check the above PR and tell us if it works for you?

Travelling right now, but I can tell you that it worked for me at the time of last comment, and the workaround is to edit your docker config and change the storage driver to something like overlay2.

@guettli
Copy link
Contributor

guettli commented Nov 6, 2023

@killianmuldoon do you think we can merge this, now that the author said it is working for him?

@killianmuldoon
Copy link
Contributor

I think I'd prefer to verify independently - I should be able to do so in the next couple of days though.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing with btrfs. I tried running this locally and it got past the issue on the load balancer but failed to bring up any Kubernetes nodes.

AFAIU we need to roll back most of the changes in this PR. The issue is that we try to mount the dev/mapper twice. We should remove the slightly less complete version of that in lines 415-419. I believe that change is sufficient to fix this issue completely.

test/infrastructure/container/docker.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 14, 2023
@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sbueringer
Copy link
Member

/cherry-pick release-1.5

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sbueringer
Copy link
Member

@cannonpalms Can you please rebase?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 29, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 1, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2024
@cannonpalms
Copy link
Contributor Author

@sbueringer Done.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 1, 2024
Support for btrfs/zfs was upstreamed to kind in kubernetes-sigs/kind#1464, removing the need
for us to hack support in ourselves.

Helps kubernetes-sigs#8317

chore: PR feedback

Removes the now-unused function mountDevMapper(...)

chore: fix ci lint

fix: restore missing storage consts

chore: fix bad rebase

mountDevMapper() is unused
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 1, 2024
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

pending ci

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 1, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1fae200936ab7755b7a25d911498232b0abdc3b0

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 1, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b2acf15 into kubernetes-sigs:main Feb 1, 2024
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.7 milestone Feb 1, 2024
@k8s-infra-cherrypick-robot

@sbueringer: #8376 failed to apply on top of branch "release-1.6":

Applying: fix(capd): remove hack for btrfs/zfs support
Using index info to reconstruct a base tree...
M	test/infrastructure/container/docker.go
Falling back to patching base and 3-way merge...
Auto-merging test/infrastructure/container/docker.go
CONFLICT (content): Merge conflict in test/infrastructure/container/docker.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix(capd): remove hack for btrfs/zfs support
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@sbueringer: #8376 failed to apply on top of branch "release-1.5":

Applying: fix(capd): remove hack for btrfs/zfs support
Using index info to reconstruct a base tree...
M	test/infrastructure/container/docker.go
Falling back to patching base and 3-way merge...
Auto-merging test/infrastructure/container/docker.go
CONFLICT (content): Merge conflict in test/infrastructure/container/docker.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix(capd): remove hack for btrfs/zfs support
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@typeid
Copy link
Contributor

typeid commented Apr 8, 2024

/area provider/infrastructure-docker

@k8s-ci-robot k8s-ci-robot added the area/provider/infrastructure-docker Issues or PRs related to the docker infrastructure provider label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/infrastructure-docker Issues or PRs related to the docker infrastructure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error encountered when using CAPD on btrfs: Error response from daemon: Duplicate mount point: /dev/mapper
9 participants