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

Debug appliance virt install failure #664

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

didib
Copy link
Member

@didib didib commented Jan 18, 2023

No description provided.

Signed-off-by: Yedidyah Bar David <didi@redhat.com>
- --graphics none: Will prevent creating a vnc console. I think that's
ok, at this stage. This should not affect the eventual engine VM conf.
So, use the serial console as the main one.

- --autoconsole text: Causes virt-install to automatically connect to
the VM's console and show it. This should make the console output be
included in the ansible log.

- --boot hd,bootmenu.enable=on,bios.useserial=on: Allow getting the boot
menu, useful for debugging/investigation. Also adds a few seconds to the
boot process.

Signed-off-by: Yedidyah Bar David <didi@redhat.com>
@didib didib force-pushed the debug-appliance-virt-install-failure branch from 424d94d to c158a2c Compare January 18, 2023 14:36
@didib
Copy link
Member Author

didib commented Jan 18, 2023

/ost he-basic-suite-master el9stream

@michalskrivanek
Copy link
Member

I think it's a good idea to have more debugging always, LGTM

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

+1

@didib
Copy link
Member Author

didib commented Jan 18, 2023

OST failed because of the lvm issue, but the patch worked - console log collected and seems ok.

@mwperina mwperina merged commit 320fcb5 into oVirt:master Jan 18, 2023
@didib didib deleted the debug-appliance-virt-install-failure branch January 19, 2023 06:22
@mnecas mnecas mentioned this pull request Feb 14, 2023
@paralk
Copy link

paralk commented Oct 4, 2023

@didib @mnecas @mwperina When deploying hosted_engine_setup via an Ansible playbook onto a remote host from local, the "Create Local VM" task that invokes virt-install hangs as it appears that Ansible is connecting to the guest VMs serial console and not disconnecting, probably due to this change.

When hosted engine setup is run on the host itself using hosted-engine, the task does not hang. Instead the error message in the logs for virt-install is
"error: Cannot run interactive console without a controlling TTY", however the rest of the setup then proceeds fine.

Are remote deployments from local working for you? Is that something that should not be done at all?

Is there a way to have the serial console disconnect without manual intervention and let the rest of the Ansible proceed?

@paralk
Copy link

paralk commented Oct 4, 2023

Using virsh console HostedEngineLocal --force on the host releases the console held by ansible from local, and the rest of the tasks then proceed. However would like to avoid this manual intervention somehow...

@paralk
Copy link

paralk commented Oct 5, 2023

Adding to the remote host the variable ansible_ssh_use_tty=false gets past the "Create Local VM" task without manual intervention - with the error message
"error: Cannot run interactive console without a controlling TTY" i.e. the same as when running hosted-engine

The rest of the playbook runs ok to the end

@didib
Copy link
Member Author

didib commented Oct 9, 2023

@didib @mnecas @mwperina When deploying hosted_engine_setup via an Ansible playbook onto a remote host from local, the "Create Local VM" task that invokes virt-install hangs as it appears that Ansible is connecting to the guest VMs serial console and not disconnecting, probably due to this change.

Perhaps

When hosted engine setup is run on the host itself using hosted-engine, the task does not hang. Instead the error message in the logs for virt-install is "error: Cannot run interactive console without a controlling TTY", however the rest of the setup then proceeds fine.

Are remote deployments from local working for you?

I don't recall ever trying this, personally. I think others did, sporadically, over time, but IIUC it was never considered a supported feature/RFE, and was never part of CI. I vaguely recall that others in Red Hat did this routinely when RHV was in full support, but have no details. So it should probably not be very hard (or very broken).

Is that something that should not be done at all?

If for some reason this is important for you, by all means go ahead and try, and push patches if needed. Otherwise, I wouldn't bother and just run it on the host.

Is there a way to have the serial console disconnect without manual intervention and let the rest of the Ansible proceed?

(No idea, but see below)

Using virsh console HostedEngineLocal --force on the host releases the console held by ansible from local, and the rest of the tasks then proceed. However would like to avoid this manual intervention somehow...

Adding to the remote host the variable ansible_ssh_use_tty=false gets past the "Create Local VM" task without manual intervention - with the error message "error: Cannot run interactive console without a controlling TTY" i.e. the same as when running hosted-engine

The rest of the playbook runs ok to the end

Either (or both? not sure) of these sound like a good fix, if you can find the place to add them. I suggest to create a new issue, to properly document this, and a PR, if you come up with a fix. Thanks!

@paralk
Copy link

paralk commented Oct 10, 2023

Thanks for the response

ansible_ssh_use_tty=false on its own fixes this issue

Will raise a new issue and PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants