Bug 733669 - report a specific migration on failure due to hostname lookup failure
Summary: report a specific migration on failure due to hostname lookup failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Federico Simoncelli
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 734487 737809
TreeView+ depends on / blocked
 
Reported: 2011-08-26 12:49 UTC by Andrew Cathrow
Modified: 2016-04-18 06:42 UTC (History)
12 users (show)

Fixed In Version: vdsm-4.9-101
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 737809 (view as bug list)
Environment:
Last Closed: 2011-12-06 07:25:52 UTC


Attachments (Terms of Use)
bz733669.tar.gz (514.42 KB, application/x-gzip)
2011-08-29 13:48 UTC, Federico Simoncelli
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1782 normal SHIPPED_LIVE new packages: vdsm 2011-12-06 11:55:51 UTC

Comment 2 Dan Kenigsberg 2011-08-26 22:10:44 UTC
Federico, would you double-check that libvirt fails migration when no dns entry
exists for the destination host (I'm definite that bad things happen with a
wrong dns entry).

Comment 6 Federico Simoncelli 2011-08-29 13:48:48 UTC
Created attachment 520402 [details]
bz733669.tar.gz

(In reply to comment #2)
> Federico, would you double-check that libvirt fails migration when no dns entry
> exists for the destination host (I'm definite that bad things happen with a
> wrong dns entry).

# hostname
vm-rhev3.telemaco.homelinux.net
# host vm-rhev3.telemaco.homelinux.net
vm-rhev3.telemaco.homelinux.net has address 192.168.123.43

<migration succeeded>

# hostname -v vm-rhev-none.telemaco.homelinux.net
Setting hostname to `vm-rhev-none.telemaco.homelinux.net'
# host vm-rhev-none.telemaco.homelinux.net
Host vm-rhev-none.telemaco.homelinux.net not found: 3(NXDOMAIN)

<migration failed>

Thread-163::ERROR::2011-08-29 13:10:02,010::clientIF::759::vds::(migrationCreate) Migration failed: local hostname is not correct
Thread-163::DEBUG::2011-08-29 13:10:02,011::clientIF::59::vds::(wrapper) return migrationCreate with {'status': {'message': 'Error creating the requested virtual machine', 'code': 9}}

# cp -a /usr/share/vdsm/clientIF.py /usr/share/vdsm/clientIF.py.orig
# diff -u /usr/share/vdsm/clientIF.py.orig /usr/share/vdsm/clientIF.py
--- /usr/share/vdsm/clientIF.py.orig	2011-08-26 09:37:17.000000000 +0000
+++ /usr/share/vdsm/clientIF.py	2011-08-29 13:14:22.393405372 +0000
@@ -755,9 +755,9 @@
         """
         self.log.debug('Migration create')
 
-        if not utils.validLocalHostname():
-            self.log.error('Migration failed: local hostname is not correct')
-            return errCode['createErr']
+#       if not utils.validLocalHostname():
+#           self.log.error('Migration failed: local hostname is not correct')
+#           return errCode['createErr']
 
         response = self.create(params)
         if response['status']['code']:

# service vdsmd restart

<migration failed>

On source (vm-rhev2) libvirtd crashes/restarts:

Thread-87::ERROR::2011-08-29 13:40:38,231::libvirtconnection::73::vds::(wrapper) connection to libvirt broken. taking vdsm down.
Thread-87::INFO::2011-08-29 13:40:38,232::dispatcher::94::Storage.Dispatcher.Protect::(run) Run and protect: prepareForShutdown, args: ()

On destination (vm-rhev3) the migration is reported as completed to vdsm:

Thread-40::DEBUG::2011-08-29 13:40:36,297::libvirtvm::1039::vm.Vm::(_waitForIncomingMigrationFinish) vmId=`654b3aa4-5fa9-4f26-b1b8-1f1ef386e90c`::End of migration

But the vm was never migrated.

Detailed logs as attachment.

Comment 21 Federico Simoncelli 2011-09-12 14:43:35 UTC
commit 55fefdfe26429a30e126a02f585b7119a4ff7cfc
Author: Federico Simoncelli <fsimonce@redhat.com>
Date:   Fri Sep 9 17:01:26 2011 +0000

    BZ#733669 Return specific error for invalid host
    
    Change-Id: Iaf0ae2d62772b01d05d9d5e62d2433c1758d69b1

http://gerrit.usersys.redhat.com/924

Comment 26 Jakub Libosvar 2011-10-19 15:01:04 UTC
Verified ic145, vdsm-108

Comment 27 errata-xmlrpc 2011-12-06 07:25:52 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.

http://rhn.redhat.com/errata/RHEA-2011-1782.html


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