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 1160212 - libvirt doesn't stop the NBD server after migration
Summary: libvirt doesn't stop the NBD server after migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-04 11:01 UTC by Ján Tomko
Modified: 2015-03-05 07:46 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.8-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:46:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Ján Tomko 2014-11-04 11:01:46 UTC
Description of problem:
After migration with NBD, the NBD server stays running on the destination, occupying a TCP port.

Version-Release number of selected component (if applicable):
libvirt-1.2.8-5.el7.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. Migrate a domain with --copy-storage-all

Actual results:
netstat -tnap shows qemu still listens on a port:
tcp6       0      0 :::49153                :::*                    LISTEN      8073/qemu-kvm       


Expected results:
The ports are no longer used after the migration finishes.

Additional info:
Upstream patch sent by Weiwei Li:
https://www.redhat.com/archives/libvir-list/2014-November/msg00046.html

Comment 1 Ján Tomko 2014-11-04 11:09:06 UTC
Fixed upstream by:
commit c3012a023f2ae5763027cafc1cf2881a3c7c4b45
Author:     Weiwei Li <nuonuoli>
AuthorDate: 2014-11-04 10:52:10 +0100
Commit:     Ján Tomko <jtomko>
CommitDate: 2014-11-04 10:54:53 +0100

    qemu: stop NBD server after successful migration
    
    In qemuMigrationFinish mig->nbd can not be initialized by
    qemuMigrationEatCookie without the QEMU_MIGRATION_COOKIE_NBD flag.
    That causes qemuMigrationStopNBDServer to return early without
    stopping the NBD server properly.
    
    Signed-off-by: Weiwei Li <nuonuoli>
    Signed-off-by: Ján Tomko <jtomko>

git describe: v1.2.10-14-gc3012a0

Comment 5 zhenfeng wang 2014-11-19 03:36:54 UTC
I can reproduce this bug with libvirt-1.2.8-5.el7.x86_64

steps 
1.migrate guest from the source to the target with --copy-storage-all option

# virsh migrate --live --copy-storage-all rhel6 qemu+ssh://10.66.100.131/system --verbose
root.100.131's password: 
Migration: [100 %]

2.After finish migration, still could see the nbd service occupying a TCP port.

# netstat -tunlp|grep qemu-kvm
      
tcp6       0      0 :::49154                :::*                    LISTEN      2934/qemu-kvm       

Verify this bug with libvirt-1.2.8-7.el7, after finish storage migration with --copy-storage-all, the nbd service will release all ports which its occupy previous

# netstat -tunlp|grep qemu-kvm
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      3455/qemu-kvm

Comment 7 errata-xmlrpc 2015-03-05 07:46:50 UTC
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/RHSA-2015-0323.html


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