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 1309529 - The domain can not ping outside or get IP after the network (route or nat mode) destroy and start during the domain running
Summary: The domain can not ping outside or get IP after the network (route or nat mod...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 03:25 UTC by yalzhang@redhat.com
Modified: 2016-02-18 08:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 08:29:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yalzhang@redhat.com 2016-02-18 03:25:57 UTC
Description of problem:
The domain can not ping outside or get IP after the network (route or nat mode) destroy and start during the domain running

Version-Release number of selected component (if applicable):
# rpm -q libvirt
libvirt-1.2.17-13.el7_2.3.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.3.0-31.el7_2.5.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Start a guest use default nat network.

[root@localhost tmp]# virsh start r7
Domain r7 started

[root@localhost tmp]# virsh dumpxml r7 | grep /interface -B8
    </controller>
    <interface type='network'>
      <mac address='52:54:00:48:ef:a8'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </interface>

2. On guest, check it can get dhcp ip and ping outside.
# ifconfig
ens11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.122.192  netmask 255.255.255.0  broadcast 192.168.122.255
        inet6 fe80::5054:ff:fe48:efa8  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:48:ef:a8  txqueuelen 1000  (Ethernet)
.............
# ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
64 bytes from 119.75.217.109: icmp_seq=1 ttl=48 time=31.0 ms
...........

3. On host, destroy and start the default network.
[root@localhost tmp]# arp | grep 192
192.168.122.192          ether   52:54:00:48:ef:a8   C                     virbr0

[root@localhost tmp]# virsh net-destroy default
Network default destroyed

[root@localhost tmp]# virsh net-start default
Network default started

[root@localhost tmp]# arp | grep 192
[root@localhost tmp]#

4. on guest, the network can not ping outside then even after restart.
guest# ping www.baidu.com
ping: unknown host www.baidu.com

guest# ping 10.66.5.120
PING 10.66.5.120 (10.66.5.120) 56(84) bytes of data.
From 192.168.122.192 icmp_seq=1 Destination Host Unreachable
From 192.168.122.192 icmp_seq=2 Destination Host Unreachable
^C

guest# ping 192.168.122.1
PING 192.168.122.1 (192.168.122.1) 56(84) bytes of data.
From 192.168.122.192 icmp_seq=1 Destination Host Unreachable
From 192.168.122.192 icmp_seq=2 Destination Host Unreachable
...

guest# ifconfig
ens11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.122.192  netmask 255.255.255.0  broadcast 192.168.122.255
...

guest# service network restart
Restarting network (via systemctl):  Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
                                                           [FAILED]


5. On the guest, restart it by ctrl+alt+del.The guest can not get ip.
guest# dhclient
guest# ifconfig
ens11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 52:54:00:48:ef:a8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 2052 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

6. Only after "virsh destroy r7" "virsh start r7", the guest can get ip and ping outside.
7. try other type of network in this scenario.


Actual results:
The guest can not ping outside after the nat network destroy and start during the guest running.
Routed network's performance is the same as nat in this scenario.
Other network type related with macvtap, the guest's network work well even after network on the host destroyed during the guest running.


Expected results:
The guest's network should work normally after host network restart.

Additional info:
N/A

Comment 2 yalzhang@redhat.com 2016-02-18 07:17:23 UTC
1. Correct the "Expected restults"
Expected results:
The guest's network should work normally after virtual network restart on host.

2. Add additional info for step 4 in reproduce steps,
[root@test Desktop]# service network restart
Restarting network (via systemctl):  Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
                                                           [FAILED]
[root@test Desktop]# systemctl status network.service
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since Thu 2016-02-18 14:55:42 CST; 1min 17s ago
  Process: 3432 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
  Process: 3620 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Feb 18 14:54:56 test network[3620]: Bringing up loopback interface:  Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Feb 18 14:54:56 test network[3620]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Feb 18 14:54:56 test network[3620]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Feb 18 14:54:57 test network[3620]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Feb 18 14:54:57 test network[3620]: [  OK  ]
Feb 18 14:55:42 test network[3620]: Bringing up interface eth0:  Error: Connection activation failed.
Feb 18 14:55:42 test network[3620]: [FAILED]
Feb 18 14:55:42 test systemd[1]: network.service: control process exited, code=exited status=1
Feb 18 14:55:42 test systemd[1]: Failed to start LSB: Bring up/down networking.
Feb 18 14:55:42 test systemd[1]: Unit network.service entered failed state.
[root@test Desktop]# 
[root@test Desktop]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::5054:ff:feff:75af  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:ff:75:af  txqueuelen 1000  (Ethernet)
        RX packets 61  bytes 4559 (4.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 83  bytes 10456 (10.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

After the host's virtual network restart during guest running, the guest can not get IP even after guest restart(do not use "virsh destroy" && "virsh start").

Comment 3 Jiri Denemark 2016-02-18 08:29:00 UTC
Yeah, destroying a network will disconnect all domains attached to it. If you want to change configuration of a running network with attached domain, use virsh net-update command (of course, there's only a limited set of parameters which can be set this way).


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