Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 521041 - ks traceback: kvm-guest with 50-char-length name
Summary: ks traceback: kvm-guest with 50-char-length name
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714 500798
TreeView+ depends on / blocked
 
Reported: 2009-09-03 09:49 UTC by Petr Sklenar
Modified: 2014-07-04 13:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-04 13:26:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Petr Sklenar 2009-09-03 09:49:42 UTC
Description of problem:
When kvm-guest's name is longer then 50 char there is traceback

Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090820.1

How reproducible:
always

Steps to Reproduce:
1. create kickstart for kvm guest
2. kvm-host > Virtualization > Provisioning > schedule your kickstart
3. add long name for guest like: psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced
4. traceback
  
Actual results:
traceback: name must be a string between 0 and 50

raise ValueError, _("%s name must be a string between 0 and 50 "D: Sending back response ((6,), 'Fatal error in Python code occured', {})

Expected results:
restrict length of guest-name in webUI

Additional info:
# rhn_check -vv #on kvm-host
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>
<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>spacewalk-koan</string></value>\n<value><string>0.1.11</string></value>\n<value><string>12.el5sat</string></value>\n<value><string></string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 453}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1251970561.98  with expiration of  1251974161.98  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010043, 'X-RHN-Auth-Server-Time': '1251970654.84', 'X-RHN-Auth': 'SrQKB2h7vsT7pVi0fWj8Vw==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-5', '20090902042145', '1', '1'], ['rhel-x86_64-server-vt-5', '20090902042142', '0', '1'], ['rhn-tools-rhel-x86_64-server-5', '20090828014546', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>spacewalk-koan</string></value>\n<value><string>0.1.11</string></value>\n<value><string>12.el5sat</string></value>\n<value><string></string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 453}
D: handle_action actionid = 453, version = 2
D: do_call packages.update ([['spacewalk-koan', '0.1.11', '12.el5sat', '', 'noarch']],)
Loaded plugins: rhnplugin
D: Called update [['spacewalk-koan', '0.1.11', '12.el5sat', '', 'noarch']]
Package spacewalk-koan-0.1.11-12.el5sat.noarch already installed and latest version
D: Dependencies Resolved
D: Downloading Packages:
D: Running Transaction Test
D: Finished Transaction Test
D: Transaction Test Succeeded
D: Running Transaction
Updating package profile
D: Sending back response (0, 'Update Succeeded', {})
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>kickstart_guest.initiate</methodName>\n<params>\n<param>\n<value><string>dhcp-lab-183.englab.brq.redhat.com</string></value>\n</param>\n<param>\n<value><string>dhcp-lab-131.englab.brq.redhat.com:2:psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><string>qemu</string></value>\n</param>\n<param>\n<value><int>123</int></value>\n</param>\n<param>\n<value><string>psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><int>512</int></value>\n</param>\n<param>\n<value><int>1</int></value>\n</param>\n<param>\n<value><int>10</int></value>\n</param>\n<param>\n<value><string>br0</string></value>\n</param>\n<param>\n<value><string>/var/lib/libvirt/images/psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><string> </string></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 454}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1251970574.77  with expiration of  1251974174.77  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010043, 'X-RHN-Auth-Server-Time': '1251970667.65', 'X-RHN-Auth': 'T/0uquHmqjUeBdnXNRgM4Q==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-5', '20090902042145', '1', '1'], ['rhel-x86_64-server-vt-5', '20090902042142', '0', '1'], ['rhn-tools-rhel-x86_64-server-5', '20090828014546', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>kickstart_guest.initiate</methodName>\n<params>\n<param>\n<value><string>dhcp-lab-183.englab.brq.redhat.com</string></value>\n</param>\n<param>\n<value><string>dhcp-lab-131.englab.brq.redhat.com:2:psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><string>qemu</string></value>\n</param>\n<param>\n<value><int>123</int></value>\n</param>\n<param>\n<value><string>psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><int>512</int></value>\n</param>\n<param>\n<value><int>1</int></value>\n</param>\n<param>\n<value><int>10</int></value>\n</param>\n<param>\n<value><string>br0</string></value>\n</param>\n<param>\n<value><string>/var/lib/libvirt/images/psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced</string></value>\n</param>\n<param>\n<value><string> </string></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 454}
D: handle_action actionid = 454, version = 2
D: do_call kickstart_guest.initiate ('dhcp-lab-183.englab.brq.redhat.com', 'dhcp-lab-131.englab.brq.redhat.com:2:psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced', 'qemu', 123, 'psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced', 512, 1, 10, 'br0', '/var/lib/libvirt/images/psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced', ' ')
- looking for Cobbler at http://dhcp-lab-183.englab.brq.redhat.com/cobbler_api
- reading URL: http://dhcp-lab-183.englab.brq.redhat.com/cblr/svc/op/ks/system/dhcp-lab-131.englab.brq.redhat.com:2:psklenar-rhel5server4-i386-KVMGUEST-actkey-vim-enhanced
install_tree: http://dhcp-lab-183.englab.brq.redhat.com/ty/rhqklcwX
libvirtd (pid  3721) is running...
- using qemu hypervisor, type=kvm
exceptions.ValueError
Guest name must be a string between 0 and 50 characters
  File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 191, in initiate_guest
    k.run()
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 312, in run
    self.virt()
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 601, in virt
    return self.net_install(after_download)
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 520, in net_install
    after_download(self, profile_data)
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 599, in after_download
    self.virt_net_install(profile_data)
   File "/usr/lib/python2.4/site-packages/koan/app.py", line 1080, in virt_net_install
    virt_type     =  self.virt_type
   File "/usr/lib/python2.4/site-packages/koan/qcreate.py", line 120, in start_install
    guest.set_name(name)
   File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 118, in set_name
    _util.validate_name(_("Guest"), val)
   File "/usr/lib/python2.4/site-packages/virtinst/_util.py", line 131, in validate_name
    raise ValueError, _("%s name must be a string between 0 and 50 "

D: Sending back response ((6,), 'Fatal error in Python code occured', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or package list recently updated)', {})


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