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

Colima should validate vm-type and mount-type flags #548

Closed
1 of 5 tasks
rfay opened this issue Dec 28, 2022 · 0 comments
Closed
1 of 5 tasks

Colima should validate vm-type and mount-type flags #548

rfay opened this issue Dec 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@rfay
Copy link
Contributor

rfay commented Dec 28, 2022

Description

I was working on a recreation scenario for #503 and tried a number of things.

colima start junk --vm-type=qemu --mount-type="" was accepted, but shouldn't a valid mountType be required?

It results in mountType: "" and

$ colima status -p junk
INFO[0000] colima [profile=junk] is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] socket: unix:https:///Users/rfay/.colima/junk/docker.sock

(Note that the mountType is not reported there)

But the mountType ends up being 9p, so 9p seems to be the default still on 0.5.2?

But... Unable to recreate the problem described here using this technique.

I was even able to do

  • colima start j2 --mount-type="xxx" --vm-type=qemu with no complaint from colima
  • and colima start j3 --mount-type="xxx" --vm-type=xxx

I recommend validation on each of those arguments (and all of the rest as well).

I note that manually changing colima.yaml with mountType: yyy and vmType: yyy also results in no validation on start.

colima status -p j3 shows

$ colima status -p j3
INFO[0000] colima [profile=j3] is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: yyy
INFO[0000] socket: unix:https:///Users/rfay/.colima/j3/docker.sock

Apparently it decides QEMU is the thing to do, but it thinks that mountType is yyy.

Version

Colima Version: 0.5.2
Lima Version: 0.14.2
Qemu Version: 7.2.0

Operating System

  • macOS Intel <= 12 (Monterrey)
  • macOS Intel >= 13 (Ventura)
  • macOS M1 <= 12 (Monterrey)
  • macOS M1 >= 13 (Ventura)
  • Linux

Output of colima status

$ colima status -p j3
INFO[0000] colima [profile=j3] is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: yyy
INFO[0000] socket: unix:https:///Users/rfay/.colima/j3/docker.sock

Reproduction Steps

described above

Expected behaviour

Failure for unsupported vm type or mount type

Additional context

No response

@abiosoft abiosoft added the bug Something isn't working label Dec 29, 2022
rfay added a commit to rfay/colima that referenced this issue Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants