Merge lp:~nttdata/nova/lp751231 into lp:~hudson-openstack/nova/trunk

Proposed by Kei Masumoto
Status: Merged
Approved by: Sandy Walsh
Approved revision: 944
Merged at revision: 975
Proposed branch: lp:~nttdata/nova/lp751231
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 18 lines (+8/-0)
1 file modified
nova/compute/manager.py (+8/-0)
To merge this branch: bzr merge lp:~nttdata/nova/lp751231
Reviewer Review Type Date Requested Status
Sandy Walsh (community) Approve
Soren Hansen (community) Needs Fixing
Brian Waldon (community) Approve
Devin Carlen (community) Approve
Review via email: mp+56334@code.launchpad.net

Description of the change

This branch fixes https://bugs.launchpad.net/bugs/751231.

In bug description, nova.compute.manager._poll_instance_states should ignore 'migrating' instances.
so I modified nova.compute.manager._poll_instance_states to do it.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Brian Waldon (bcwaldon) wrote :

I think the logging statement (lines 12-14) is off. "% locals()" should be moved out of the _(...)

review: Needs Fixing
Revision history for this message
Kei Masumoto (masumotok) wrote :

Hi, thanks for your review!
I just want to let you know I fixed patch based on your comments...

Kei

Revision history for this message
Brian Waldon (bcwaldon) wrote :

> Hi, thanks for your review!
> I just want to let you know I fixed patch based on your comments...
>
> Kei

Good work!

review: Approve
Revision history for this message
Soren Hansen (soren) wrote :

I don't think "info" is the correct log level for this message. This is something that is very likely to happen during migrations, so doesn't really warrant a message in anything but debug logs.

I also think we need to rephrase the log message. How about something like "Ignoring %(name)s, as it's currently being migrated."

review: Needs Fixing
Revision history for this message
Kei Masumoto (masumotok) wrote :

Thanks. Fixed it..

Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/compute/manager.py'
2--- nova/compute/manager.py 2011-04-07 23:52:48 +0000
3+++ nova/compute/manager.py 2011-04-08 18:40:04 +0000
4@@ -1090,6 +1090,14 @@
5 vm_state = vm_instance.state
6 vms_not_found_in_db.remove(name)
7
8+ if db_instance['state_description'] == 'migrating':
9+ # A situation which db record exists, but no instance"
10+ # sometimes occurs while live-migration at src compute,
11+ # this case should be ignored.
12+ LOG.debug(_("Ignoring %(name)s, as it's currently being "
13+ "migrated.") % locals())
14+ continue
15+
16 if vm_state != db_state:
17 LOG.info(_("DB/VM state mismatch. Changing state from "
18 "'%(db_state)s' to '%(vm_state)s'") % locals())