RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 616721 - RFE: Introduce API for XML normalization
Summary: RFE: Introduce API for XML normalization
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 7.1
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 840344 (view as bug list)
Depends On:
Blocks: 813191
TreeView+ depends on / blocked
 
Reported: 2010-07-21 09:34 UTC by xhu
Modified: 2016-04-26 15:22 UTC (History)
12 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-07 12:13:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description xhu 2010-07-21 09:34:37 UTC
Description of problem:
Errors as follows occurs when dettach device from xml file without mac field:
error: Failed to detach device from interface.xml
error: operation failed: network device 52:54:00:4f:58:1a not found 
Note:
it seems that that "52:54:00:4f:58:1a" is a random sequence num and it will change every time you executed it.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-15.el6.x86_64
kernel-2.6.32-44.1.el6.x86_64
qemu-img-0.12.1.2-2.96.el6.x86_64
qemu-kvm-0.12.1.2-2.96.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Start a kvm guest
2.Prepare a interface xml as following:
# more interface.xml
   <interface type='network'>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
3. Issue below command :
   # virsh attach-device <guest name> interface.xml
4. Issue below command:
  # virsh dumpxml rhel5u4_x86_64_xenpv
5. Log into guest, make sure the newly added interface works fine.
6. Issue below command in gnome-terminal:
   # virsh detach-device <guest name> interface.xml
  
Actual results:
Step 6: Errors as follows occurs when dettach device from xml file without mac feild:
error: Failed to detach device from interface.xml
error: operation failed: network device 52:54:00:4f:58:1a not found 
if I mofify interface,xml as follows, the device can be detached successfully:
<interface type='network'>
<mac address='52:54:00:5b:c1:59'/>
      <source network='default'/>
      <model type='virtio'/>
</interface>


Expected results:
Step 6: If there must be mac feild in xml file when dettaching device, the errors should be "You must specify mac address in xml file" not "error: Failed to detach device from interface.xml
error: operation failed: network device 52:54:00:4f:58:1a not found "
Note:
it seems that that "52:54:00:4f:58:1a" is a random sequence num and it will change every time you executed it.


Additional info:

Comment 4 Michal Privoznik 2011-04-18 12:36:55 UTC
Patches sent upstream. Waiting for review:

https://www.redhat.com/archives/libvir-list/2011-March/msg01188.html

Comment 7 Michal Privoznik 2011-11-22 10:29:38 UTC
Another try:

https://www.redhat.com/archives/libvir-list/2011-November/msg01172.html

Comment 8 Michal Privoznik 2011-11-23 09:58:24 UTC
Moving to POST:

commit ea7182c29f185e7c1527b10fbe16dc4ba1f45a88
Author:     Michal Prívozník <mprivozn>
AuthorDate: Mon Jun 6 12:20:11 2011 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Nov 23 10:24:43 2011 +0100

    virsh: Increase device-detach intelligence
    
    Up to now users have to give a full XML description on input when
    device-detaching. If they omitted something it lead to unclear
    error messages (like generated MAC wasn't found, etc.).
    With this patch users can specify only those information which
    specify one device sufficiently precise. Remaining information is
    completed from domain.

v0.9.7-130-gea7182c

Comment 10 xhu 2012-01-10 08:21:11 UTC
Verify it with libvirt-0.9.9-1.el6 and it passed.

Comment 11 Dave Allan 2012-01-10 15:33:05 UTC
We are reverting this patch because it causes a regression BZ 768268

Comment 17 Michal Privoznik 2013-09-17 14:50:11 UTC
Patches proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-September/msg00982.html

Comment 18 Michal Privoznik 2013-10-16 08:48:59 UTC
*** Bug 840344 has been marked as a duplicate of this bug. ***

Comment 19 Jiri Denemark 2014-08-07 12:13:12 UTC
The discussion initiated by the patch from comment 17 had the following outcome:

- there's no real use case for this API
- part of the reasons may be covered by RNG validation (bug 888748)

Let's close this RFE.


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