Bug 1070905

Summary: VMs with names longer than 48 characters can be created but not started
Product: Red Hat Enterprise Linux 6 Reporter: Tom Lavigne <tlavigne>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.5CC: acathrow, audgiri, berrange, dyuan, iheim, jdenemar, jhunsaker, lcui, lpeer, lsu, mchappel, michal.skrivanek, mjenner, mzhan, ofrenkel, oourfali, pm-eus, Rhev-m-bugs, teigland, tlavigne, vfeenstr, yeylon
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: libvirt-0.10.2-29.el6_5.5 Doc Type: Bug Fix
Doc Text:
Cause: Sanlock has a 48 characters limit on lock owner name. Consequence: When sanlock locking driver is enabled in libvirt, domains with names longer than the limit could not be started. Fix: Since the owner name is not used by sanlock for anything but a more human friendly debugging output, libvirt truncates long domain names when sending them to sanlock so that they are shorter than 48 characters. Result: Domains with names longer than 48 characters can be successfully started even if sanlock locking driver is enabled.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-06 09:33:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1060557    
Bug Blocks:    

Description Tom Lavigne 2014-02-27 17:07:07 UTC
This bug has been copied from bug #1060557 and has been proposed
to be backported to 6.5 z-stream (EUS).

Comment 4 Cui Lei 2014-02-28 07:49:54 UTC
I can reproduce this issue with:
RHEVM 3.3.1-0.48.el6ev
libvirt-0.10.2-29.el6_5.4.x86_64

Create a vm with name "mhuizer_9123456789212345678931234567894123456789512111" which name length is longer than 48.

start the vm, from the event console, error message will pop up:

"VM mhuizer_9123456789212345678931234567894123456789512111 is down. Exit message: internal error internal error Domain name 'mhuizer_9123456789212345678931234567894123456789512111' exceeded 48 characters."

Comment 6 Cui Lei 2014-03-03 02:29:17 UTC
Verified the issue with:
libvirt-0.10.2-29.el6_5.5.x86_64
libvirt-debuginfo-0.10.2-29.el6_5.5.x86_64
libvirt-lock-sanlock-0.10.2-29.el6_5.5.x86_64
libvirt-python-0.10.2-29.el6_5.5.x86_64
libvirt-client-0.10.2-29.el6_5.5.x86_64
libvirt-devel-0.10.2-29.el6_5.5.x86_64
RHEVM 3.3.1-0.48.el6ev

Use the same env as comment4,
Scenario A: vm with 54 char name.

1. In rhevm3.3, Start the vm with name "mhuizer_9123456789212345678931234567894123456789512111" (totally 55 char with '\0'), the vm could start successfully.

Console popup "VM mhuizer_9123456789212345678931234567894123456789512111 started on Host lcui-rhel65"

2. In host, # sanlock  status
daemon 450a307d-77a2-49c1-befb-88f422c91e49.lcui-rhel6
...
p 30559 mhuizer_912345678921234567893123456789412345678
...

The owner_name part have been truncated as 48 chars by design.


Scenario B: vm with a normal name shorter than 48
1. In rhevm3.3, Start the vm with name "lcui_rhel_test"
VM start successfully and console popup:	
VM lcui_rhel_test was started by admin@internal (Host: lcui-rhel65).

2. In host, # sanlock  status
...
p 30559 mhuizer_912345678921234567893123456789412345678
p 29995 
p 32720 lcui_rhel_test
...

New VM name displayed with the full name as it is shorter than 48

Scenario C: create a vm with name longer than 48 in KVM.
The vm could start successfully.

As above all, change the status from 'ON_QA' to 'VERIFIED'

Comment 8 errata-xmlrpc 2014-03-06 09:33:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0256.html