Bug 967720 - ncftool list/virsh iface-list met error when filename have a comma(,) or the exclamation mark(!) suffix in /etc/sysconfig/network-scripts/
ncftool list/virsh iface-list met error when filename have a comma(,) or the ...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf (Show other bugs)
7.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Laine Stump
Virtualization Bugs
:
Depends On:
Blocks: 967722
  Show dependency treegraph
 
Reported: 2013-05-28 02:51 EDT by Hu Jianwei
Modified: 2013-07-02 10:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 967722 (view as bug list)
Environment:
Last Closed: 2013-07-02 10:59:16 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)

  None (edit)
Description Hu Jianwei 2013-05-28 02:51:27 EDT
Description of problem:
virsh iface-list met error when filename have a comma(,) or the exclamation mark(!) suffix in /etc/sysconfig/network-scripts path

Version-Release number of selected component (if applicable):
libvirt-1.0.5-2.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
netcf-0.2.3-4.bz961184.el7.x86_64

How reproducible:
100%

Steps:
1. List all ifcfg-* scripts in /etc/sysconfig/network-scripts.

[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
Name                 State      MAC Address
--------------------------------------------
eth1                 active     b4:b5:2f:af:a1:01
eth3                 active     00:1b:21:55:b3:b9
lo                   active     00:00:00:00:00:00

2. Add file with , and !, like below:
ifcfg-eth1,
ifcfg-eth1!

3. Run virsh iface-list agagin.
[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1,   <======== new file
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
error: Failed to list interfaces
error: internal error failed to get number of host interfaces: unspecified error - errors in loading some config files

[root@SRIOV2 network-scripts]# touch ifcfg-eth1!
[root@SRIOV2 network-scripts]# ls | grep ifcfg-
ifcfg-eth1
ifcfg-eth1!   <========new file
ifcfg-eth1.bak
ifcfg-eth2
ifcfg-eth3
ifcfg-eth3.bak
ifcfg-eth4
ifcfg-eth5
ifcfg-lo
[root@SRIOV2 network-scripts]# virsh iface-list --all
error: Failed to list interfaces
error: internal error failed to get number of host interfaces: unspecified error - errors in loading some config files

Using ncftool command line:
[root@hujianweitest network-scripts]#  --all
error: unspecified error
error: errors in loading some config files


Actual results:
The command met above error.

Expected results:
The iface-list should filter the invalid netwok-scripts for it or can deal with this abnormal status. For these chars are good for iface-list, such as @ * $ % ^ ~ ; : ? 

Netcf should check those two chars.
Comment 2 Laine Stump 2013-07-02 10:59:16 EDT
While odd, this isn't something that would occur in normal usage, and there are currently no resources to work on it.

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