The log info is error in the method '_sync_instance_power_state'

Bug #1370885 reported by Zi Lian Ji
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Sean Dague

Bug Description

In the method '_sync_instance_power_state', the log info is wrong.

if self.host != db_instance.host:
            # on the sending end of nova-compute _sync_power_state
            # may have yielded to the greenthread performing a live
            # migration; this in turn has changed the resident-host
            # for the VM; However, the instance is still active, it
            # is just in the process of migrating to another host.
            # This implies that the compute source must relinquish
            # control to the compute destination.
            LOG.info(_("During the sync_power process the "
                       "instance has moved from "
                       "host %(src)s to host %(dst)s") %
                       {'src': self.host,
                        'dst': db_instance.host},
                     instance=db_instance)
            return

The 'src' value should be 'db_instance.host'and the 'dst' value should be the 'self.host'. The method '_post_live_migration' should be invoked after the live migration completes and it is used to update the database.

In the situation, the instance has been migrated to another host successfully and the database has not been updated. The '_sync_instance_power_state' method is executed. Nova can list it in the dst host with the driver and the data in the database should be the source host.

Tags: logging
Sean Dague (sdague)
Changed in nova:
importance: Undecided → Low
tags: added: logging
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/122385

Changed in nova:
assignee: nobody → Sean Dague (sdague)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/122385
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=027a913a304f8e7000fa3e8ede7776e250a029fb
Submitter: Jenkins
Branch: master

commit 027a913a304f8e7000fa3e8ede7776e250a029fb
Author: Sean Dague <email address hidden>
Date: Thu Sep 18 06:36:26 2014 -0400

    correct _sync_instance_power_state log message

    As reported by a user: the src and dest hosts listed were actually in
    reverse order, making this log message quite confusing to
    operators. Flipped to the correct requested order.

    Change-Id: If9b31bceb56b66af70cddb88dbece7a180e4c2c8
    Closes-Bug: #1370885

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.