Bug 497402 - Kickstart UI Allows Invalid Virt Guest Name Characters
Kickstart UI Allows Invalid Virt Guest Name Characters
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
All Linux
urgent Severity medium
: ---
: ---
Assigned To: Partha Aji
Steve Salevan
Depends On:
Blocks: 457075
  Show dependency treegraph
Reported: 2009-04-23 14:47 EDT by Devan Goodwin
Modified: 2009-09-10 15:25 EDT (History)
3 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 15:25:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Devan Goodwin 2009-04-23 14:47:20 EDT
Description of problem:

Virt guest kickstarts can fail is the guest name specified in the UI has invalid characters.

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


How reproducible:


Steps to Reproduce:
1. Schedule a virt kickstart in the web UI.
2. Specify a guest name of ui-guest1
Actual results:

rhn_check prints out:

D: handle_action actionid = 89, version = 2
D: do_call kickstart_guest.initiate ('rlx-0-18.rhndev.redhat.com', 'rlx-2-14.rhndev.redhat.com:1:ui-guest1', 'xenpv', 47, 'ui-guest1', 524288, 1, 5, 'xenbr0', '/var/lib/xen/rhel5-para-virt-guest', 'ks=http://rlx-0-18.rhndev.redhat.com/ty/SCxASL4v ksdevice=eth0 ')
- looking for Cobbler at http://rlx-0-18.rhndev.redhat.com/cobbler_api
- reading URL: http://rlx-0-18.rhndev.redhat.com/cblr/svc/op/ks/system/rlx-2-14.rhndev.redhat.com:1:ui-guest1
install_tree: http://rlx-0-18.rhndev.redhat.com:80/ty/j8PDFhRC
downloading initrd initrd.img to /var/lib/xen/initrd.img
- reading URL: http://rlx-0-18.rhndev.redhat.com/cobbler/images/ks-rhel-i386-server-5:xen/initrd.img
downloading kernel vmlinuz to /var/lib/xen/vmlinuz
- reading URL: http://rlx-0-18.rhndev.redhat.com/cobbler/images/ks-rhel-i386-server-5:xen/vmlinuz
Domain name must be alphanumeric or _
  File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 116, in initiate_guest
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 296, in run
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 584, in virt
    return self.net_install(after_download)
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 503, in net_install
    after_download(self, profile_data)
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 582, in after_download
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 1051, in virt_net_install
    virt_type     =  self.virt_type
   File "/usr/lib/python2.4/site-packages/koan/xencreate.py", line 104, in start_install
   File "/usr/lib/python2.4/site-packages/virtinst/XenGuest.py", line 196, in set_name
    raise ValueError, "Domain name must be alphanumeric or _"

D: Sending back response (0, 'Guest kickstart initiated successfully.', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: Called refresh_rpmlist
Updating package profile
D: local action status:  (0, 'rpmlist refreshed', {})
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
[root@rlx-2-14 ~]# 

Expected results:

UI should reject guest name with - in them, probably worth testing other characters.

Additional info:

Also note the "guest kickstart initiated successfully". We believe this is causing confusion in the web UI as well, not sure if it should be handled as a separate bug or not.
Comment 1 Partha Aji 2009-05-01 14:35:08 EDT
I could not reproduce this... I  tried a couple of guest installs with guest name with hyphens...
Comment 2 Partha Aji 2009-05-01 16:09:31 EDT
Forgot to add a couple of details

# rpm -q python-virtinst

# rpm -q redhat-release

and no XenGuest.py found .. I wonder what version of python-virtinst dgoodwin used;...
Comment 3 Partha Aji 2009-05-01 16:12:10 EDT
]#  yum info python-virtinst
Loaded plugins: rhnplugin, security
Installed Packages
Name       : python-virtinst
Arch       : noarch
Version    : 0.300.2
Release    : 12.el5
Size       : 614 k
Repo       : installed
Summary    : Python modules for starting Xen guest installations
URL        : http://virt-manager.org/
License    : GPLv2+
Description: virtinst is a module to help in starting installations of Fedora/Red Hat Enterprise Linux related distributions
           : inside of virtual machines.  It supports both paravirt guests (for which only FC and RHEL guests are currently
           : supported) as well as fully virtualized guests.  It uses libvirt (http://www.libvirt.org) for starting things.
           : Also contained is a simple script virt-install which uses virtinst in a command line mode.
Comment 4 Steve Salevan 2009-05-15 15:28:09 EDT
The issue as reported is VERIFIED on the 5/7 ISO; however, you should be aware of the following issue, which is related:

Comment 5 Brandon Perkins 2009-09-10 15:25:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. 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.