Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
virsh domif-getlink cmd gets 'default' which is a invalid link state. Values for link state are 'up' or 'down' in virsh's manual and libvirt docs.
Version-Release number of selected component (if applicable):
libvirt-1.2.8-2.el7.x86_64
libvirt-docs-1.2.8-2.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
[root@localhost ~]# virsh dumpxml a | grep interface -A5
<interface type='network'>
<mac address='52:54:00:e9:4b:7a'/>
<source network='network'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[root@localhost ~]# virsh domif-getlink a 52:54:00:e9:4b:7a
52:54:00:e9:4b:7a default
[root@localhost ~]# virsh domif-setlink a 52:54:00:e9:4b:7a default
error: invalid link state 'default'
[root@localhost ~]# man virsh
...
domif-setlink domain interface-device state [--config]
Modify link state of the domain's virtual interface. Possible values for state are "up" and "down.
...
domif-getlink domain interface-device [--config]
Query link state of the domain's virtual interface. If --config is specified, query the persistent configuration, for compatibility purposes, --persistent is alias of --config.
interface-device can be the interface's target name or the MAC address.
...
[root@localhost ~]# firefox file:///usr/share/doc/libvirt-docs-1.2.8/html/formatdomain.html#elementLink
...
Modifying virtual link state
This element provides means of setting state of the virtual network link. Possible values for attribute state are up and down. If down is specified as the value, the interface behaves as if it had the network cable disconnected. Default behavior if this element is unspecified is to have the link state up.
Actual results:
As description.
Expected results:
If link state element is unspecified in xml, virsh domif-getlink cmd should get 'up'.
Fixed upstream:
commit d9c7f014ee7c23d25483acf4bce344fae169f1dd
Author: Erik Skultety <eskultet>
Date: Tue Feb 24 17:25:55 2015 +0100
virsh: tweak domif-getlink link state reporting message
According to docs, we only support 2 link states for an interface
up/down, 'up' being the default state if link state is unspecified in
domain's XML, so the message when no link state is provided should be
changed a little.
v1.2.13-55-gd9c7f01
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://rhn.redhat.com/errata/RHBA-2015-2202.html