Bug 1280370 - Can't connect to guest-VM created from template via serial console.
Summary: Can't connect to guest-VM created from template via serial console.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: ---
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-3.6.1
: 3.6.1
Assignee: Francesco Romani
QA Contact: Nikolai Sednev
URL:
Whiteboard: virt
Depends On:
Blocks: 1223671
TreeView+ depends on / blocked
 
Reported: 2015-11-11 15:08 UTC by Nikolai Sednev
Modified: 2016-02-10 19:23 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-16 12:17:07 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine's sosreport (7.70 MB, application/x-xz)
2015-11-11 15:08 UTC, Nikolai Sednev
no flags Details
missing spec params image (73.66 KB, image/png)
2015-11-11 15:18 UTC, Nikolai Sednev
no flags Details
correct spec params image (94.39 KB, image/png)
2015-11-11 15:19 UTC, Nikolai Sednev
no flags Details
sosreports from engine and host (14.24 MB, application/x-gzip)
2015-11-11 17:41 UTC, Nikolai Sednev
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 48459 0 master MERGED sercon: pass console specParams on device copy Never
oVirt gerrit 48829 0 ovirt-engine-3.6 MERGED sercon: pass console specParams on device copy Never

Description Nikolai Sednev 2015-11-11 15:08:35 UTC
Created attachment 1092788 [details]
engine's sosreport

Description of problem:
Can't connect to guest-VM created from template via serial console.

Available Serial Consoles:
00 RHEL_7_2_VM2[3c0bb6b7-43e1-427c-9575-f58b50a72dae]
01 RHEL_7_2_VM2[3c0bb6b7-43e1-427c-9575-f58b50a72dae]
02 RHEL7_2_VM_1[ea857677-f6d2-4d16-a40a-a44222670482]
03 RHEL7_2_VM_1[ea857677-f6d2-4d16-a40a-a44222670482]
SELECT> 01
ERROR: Console '3c0bb6b7-43e1-427c-9575-f58b50a72dae.sock' is not available
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow reply 0
Connection to alma02.qa.lab.tlv.redhat.com closed.
debug1: channel 0: free: client-session, nchannels 1
Connection to 10.35.160.204 closed.
Transferred: sent 4184, received 4784 bytes, in 5.5 seconds
Bytes per second: sent 755.0, received 863.2
debug1: Exit status 1


The VM 01 RHEL_7_2_VM2[3c0bb6b7-43e1-427c-9575-f58b50a72dae] was created from the template, made from RHEL7_2_VM_1[ea857677-f6d2-4d16-a40a-a44222670482].
I can connect to the original VM, but not to the RHEL_7_2_VM2. The permissions and console settings were inherited from the RHEL7_2_VM_1.

I see difference between two VMs in WEBUI, for the original VM in "VM Devices" there is "{enableSocket=true}" under "Spec Params" for the Console, while for VM created from template, there is "{}" under the "Spec Params".

Version-Release number of selected component (if applicable):

Engine:
ovirt-vmconsole-proxy-1.0.0-1.el6ev.noarch
ovirt-engine-extension-aaa-jdbc-1.0.1-1.el6ev.noarch
ovirt-host-deploy-1.4.0-1.el6ev.noarch
ovirt-host-deploy-java-1.4.0-1.el6ev.noarch
ovirt-vmconsole-1.0.0-1.el6ev.noarch
rhevm-3.6.0.3-0.1.el6.noarch
Linux version 2.6.32-573.7.1.el6.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Sep 10 13:42:16 EDT 2015

Host:
Linux version 3.10.0-327.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Oct 29 17:29:29 EDT 2015
libvirt-client-1.2.17-13.el7.x86_64
vdsm-4.17.10.1-0.el7.centos.noarch
sanlock-3.2.4-1.el7.x86_64
mom-0.5.1-2.el7.noarch
qemu-kvm-rhev-2.3.0-31.el7.x86_64
ovirt-vmconsole-host-1.0.1-0.0.master.20151105234454.git3e5d52e.el7.noarch
ovirt-release36-snapshot-001-2.noarch
ovirt-vmconsole-1.0.1-0.0.master.20151105234454.git3e5d52e.el7.noarch
ovirt-release36-001-2.noarch


How reproducible:
100%

Steps to Reproduce:
1.Create serial-console working environment on 3.6 engine with at least one host and one RHEL7.2 guest VM, to which you was able to connect via serial console.
2.Create template from guest-VM, inheriting the original permissions and settings from it.
3.Create new VM based on template.
4.Start the new VM and connect to it via serial-console.

Actual results:
ERROR: Console '3c0bb6b7-43e1-427c-9575-f58b50a72dae.sock' is not available

Expected results:
Serial connection should be established.

Additional info:
sosreports from host and engine attached.

Comment 1 Nikolai Sednev 2015-11-11 15:18:51 UTC
Created attachment 1092791 [details]
missing spec params image

Comment 2 Nikolai Sednev 2015-11-11 15:19:22 UTC
Created attachment 1092792 [details]
correct spec params image

Comment 3 Alon Bar-Lev 2015-11-11 15:20:37 UTC
Wrong component again.

Not sure why there are dups in list.

Comment 4 Nikolai Sednev 2015-11-11 15:24:08 UTC
(In reply to Alon Bar-Lev from comment #3)
> Wrong component again.
> 
> Not sure why there are dups in list.

Dups are because of the https://bugzilla.redhat.com/show_bug.cgi?id=1279339

Comment 5 Francesco Romani 2015-11-11 15:48:50 UTC
VDSM intentionally creates the unix domain socket that allows to connect to the guest only if Engine asks him, to preserve backward compatibility to older Engine.

So behaviour of VDSM looks correct. But it seems that the specParams are not copied from the base VM in the template VM, and I found this surprising.

Tomas, can you have a look? Is that indeed the case? Is it intentional that specParams are not copied?

Comment 6 Nikolai Sednev 2015-11-11 17:41:44 UTC
Created attachment 1092808 [details]
sosreports from engine and host

Comment 7 Nikolai Sednev 2015-11-11 17:51:55 UTC
Just reproduced the issue to give a better logs, as original sosreport from the host didn't fit the Bugzilla space limitation.

Comment 8 Nikolai Sednev 2015-11-12 07:51:15 UTC
There is a WA, after creating the VM from the template, customer should edit the VM, manually clear the "Enable VirtIO serial console" mark, then save, then do all this again to enable the functionality and then start the VM.

It's OK for one VM, but will be a bit problematic for a large group of VMs.

Comment 9 Francesco Romani 2015-11-12 07:59:44 UTC
(In reply to Francesco Romani from comment #5)
> VDSM intentionally creates the unix domain socket that allows to connect to
> the guest only if Engine asks him, to preserve backward compatibility to
> older Engine.
> 
> So behaviour of VDSM looks correct. But it seems that the specParams are not
> copied from the base VM in the template VM, and I found this surprising.
> 
> Tomas, can you have a look? Is that indeed the case? Is it intentional that
> specParams are not copied?

Nevermind and sorry for the noise: seems just a bug, patch coming

Comment 10 Tomas Jelinek 2015-11-12 08:16:26 UTC
@Francesco: yes, the console's spec params are not copied. Look at VmDeviceUtils.copyVmDevices() into "case CONSOLE" - this results in addConsoleDevice() which uses as spec params the getConsoleDeviceSpecParams() which always creates new ones. I don't think there is any particular reason not to copy the spec params the same way as for example the balloon device does.

Comment 11 Michal Skrivanek 2015-11-12 10:22:33 UTC
decreasing severity since there is a within-UI workaround

Comment 12 Francesco Romani 2015-11-19 13:26:48 UTC
this is not actually modified yet, we need the backport to branch 3.6 (and maybe 3.6.1)

Comment 13 Eyal Edri 2015-11-29 11:20:37 UTC
wrong product, patches are for ovirt-engine and not vdsm - changed.
wrong target milestone - the patch is merged and included in ovirt-engine-3.6.1,
see https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs%2Fheads%2Fovirt-engine-3.6.1

moving to ON_QA since this was in the build.

Comment 14 Nikolai Sednev 2015-12-07 16:53:41 UTC
Works for me on these components:
ovirt-host-deploy-java-1.4.1-1.el6ev.noarch
ovirt-vmconsole-1.0.0-1.el6ev.noarch
ovirt-host-deploy-1.4.1-1.el6ev.noarch
ovirt-vmconsole-proxy-1.0.0-1.el6ev.noarch
ovirt-engine-extension-aaa-jdbc-1.0.4-1.el6ev.noarch
rhevm-3.6.1.1-0.1.el6.noarch
Available Serial Consoles:
00 vm1[2feb7c67-0875-4407-a64e-bd3d7a2120bd]
01 vm2[69da8388-1f81-46e8-8565-32a71a52580f]
SELECT> 01

Red Hat Enterprise Linux Server 7.2 (Maipo)
Kernel 3.10.0-327.el7.x86_64 on an x86_64

RHEL7 login: debug1: channel 0: free: client-session, nchannels 1
Connection to <engine's FQDN here> closed.
Transferred: sent 4168, received 4384 bytes, in 17.8 seconds
Bytes per second: sent 234.2, received 246.3
debug1: Exit status -1

Comment 15 Sandro Bonazzola 2015-12-16 12:17:07 UTC
According to verification status and target milestone this issue should be fixed in oVirt 3.6.1. Closing current release.


Note You need to log in before you can comment on or make changes to this bug.