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 1436300 - update interface.rng to match the same file in libvirt
Summary: update interface.rng to match the same file in libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-27 15:27 UTC by Laine Stump
Modified: 2017-08-01 21:46 UTC (History)
5 users (show)

Fixed In Version: netcf-0.2.8-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1414404
Environment:
Last Closed: 2017-08-01 21:46:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1414404 0 unspecified CLOSED virt-xml-validate fail to validate interface xml 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2017:2220 0 normal SHIPPED_LIVE netcf bug fix update 2017-08-01 18:42:27 UTC

Internal Links: 1414404

Description Laine Stump 2017-03-27 15:27:13 UTC
+++ This bug was initially created as a clone of Bug #1414404 +++


The <start mode='blah'/> element in an interfact definition should be optional, but isn't. libvirt's RNG (schema for the XML) has been modified to make <start> optional (See Bug 1414404), and netcf needs to be modified in the same manner.

This is the libvirt patch:

https://www.redhat.com/archives/libvir-list/2017-March/msg01262.html

And this is the netcf patch:

https://lists.fedorahosted.org/archives/list/netcf-devel@lists.fedorahosted.org/thread/OCLPQ2WBSH7NPCHTYSWTCIVQ6QVWAUIR/

Comment 2 Laine Stump 2017-03-28 14:50:42 UTC
This is the upstream commit:

commit 1b76d1d0a027f933f79cb250fc461488ab7ccfe4
Author: Laine Stump <laine>
Date:   Mon Mar 27 00:49:09 2017 -0400

    make <start mode='blah'/>  optional

Comment 3 Laine Stump 2017-03-28 14:54:03 UTC
Resolved in this RHEL7.4-candidate build:

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=546862

Comment 5 yalzhang@redhat.com 2017-04-06 12:55:11 UTC
Reproduce it on netcf-0.2.8-2.el7.x86_64

get a xml dumped by ncftool with startmode, then delete it the startmode, the ncftool can not validate it

1. the interface xml dumped by ncftool will always have startmode element 
# ncftool dumpxml enp0s25 > /tmp/net
# cat /tmp/net
<?xml version="1.0"?>
<interface type="ethernet" name="enp0s25">
  <start mode="none"/>
  <mac address="1c:6f:65:06:bc:81"/>
  <protocol family="ipv4">
    <dhcp/>
  </protocol>
</interface>

2. delete the startmode in /tmp/net
# vim /tmp/net 
# cat /tmp/net
<?xml version="1.0"?>
<interface type="ethernet" name="enp0s25">
  <mac address="1c:6f:65:06:bc:81"/>
  <protocol family="ipv4">
    <dhcp/>
  </protocol>
</interface>


3. netcf can not validate this xml
# ncftool define /tmp/net
error: XML invalid
error: Expecting an element start, got nothing

update to netcf-0.2.8-4.el7.x86_64

4. 
# ncftool define /tmp/net
Defined interface enp0s25

The ethernet-interface, vlan-interface, bridge-interface, bond-interface will refer to "startmode"

# cat /usr/share/netcf/xml/interface.rng
...
280   <define name="startmode">
281     <optional>
282       <element name="start">
283         <attribute name="mode">
284           <choice>
285             <value>onboot</value>
286             <value>none</value>
287             <value>hotplug</value>
288             <!-- Jim Fehlig lists the following that SuSe supports:
289                  manual, ifplug, nfsroot -->
290           </choice>
291         </attribute>
292       </element>
293     </optional>
294   </define>
....

Comment 6 errata-xmlrpc 2017-08-01 21:46:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2220


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