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

Incus action support --console vga #1017

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Incus action support --console vga #1017

wants to merge 1 commit into from

Conversation

nanjj
Copy link
Contributor

@nanjj nanjj commented Jul 19, 2024

Supports below usage:

  1. incus start instance --console,
  2. incus start instance --console=vga,
  3. incus start instance --console vga # my favor one

@stgraber
Copy link
Member

That doesn't work.

incus create images:ubuntu/24.04 vga --vm
incus start --console vga

The above needs to give me the text console for the instance named vga.

@nanjj
Copy link
Contributor Author

nanjj commented Jul 20, 2024

That doesn't work.

incus create images:ubuntu/24.04 vga --vm
incus start --console vga

=>

To detach from the console, press: <ctrl>+a q
...

So it works. And incus stop --console vga =>

To detach from the console, press: <ctrl>+a q
[  OK  ] Stopped target Swap.
[  OK  ] Unmounted /boot/efi.

also works.

The above needs to give me the text console for the instance named vga.

The fix only handle len(names) > 1 situation so the above works as you expect.

@stgraber
Copy link
Member

What happens if you do incus start --console console vga ?

I would expect that to start a text console on instance named vga, but from my reading of the code, this will instead give me a vga console on instance console.

@nanjj
Copy link
Contributor Author

nanjj commented Jul 20, 2024

What happens if you do incus start --console console vga ?

I would expect that to start a text console on instance named vga, but from my reading of the code, this will instead give me a vga console on instance console.

Fixed.

@nanjj nanjj force-pushed the main branch 2 times, most recently from d902724 to 6e8c269 Compare July 22, 2024 01:07
Supports below usage:
1. incus start <instance> --console,
2. incus start <instance> --console=vga,
3. incus start <instance> --console vga # my favor one

Signed-off-by: JUN JIE NAN <[email protected]>
@stgraber
Copy link
Member

I think this will fail if I do incus start vga --console console as it will incorrectly try to use the VGA console for it now.

@stgraber stgraber added the Incomplete Waiting on more information from reporter label Aug 1, 2024
@simos
Copy link
Contributor

simos commented Aug 2, 2024

Supports below usage:

1. incus start instance --console,

2. incus start instance --console=vga,

3. incus start instance --console vga # my favor one

You are suggesting that --console should be able to used either on its own (without parameter, assuming the default to be vga),

or as --console vga, which means that the next string after --console will be the name of reserved parameter vga.

Such a feature would add ambiguity to the users.
In the first example, --console does not consume the next token and then it does.
In the second example, there's ambiguity. Is vga a parameter to --console or is it the name of the instance?

incus start --console mycontainer
incus start --console vga mycontainer

and

incus init images:debian/12 vga
incus start --console vga

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incomplete Waiting on more information from reporter
Development

Successfully merging this pull request may close these issues.

3 participants