Bug 214908 - Concurrent-access flag is not provided via libvirt's virDomainGetXMLDesc()
Concurrent-access flag is not provided via libvirt's virDomainGetXMLDesc()
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.0
All Linux
high Severity medium
: ---
: ---
Assigned To: Daniel Veillard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-09 17:29 EST by Lon Hohberger
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version: beta2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-22 21:27:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
xm list --long of domain running w/ the w! flag. (1.30 KB, text/plain)
2006-11-09 17:33 EST, Lon Hohberger
no flags Details
patch to support shrareable disks (1.87 KB, patch)
2006-11-10 08:36 EST, Daniel Veillard
no flags Details | Diff

  None (edit)
Description Lon Hohberger 2006-11-09 17:29:36 EST
Config File:
---------------------------------------------
# Automatically generated xen config file
name = "kanderso-xen-22"
memory = "1024"
disk = [ 'phy:/dev/RootVolumes/Node2-02,xvda,w',
'phy:/dev/RootVolumes/ClusterFS0,xvdb,w!' ]

# ^ xvdb is a shared disk image; note the ! flag.

vif = [ 'mac=02:10:15:84:00:22, bridge=xenbr0', ]
nographic=1
bootloader="/usr/bin/pygrub"
vcpus=1
on_reboot   = 'restart'
on_crash    = 'restart'
----------------------------------------------

Error Messages
----------------------------------------------

Rebooting domain kanderso-xen-22...
[[ XML Domain Info ]]
<domain type='xen' id='107'>
  <name>kanderso-xen-22</name>
  <uuid>0ac92eac79a37a1b541bd83d55ecb4c4</uuid>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
    <kernel>/var/lib/xen/vmlinuz.Q8oxJB</kernel>
    <initrd>/var/lib/xen/initrd.ILqJte</initrd>
    <cmdline>ro root=/dev/VolGroup00/LogVol00 console=xvc0 rhgb quiet</cmdline>
  </os>
  <memory>1048576</memory>
  <vcpu>1</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <interface type='bridge'>
      <source bridge='xenbr0'/>
      <mac address='02:10:15:84:00:22'/>
      <script path='vif-bridge'/>
    </interface>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/RootVolumes/Node2-02'/>
      <target dev='xvda'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/RootVolumes/ClusterFS0'/>
      <target dev='xvdb'/>
    </disk>
    <console tty='/dev/pts/5'/>
  </devices>
</domain>

[[ XML END ]]
Clearing 212 bytes starting @ 0x6296d9
[[ XML Domain Info (modified) ]]
<domain type='xen' id='107'>
  <name>kanderso-xen-22</name>
  <uuid>0ac92eac79a37a1b541bd83d55ecb4c4</uuid>
  <bootloader>/usr/bin/pygrub</bootloader>
                                                                               
                                                                               
                                                      
  <memory>1048576</memory>
  <vcpu>1</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <interface type='bridge'>
      <source bridge='xenbr0'/>
      <mac address='02:10:15:84:00:22'/>
      <script path='vif-bridge'/>
    </interface>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/RootVolumes/Node2-02'/>
      <target dev='xvda'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/RootVolumes/ClusterFS0'/>
      <target dev='xvdb'/>
    </disk>
    <console tty='/dev/pts/5'/>
  </devices>
</domain>

[[ XML END ]]
Calling virDomainDestroy
libvir: Xen Daemon error : GET operation failed: No such domain kanderso-xen-22
Domain no longer exists
Calling virDomainCreateLinux()...
libvir: Xen Daemon error : POST operation failed: (xend.err 'Device 51728 (vbd)
could not be connected.\nDevice /dev/RootVolumes/ClusterFS0 is mounted in a
guest domain,\nand so cannot be mounted now.')
Failed to get devices for domain kanderso-xen-22


Expected results:  Flag in XML description returned from virDomainGetXMLDesc()
which indicates that the disk image is allowed to be used by more than one
domain simultaneously (corresponding to the ! flag in the configuration).  This
should eliminate the error incurred.

Additional info:  'xm create' always works correctly.
Comment 1 Lon Hohberger 2006-11-09 17:33:03 EST
Created attachment 140848 [details]
xm list --long of domain running w/ the w! flag.
Comment 2 Kiersten (Kerri) Anderson 2006-11-09 17:36:05 EST
Adding blocker flags for GA release.  Not having this capability requires
operator intervention after node failures in a cluster.  This will block full
verification and recovery testing in a virtual environment.
Comment 3 Daniel Berrange 2006-11-09 17:37:57 EST
Ok, so we currently just check the (mode)  bit of the sexpression for 'r' to
signify read-only - assuming that the only other value was 'w' for writable. It
appears we have an extra option to deal with:

            (mode 'w!')

We need to check for that, and then probably add a '<sharable>' element in the
disk specification, eg


 <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/RootVolumes/ClusterFS0'/>
      <target dev='xvdb'/>
      <sharable/>
 </disk>
Comment 4 Daniel Veillard 2006-11-10 08:35:24 EST
Easy enough, I have an early patch, attached, not yet commited I need to add
regression tests first, getting it upstream is no brainer, getting it in RHEL5
is another piece of cake !

Daniel
Comment 5 Daniel Veillard 2006-11-10 08:36:34 EST
Created attachment 140884 [details]
patch to support shrareable disks
Comment 6 Daniel Veillard 2006-11-22 09:02:58 EST
patch has been commited in libvirt upstream,

Daniel
Comment 7 Jay Turner 2006-12-01 09:12:27 EST
QE ack for RHEL5 . . . comment 2 pretty well sums things up.
Comment 8 Daniel Veillard 2006-12-04 10:38:43 EST
libvirt-0.1.8-3.el5 has been built with the fix to test,

Daniel
Comment 9 RHEL Product and Program Management 2006-12-22 21:27:00 EST
A package has been built which should help the problem described in 
this bug report. This report is therefore being closed with a resolution 
of CURRENTRELEASE. You may reopen this bug report if the solution does 
not work for you.

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