Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 641541

Summary: "xentop" show no changes after "xm rename" changes the domain name
Product: Red Hat Enterprise Linux 5 Reporter: Binbin Yu <byu>
Component: xenAssignee: Michal Novotny <minovotn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: areis, leiwang, minovotn, mrezanin, mshao, rwu, xen-maint, yuzhang, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-122.el5 Doc Type: Bug Fix
Doc Text:
After a domain name was changed via the "xm rename" command, the xentop utility failed to properly reflect this change in its output. With this update, the setName() function has been fixed to propagate the new domain name to domain paths and back-end domain names, and xentop now shows these changes properly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 09:15:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 514500    
Attachments:
Description Flags
config file for rhel6.0(20100922.1) hvm guest
none
Patch to fix XenD's setName() method none

Description Binbin Yu 2010-10-09 06:10:05 UTC
Created attachment 452475 [details]
config file for rhel6.0(20100922.1) hvm guest

Description of problem:
After doing "xm rename" to change the domain name, "xm list" shows new domain name immediately, but "xentop" shows no change about the domain name.

Version-Release number of selected component (if applicable):
kernel-2.6.18-225.el5xen
xen-3.0.3-117.el5
guest: RHEL-Server-6.0
host: RHEL-5.5


How reproducible:
always

Steps to Reproduce:
1. xm rename $old-domain-name $new-domain
2. xm list
3. xentop
  

Actual results:
1) "xm list" shows the new domain name;
2) "xentop" always shows the old domain name in the xentop information. 


Expected results:
After renaming a domain, the new domain name should be showed everywhere.


Additional info:
doing "xenstore-read /vm/$uuid/name", shows the new domain name;
doing "xenstore-ls /local/domain/$domain-id |grep name"  shows the old domain name.

Comment 1 Yufang Zhang 2010-10-09 06:47:59 UTC
This bug is not critical. Move it to 5.7.

Comment 2 Michal Novotny 2010-12-02 13:39:12 UTC
(In reply to comment #1)
> This bug is not critical. Move it to 5.7.

Well, analysis shows that there are 3 places where domain name is being stored and just one of them is being renamed:

1) /vm/{UUID}/name - this is the only one that's changed by setName()
2) /local/domain/0/backend/{class}/{DOMID}/{DEVID}/name
3) /local/domain/{DOMID}/name

As mentioned above, only path in vmpath (1) is being changed but this introduces the issue for xentop since it's reading from /local/domain/{DOMID}/name as mentioned in comment #0. Based on that analysis I'm writing a patch to alter domain name at all 3 places.

Michal

Comment 3 Michal Novotny 2010-12-02 15:28:33 UTC
Created attachment 464275 [details]
Patch to fix XenD's setName() method

This is the patch to fix setName() method of XenD to rename not only /vm/{UUID}/name node in xenstore but also to rename backend domain names and name in the domain path, i.e. to alter /local/domain/{DOMID}/name and also
/local/domain/0/backend/{CLASS}/{DEVID}/name nodes.

Testing was done on RHEL-5 x86_64 host to rename RHEL-6 guest
to RHEL-666 and before the patch was applied just vmpath name
node was changed and xentop was showing old domain name.

After applying this patch all the nodes mentioned were aware
of new domain name and xentop was showing correct domain in
the domain list.

Michal

Comment 6 RHEL Program Management 2011-01-11 19:51:11 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 7 RHEL Program Management 2011-01-12 15:22:04 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 10 Yuyu Zhou 2011-03-17 13:55:47 UTC
Reproduced on xen-3.0.3-117.el5 and verified on xen-3.0.3-122.el5

Comment 11 Yuyu Zhou 2011-03-18 06:29:57 UTC
Plus also verified on xen-3.0.3-126.el5

Comment 12 Yuyu Zhou 2011-03-21 11:35:47 UTC
Steps to Reproduce and verify:
1. xm rename $old-domain-name $new-domain
2. xm list
3. xentop

Comment 13 Tomas Capek 2011-07-13 13:20:10 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:
After a domain name was changed via the "xm rename" command, the xentop utility failed to properly reflect this change in its output. With this update, the setName() function has been fixed to propagate the new domain name to domain paths and back-end domain names, and xentop now shows these changes properly.

Comment 14 errata-xmlrpc 2011-07-21 09:15:18 UTC
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.

http://rhn.redhat.com/errata/RHBA-2011-1070.html

Comment 15 errata-xmlrpc 2011-07-21 11:59:07 UTC
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.

http://rhn.redhat.com/errata/RHBA-2011-1070.html