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

lxc launch accepts but ignores --console argument #14339

Closed
simondeziel opened this issue Oct 24, 2024 · 2 comments · Fixed by #14340
Closed

lxc launch accepts but ignores --console argument #14339

simondeziel opened this issue Oct 24, 2024 · 2 comments · Fixed by #14340
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@simondeziel
Copy link
Member

Steps to reproduce:

Launch v1 with a text console:

$ lxc launch --empty --vm --console v1
Launching v1

Notice no console is shown. Same goes for --console=vga that equally doesn't work.

On the other hand, lxc init refuses the --console argument (which is fine):

$ lxc init --empty --vm --console v1
Error: unknown flag: --console
$ lxc init --empty --vm v1
Creating v1
$ lxc start --console v1
To detach from the console, press: <ctrl>+a q

So either lxc launch should refuse the --console argument or even better, it should keep accepting it but act accordingly.

Additional information:

$ snap list lxd
Name  Version      Rev    Tracking     Publisher   Notes
lxd   git-e0b4dac  30866  latest/edge  canonical✓  -
@tomponline tomponline added the Bug Confirmed to be a bug label Oct 24, 2024
@tomponline
Copy link
Member

tomponline commented Oct 24, 2024

Ive think ive used that in the past, i think recently, so seems like a regression.

@tomponline tomponline added this to the lxd-6.2 milestone Oct 24, 2024
@MggMuggins MggMuggins self-assigned this Oct 24, 2024
@simondeziel
Copy link
Member Author

Ive think ive used that in the past, i think recently, so seems like a regression.

I had that feeling too, so I've checked with 5.0/stable and 5.21/stable, both work:

# lxc launch images:alpine/edge a1 --console
Creating a1
Starting a1                                 
To detach from the console, press: <ctrl>+a q
 * Caching service dependencies ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Creating user login records ... [ ok ]
 * Cleaning /tmp directory ... [ ok ]
 * Remounting devtmpfs on /dev ...mount: mounting dev on /dev failed: Permission denied
 [ !! ]
 * Mounting /dev/shm ... [ ok ]
 * Starting busybox syslog ... [ ok ]
 * Starting busybox crond ... [ ok ]
 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ...udhcpc: started, v1.37.0
udhcpc: broadcasting discover
udhcpc: broadcasting select for 10.210.98.76, server 10.210.98.1
udhcpc: lease of 10.210.98.76 obtained from 10.210.98.1, lease time 3600
 [ ok ]

Welcome to Alpine Linux 3.20
Kernel 5.15.0-1067-kvm on an x86_64 (/dev/console)

a1 login: 

tomponline added a commit that referenced this issue Oct 25, 2024
tomponline pushed a commit to tomponline/lxd that referenced this issue Dec 4, 2024
Fixes canonical#14339

Fixes a regression introduced in canonical#13695

Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
(cherry picked from commit 18f4c42)
tomponline pushed a commit to tomponline/lxd that referenced this issue Dec 9, 2024
Fixes canonical#14339

Fixes a regression introduced in canonical#13695

Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
(cherry picked from commit 18f4c42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants