Skip to content

Conversation

@henry3260
Copy link
Contributor

fix #21291

We have 2 cases:

  • --mount: user expects to have HOME mounted in the guest. This does nothing and we want to show an example how to mount a specific directory in the guest.
  • --mount --mount-string ...: warn that the --mount flag is ignored and can be removed

After:

First Case:
image

Second Case:
image

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: henry3260
Once this PR has been reviewed and has the lgtm label, please assign comradeprogrammer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 13, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @henry3260. Thanks for your PR.

I'm waiting for a kubernetes 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 13, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

}
}
}

Copy link
Member

Choose a reason for hiding this comment

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

I think instead of warnining, we should merge the
--mount
and
--mount-string flags into

--mount

and if ppl enter --mount true --mount-string /blahblah:/blahblah

we could still support it
with good unit testing we could just transition into "--mount " flag without breaking old syntax users

@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 25, 2025
@henry3260
Copy link
Contributor Author

@nirs Thanks for reviewing! I’d like to ask for your guidance here.

I noticed an unexpected behavior:

When running:
./out/minikube start --mount="/home/henry:/mnt" --alsologtostderr --v=2 2>&1 | grep -i mount
the boolean/string parsing logic in start.go is triggered correctly.
However, the same flag condition inside start_flags.go (where interpretMountFlag(cmd) is called) does not execute.

Both conditions check cmd.Flags().Changed(createMount), but they produce different results at runtime.

Do you have any hints why the flag state behaves differently between these two code paths? I suspect the config is initialized too early, but I’m not fully sure where the state gets overridden. Any suggestions or directions would be appreciated!

Copy link
Contributor

@nirs nirs left a comment

Choose a reason for hiding this comment

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

Please do not merge --mount and mount-string in this PR. This is not related to the issue.

We have another issue for having the new --mount flags supporting multiple mounts. We don't want to introduce the new behavior supporting only one mount.

See #21178 (comment)

@henry3260
Copy link
Contributor Author

Please do not merge --mount and mount-string in this PR. This is not related to the issue.

We have another issue for having the new --mount flags supporting multiple mounts. We don't want to introduce the new behavior supporting only one mount.

See #21178 (comment)

So do we still need to add a warning about using the --mount option in this pr?

@nirs
Copy link
Contributor

nirs commented Oct 25, 2025

Please do not merge --mount and mount-string in this PR. This is not related to the issue.
We have another issue for having the new --mount flags supporting multiple mounts. We don't want to introduce the new behavior supporting only one mount.
See #21178 (comment)

So do we still need to add a warning about using the --mount option in this pr?

If we introduce the new --mount flag we don't need a warning. But this PR is fine for now since we don't have the new --mount flag yet. I would remove the second commit and keep it as is in case we cannot finish the new --mount flag in time of the next release.

@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 Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn about using the ignored --mount option

5 participants