Bug 687850 - Satellite VM provisioning fails with VirtDiskPathExistsError() when installing to a block device
Summary: Satellite VM provisioning fails with VirtDiskPathExistsError() when installin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization
Version: 540
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
 
Reported: 2011-03-15 15:22 UTC by Scott Mayhew
Modified: 2018-11-14 14:02 UTC (History)
3 users (show)

Fixed In Version: spacewalk-koan-0.2.7-8
Doc Type: Bug Fix
Doc Text:
Due to an error in the spacewalk-koan package, an attempt to provision a virtual guest with a block device as a disk drive caused the rhn_check utility to terminate unexpectedly with a traceback. With this update, this error no longer occurs and users are now able to provision such virtual guests as expected.
Clone Of:
Environment:
Last Closed: 2011-09-22 10:34:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1331 0 normal SHIPPED_LIVE RHN Tools bug fix update 2011-09-22 10:34:36 UTC

Description Scott Mayhew 2011-03-15 15:22:51 UTC
Description of problem:

Satellite VM provisioning fails with VirtDiskPathExistsError() when installing to a block device if that block device already exists.

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


How reproducible:
Every time.

Steps to Reproduce:
1. Go to Virtualization->Provisioning in the Satellite web UI.
2. Click the Advanced Configuration button and specify a multipath device in the Virtual Storage Path field, and then schedule the kickstart
3. rhn_check
  
Actual results:

# rhn_check
Package spacewalk-koan-0.2.7-7.el5sat.noarch already installed and latest version
spacewalkkoan.spacewalkkoan.VirtDiskPathExistsError
Virt Disk Path /dev/mapper/mpath10 already exists on the host system. Please provide another disk path for the virt guest and reschedule your guest kickstart.
  File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 171, in initiate_guest
    raise VirtDiskPathExistsError(disk_path)


Expected results:

Either the check in initiate_guest() should be eliminated altogether, or it should be doing something more intelligent (like only performing the check for disk image files).

Additional info:

This also fails when specifying one of the underlying block devices (e.g. /dev/sdl1) for the multipath device.

By commenting out the following lines in initiate_guest() in spacewalkkoan.py, the installation proceeds successfully:
        if os.path.exists(disk_path):
            raise VirtDiskPathExistsError(disk_path)

On a side note, if you were to specify a device that does not already exist (such that the above check is successful), then the install will fail with the error "virt path is not a valid block device" in calc_virt_path2() in app.py.

Comment 3 Milan Zázrivec 2011-05-27 08:48:01 UTC
Fix in Spacewalk upstream (spacewalk-koan):

spacewalk.git master: 1552baf8e506bfb561835f159899b110213d18bf

Comment 7 Milan Zázrivec 2011-08-18 12:27:03 UTC
satellite.git SATELLITE-5.4: 1bf193e880a9efb107c0e9e4cbe5a44179585986

Comment 9 Milan Zázrivec 2011-08-24 12:03:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: A bug in spacewalk-koan code.

Consequence: Provisioning a virtual guest would return a python traceback in case the provisioned guest was to use a block device for a disk.

Fix: Quite simple.

Result: It's possible to provision a virtual guest with a block device for a disk drive.

Comment 10 Jaromir Hradilek 2011-08-25 14:25:20 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1 @@
-Cause: A bug in spacewalk-koan code.
+Due to an error in the spacewalk-koan package, an attempt to provision a virtual guest with a block device as a disk drive caused the rhn_check utility to terminate unexpectedly with a traceback. With this update, this error no longer occurs and users are now able to provision such virtual guests as expected.-
-Consequence: Provisioning a virtual guest would return a python traceback in case the provisioned guest was to use a block device for a disk.
-
-Fix: Quite simple.
-
-Result: It's possible to provision a virtual guest with a block device for a disk drive.

Comment 12 errata-xmlrpc 2011-09-22 10:34:44 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-2011-1331.html


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