Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1436300 - update interface.rng to match the same file in libvirt
update interface.rng to match the same file in libvirt
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Laine Stump
yalzhang@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-27 11:27 EDT by Laine Stump
Modified: 2017-08-01 17:46 EDT (History)
5 users (show)

See Also:
Fixed In Version: netcf-0.2.8-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1414404
Environment:
Last Closed: 2017-08-01 17:46:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2220 normal SHIPPED_LIVE netcf bug fix update 2017-08-01 14:42:27 EDT

  None (edit)
Description Laine Stump 2017-03-27 11:27:13 EDT
+++ 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 10:50:42 EDT
This is the upstream commit:

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

    make <start mode='blah'/>  optional
Comment 3 Laine Stump 2017-03-28 10:54:03 EDT
Resolved in this RHEL7.4-candidate build:

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=546862
Comment 5 yalzhang@redhat.com 2017-04-06 08:55:11 EDT
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 17:46:42 EDT
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.