+++ This bug was initially created as a clone of Bug #613886 +++ Description of problem: Install RHEL6 beta2 os by default, virsh iface command can not list interface correctly. # virsh iface-list --all Name State MAC Address -------------------------------------------- lo active 00:00:00:00:00:00 "eth0" inactive Version-Release number of selected component (if applicable): NetworkManager-0.8.1-2.el6.x86_64 kernel-2.6.32-44.el6.x86_64 libvirt-0.8.1-13.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Install rhel6 beta2 os (RHEL6.0-20100707.4) on host. 2. Issue virsh iface command to list host interface. # virsh iface-list --all Name State MAC Address -------------------------------------------- lo active 00:00:00:00:00:00 "eth0" inactive # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:A6:FB:CC inet addr:10.66.92.185 Bcast:10.66.93.255 Mask:255.255.254.0 inet6 addr: 3ffe:501:ffff:100:225:64ff:fea6:fbcc/64 Scope:Global inet6 addr: fe80::225:64ff:fea6:fbcc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11196 errors:0 dropped:0 overruns:0 frame:0 TX packets:277 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1785925 (1.7 MiB) TX bytes:36389 (35.5 KiB) Memory:febe0000-fec00000 # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:25:64:A6:FB:CC" IPV6INIT="yes" IPV6_AUTOCONF="yes" NM_CONTROLLED="yes" ONBOOT="yes" Actual results: virsh iface list --all will display eth0 with double quotation, and the eth0 interface's status is not correct. Expected results: virsh iface list --all should display host interface name and status correctly. Additional info: After I remove the double quotation in /etc/sysconfig/network-scripts/ifcfg-eth0, the virsh iface command works fine. # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:25:64:A6:FB:CC IPV6INIT=yes IPV6_AUTOCONF=yes NM_CONTROLLED=yes ONBOOT=yes # virsh iface-list --all Name State MAC Address -------------------------------------------- eth0 active 00:25:64:a6:fb:cc lo active 00:00:00:00:00:00 I guest maybe the issue is caused by inconsistency between virsh iface and NetworkManager. --- Additional comment from berrange on 2010-07-13 05:40:13 EDT --- This looks like a pretty basic parser error in netcf. Including quotes is certainly allowed & needs to be taken into account. --- Additional comment from laine on 2010-07-13 11:17:31 EDT --- Yeah this is something that somebody just started doing recently, which is why it hasn't popped up before now. (I actually saw it once about a week ago for the first time, but assumed at the time that it was something I'd messed up, not that it came that way out of the box). David - is this something that has to be handled in Augeas, or at a higher level? --- Additional comment from laine on 2010-07-14 19:33:24 EDT --- Dan - do you know what code has changed that's started putting quotes around all the values in the ifcfg-* files? (who makes the original ifcfg files? anaconda?) I have no problem supporting the reading of these files, but am loathe to start quoting when writing *to* the files without knowing why they're showing up this way now. (In particular, if they're just stripped off when augeas reads them in, during the write there would be no information about whether or not to quote (what about newly defined values?) and I don't want to start quoting everything in ifcfg-* files on older systems; who knows what other tools / scripts that might screw up... I notice that NetworkManager unquotes everything as it writes it, unless there's a space in the value, which makes sense to me) --- Additional comment from weizhan on 2010-07-15 03:14:01 EDT --- It affects the virt-manager on adding new network interface on host. --- Additional comment from berrange on 2010-07-15 05:11:06 EDT --- IMHO it isn't relevant what app is putting quotes, because an admin editing the files themselves is just as likely to add quotes. So we need to cope with this regardless. The ifcfg-XXX files are technically in "shell" syntax, hence quotes are required if the value contains whitespace or other shell meta characters, otherwise optional. --- Additional comment from laine on 2010-07-15 11:31:13 EDT --- I both agree and disagree with you. I agree that netcf should be able to handle quoted values, but do think knowing who made the change is relevant - it's possible it was just a gratuitous change (likely) in which case it won't be a problem if netcf writes out modified lines with unquoted values, but it's also possible that someone made the change and now expects all the values to be quoted (very unlikely, but possible). --- Additional comment from laine on 2010-07-20 09:00:45 EDT --- A fix has been committed upstream: https://fedorahosted.org/pipermail/netcf-devel/2010-July/000431.html I've tested this, and it does properly solve the problem. Now awaiting the necessary ACKs to put it into RHEL.
netcf-0.1.7-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc14
netcf-0.1.7-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc13
netcf-0.1.7-1.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc12
netcf-0.1.7-1.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update netcf'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc14
netcf-0.1.7-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
netcf-0.1.7-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
netcf-0.1.7-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.