Bug 221268 - xendomains init script fails to save a domain with name > 17 characters
Summary: xendomains init script fails to save a domain with name > 17 characters
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Mark McLoughlin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-03 14:11 UTC by Daniel Berrangé
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-30 13:59:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2007-01-03 14:11:14 UTC
Description of problem:
If you have a guest running with a name greater than 17 characters in length,
the /etc/init.d/xendomains script will fail to save it upon shutdown.

Version-Release number of selected component (if applicable):
xen-3.0.3-17.el5

How reproducible:
Always

Steps to Reproduce:
1. xm rename demo  12345678901234567890123456789012345678901234567890
2. /etc/init.d/xendomains stop
3.
  
Actual results:
# /etc/init.d/xendomains  stop
Shutting down Xen domains: 12345678901234567(save)Error: Domain
'890123456789012345678901234567890' does not exist.
Usage: xm save <Domain> <CheckpointFile>

Save a domain state to restore later.
!(shut)Error: Domain '890123456789012345678901234567890' does not exist.
Usage: xm shutdown <Domain> [-waRH]

Shutdown a domain.


Expected results:
Guest is saved

Additional info:

If you look at the shell code in /etc/init.d/xendomains there's this interesting
function


parseln()
{
    name=`echo "$1" | cut -c0-17`
    name=${name%% *}
    rest=`echo "$1" | cut -c18- `
    read id mem cpu vcpu state tm < <(echo "$rest")
}

which is used to parse the output of 'xm list'. The 'cut -c0-17' bit looks
like the obvious problem - truncating the name at 17 characters :-(

Comment 1 RHEL Program Management 2007-01-03 14:20:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Mark McLoughlin 2007-03-30 13:59:56 UTC
Cloned this bug as #234595 for Fedora.

Confirmed the problem, and the fix seems pretty straightforward. Since it's not
particularily critical, I suggest we fix in rawhide and only pull the fix into
RHEL5 if we start getting requests for it. Closing the RHEL5 bug as WONTFIX.


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