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.

Bug 1227641

Summary: Newly added VLAN network cannot start/stop normally with ipv4 address setting
Product: Red Hat Enterprise Linux 7 Reporter: fwu
Component: initscriptsAssignee: Jan Macku <jamacku>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: jamacku, jscotka, juzhou, lnykryn, mzhan, phrdina, tzheng, xiaodwan
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 07:34:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ifcfg file none

Description fwu 2015-06-03 08:23:29 UTC
Description of problem:
1. New added VLAN network cannot start/stop normally with ipv4 address setting.
2. VLAN network cannot get ipv4 address by ipv4 DHCP mode.
3. Virt-manager cannot sync VLAN network status immediately on graphical console.

Version-Release number of selected component (if applicable):
virt-manager-1.2.0-4.el7.noarch
libvirt-1.2.15-2.el7.x86_64

How reproducible:
90%

Scenario 1: Uncheck "active now" when create VLAN network

Steps to reproduce:
1. Launch virt-manager: #virt-manager.
2. Click Edit->Host Details.
3. Click Network Interfaces tab on Host Details dialogue.
4. Click + button.
5. Select interface type as 'VLAN', click Forward button.
6. Select start mode as 'hotplug', disable activate now, Fill VLAN tag as 1, configure IP settings as IPV4: DHCP, choose enp0s25 as parent interface. Click Finish button.
7. After enp0s25 appear, start the interface by pressing "Start interface" button.
8. Check the network status by executing: #ifconfig enp0s25.1
9. Stop the interface by pressing "Stop interface" button, then repeat Step 8.
10. Start the VLAN network again by executing: #ifup enp0s25.1, then repeat Step 8.

Actual Result:
1. After Step 7, 1-2 minutes later, an error message occur. The status of the interface is inactive. Re-enter this tab, the status of this interface become active.
Error creating interface: 'Could not create interface: internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 1: 
Determining IP information for enp0s25.1... failed.
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1140, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/share/virt-manager/virtinst/interface.py", line 273, in install
    raise RuntimeError(errmsg)
RuntimeError: Could not create interface: internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 1: 
Determining IP information for enp0s25.1... failed.

2. After Step 8, the VLAN network is running but there is no valid ipv4 address.
#ifconfig enp0s25.1
enp0s25.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::3e97:eff:fe22:ab2c  prefixlen 64  scopeid 0x20<link>
        ether 3c:97:0e:22:ab:2c  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14  bytes 2700 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

3. After Step 9, an error message occur. After repeating step 8, find out that the network has stopped.
Error stopping interface 'enp0s25.1': internal error: failed to destroy (stop) interface enp0s25.1: failed to execute external program - Running 'ifdown enp0s25.1' failed with exit code 1: 

4. After Step 10, 1-2 minutes later, the console will report an error. After repeating step 8, find out that the network is activated.
#ifup enp0s25.1

Determining IP information for enp0s25.1...failed.

Scenario 2: Check "active now" when create VLAN network

Steps:
1. Launch virt-manager: #virt-manager, click Edit->Host Details.
2. Click + button on Network Interfaces tab to add a new VLAN device.
3. Enable activate now when configure the new VLAN device, the rest are the same as Scenario 1. Click Finish button.
4. After enp0s25 appear, check the status of vlan network by executing: #ifconfig enp0s25.1

Actual Result:
1.After Step 3, an error message occur. There is no newly created VLAN interface shown in virt-manager.
Error creating interface: 'Could not create interface: internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 1: 
Determining IP information for enp0s25.1... failed.
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1140, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/share/virt-manager/virtinst/interface.py", line 273, in install
    raise RuntimeError(errmsg)
RuntimeError: Could not create interface: internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 1: 
Determining IP information for enp0s25.1... failed.

2. After Step 4, the VLAN network is running but there is no valid ipv4 address.
#ifconfig enp0s25.1
enp0s25.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::3e97:eff:fe22:ab2c  prefixlen 64  scopeid 0x20<link>
        ether 3c:97:0e:22:ab:2c  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14  bytes 2700 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Expected results:
The VLAN network can create normally with valid ipv4 address.


Additional info:
After Step 7 of scenario 1, when checking the VLAN network status back on virt-manager, the status remains "inactive". However, when I switch to another tab, and then switch back, the network status was refreshed. The status was changed to "active".
Correspondingly, after Step 9 of scenario 1, when checking the VLAN network status back on virt-manager, the status remains "active". However, when I switch to another tab, and then switch back, the network status was refreshed. The status was changed to "inactive".
The situation is the same when applying to Scenario 2.

Comment 2 Pavel Hrdina 2015-07-08 12:53:26 UTC
Hi, I've tried to reproduce this bug, but I cannot reproduce it.  Could you please try it again with updated system and current version of virt-manager?

Comment 3 zhoujunqin 2015-07-09 06:34:13 UTC
(In reply to Pavel Hrdina from comment #2)
> Hi, I've tried to reproduce this bug, but I cannot reproduce it.  Could you
> please try it again with updated system and current version of virt-manager?

Hi Pavel,

I try to test again with package:
libvirt-1.2.17-1.el7.x86_64
qemu-kvm-rhev-2.3.0-8.el7.x86_64
kernel-3.10.0-292.el7.x86_64
virt-manager-1.2.1-2.el7.noarch

With steps in Comment 0, I can also reproduce this bug issue.

Comment 4 Pavel Hrdina 2015-08-04 12:30:07 UTC
I've looked at this bug closely and it's not a virt-manager bug.  Virt-manager is not responsible for assigning IP addresses.  The error message is clear, that external program "ifup" failed and there is nothing we can do about that.  There is probably something wrong with your network.

The only bug here is the fact, that if you start the interface using "ifup", the status of the interface isn't updated in virt-manager and you need to switch to different tab and back to the "network Interfaces" tab back.  Probably create a new bug for the "update issue", in general, each issue should have separate bug.

Comment 5 fwu 2015-08-05 06:03:23 UTC
Hi Pavel, I have filed Bug 1250307 as you mentioned on Comment 4.

Moreover, the first point you mentioned on Comment 4 can be reproduced by several machines in our testing group. It should be the problem of other component. Therefore, I strongly recommend that this bug should move to another component.

Comment 6 XiaoQing 2015-08-05 07:26:03 UTC
Hi all

I file the bug about ifup command which belong to kernel.
If you roll back the elder version initscripts, No error info pops up after clicking start button.

Comment 7 fwu 2015-09-01 09:55:24 UTC
The same problem in the description occurs in the latest package/tree.

According to Comment 6 and Bug 1245567, move component from virt-manager to initscripts.

Version-Release number of selected component (if applicable):
kernel-3.10.0-302.el7.x86_64
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-6.el7.x86_64
initscripts-9.49.27-1.el7.x86_64

Tree version:
RHEL-7.2-20150806.1

Steps and result are the same as Comment 0.
Therefore, reopen this bug.

Comment 8 fwu 2015-09-01 11:37:49 UTC
I made a mistake on Comment 7.
The tree version should be RHEL-7.2-20150820.0, not RHEL-7.2-20150806.1.
Sorry for any inconvenience.

Comment 9 Lukáš Nykrýn 2015-09-01 14:36:07 UTC
This looks like a failure form dhclient. But anyway, can you post here your ifcfg files?

Comment 10 XiaoQing 2015-09-02 03:20:51 UTC
(In reply to Lukáš Nykrýn from comment #9)
> This looks like a failure form dhclient. But anyway, can you post here your
> ifcfg files?

fwu takes a intern leave today.
So I reply you here.
I reproduce this bug in latest tree of rhel7.2 and I will represent the fail info from virt-manager.
The attachment is ifcfg-enp0s25.1 which is the ifcfg file of VLAN

Error starting interface 'enp0s25.1': internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 4: Error: Connection activation failed.


Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/interface.py", line 68, in start
    self._backend.create(0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3041, in create
    if ret == -1: raise libvirtError ('virInterfaceCreate() failed', net=self)
libvirtError: internal error: failed to create (start) interface enp0s25.1: failed to execute external program - Running 'ifup enp0s25.1' failed with exit code 4: Error: Connection activation failed.

Comment 11 XiaoQing 2015-09-02 03:23:25 UTC
Created attachment 1069265 [details]
ifcfg file

Comment 18 RHEL Program Management 2020-12-15 07:34:39 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.