Bug 803613

Summary: "s" is not stripped from secure channel name if there is a whitespace between comma and channel name
Product: Red Hat Enterprise Linux 6 Reporter: Ortal <ogvura>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED NOTABUG QA Contact: yeylon <yeylon>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: abaron, acathrow, bazulay, iheim, srevivo, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 803617 (view as bug list) Environment:
Last Closed: 2012-03-22 14:40:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 803617    
Attachments:
Description Flags
rhevm.log
none
rhevm-APl_screen-shot
none
relevant part of vdsm.log when SpiceSecureChannels contains spaces
none
relevant part of libvirtd.log when SpiceSecureChannels contains spaces
none
relevant part of vdsm.log when SpiceSecureChannels does not contain spaces
none
relevant part of libvirtd.log when SpiceSecureChannels does not contain spaces none

Description Ortal 2012-03-15 09:21:33 UTC
Description of problem:

RHEVM-Config allows to change SpiceSecureChannels to: 
#SpiceSecureChannels.validValues=smain,sinputs,scursor,splayback,srecord,sdisplay


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


How reproducible:
Always

Steps to Reproduce:

1. [root@kiril-rhevm ~]# rhevm-config -g SpiceSecureChannels
   SpiceSecureChannels: smain,sinputs version: general      
2. [root@kiril-rhevm ~]# vim /etc/rhevm/rhevm-config/rhevm-config.properties 
3. [root@kiril-rhevm ~]# rhevm-config -s SpiceSecureChannels="smain, sdisplay"
--   cver=general

4. service jbossas restart
   Stopping jbossas:                                          [  OK  ]
   Starting jbossas:                                          [  OK  ]
  
5. Attempt to open RHEVM AP, and to open VM using Spice.

Actual results:

VM is down. Exit message internal error unknown spice channel name sdisplay.

Getting an Error on RHEVM.log :

2012-03-15 10:35:52,401 INFO  [org.ovirt.engine.core.vdsbroker.IsVmDuringInitiatingVDSCommand] (pool-10-thread-49) FINISH, IsVmDuringInitiatingVDSCommand, return: false, log id: 2ad8880c
2012-03-15 10:35:52,406 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (pool-10-thread-49) CanDoAction of action RunVm failed. Reasons:ACTION_TYPE_FAILED_VDS_VM_CLUSTER,VAR__ACTION__RUN,VAR__TYPE__VM
2012-03-15 10:48:46,235 INFO  [org.ovirt.engine.core.bll.Backend] (main) Start time: 3/15/12 10:48 AM


Expected results:

Should support ALL new SpiceSecureChannel names.
(To workaround it - use display and not sdisplay)

Additional info:

** Please see attached screen-shot
** Please see attached rhevm.log

Comment 2 Ortal 2012-03-15 09:27:43 UTC
Created attachment 570224 [details]
rhevm.log

Comment 3 Ortal 2012-03-15 09:28:49 UTC
Created attachment 570225 [details]
rhevm-APl_screen-shot

Comment 5 David Jaša 2012-03-15 09:53:15 UTC
Can't reproduce on my setup. What are the versions of spicec, spice-xpi and client system?

Isn't it possibly a dupe of bug 786554 or bug 800306?

Comment 6 David Jaša 2012-03-15 11:30:40 UTC
Ortal,

after some investigation, I understand the bug fully:

1) the immediate cause of the bug is that you added space into SpiceSecureChannels string. If you remove the space, VMs will start OK

2) root cause is remnant of RHEV spice support being written for spice 0.3.x in RHEL 5.x hosts - the "schannel" notation for secure channels. Since RHEL 6.1, this is gone and "s" prefixes have to be removed before the channel names are added to libvirt domain xml

Based on above, I'm reassigning the bug to VDSM and they have essentially two options what to do with it:

  * fix it in the code

  * convert it to documentation bug for RHEV-M explaining that 
    SpiceSecureChannels must not contain spaces

Comment 7 David Jaša 2012-03-15 11:31:45 UTC
(removing myself and David Blechter from CC list)

Comment 8 David Jaša 2012-03-15 11:33:06 UTC
Created attachment 570259 [details]
relevant part of vdsm.log when SpiceSecureChannels contains spaces

Comment 9 David Jaša 2012-03-15 11:33:56 UTC
Created attachment 570260 [details]
relevant part of libvirtd.log when SpiceSecureChannels contains spaces

Comment 10 David Jaša 2012-03-15 11:35:12 UTC
Created attachment 570262 [details]
relevant part of vdsm.log when SpiceSecureChannels does not contain spaces

Comment 11 David Jaša 2012-03-15 11:36:11 UTC
Created attachment 570264 [details]
relevant part of libvirtd.log when SpiceSecureChannels does not contain spaces

Comment 12 David Jaša 2012-03-15 11:50:59 UTC
I created bug #803666 to track root cause of this bug.

Comment 13 Dan Kenigsberg 2012-03-22 14:40:25 UTC
SpiceSecureChannels is a piece of the vdsm/Engine API. It is not expected to be human-writable, and in Vdsm side, there should be no auto-corrections such as stripping leading whitespace from channel names.

This, if at all, should be done on data entry, in the configuration tool.