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

Proposed by Kei Masumoto
Status: Rejected
Rejected by: Brian Waldon
Proposed branch: lp://qastaging/~nttdata/nova/850602
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 145 lines (+47/-12)
2 files modified
nova/tests/test_libvirt.py (+17/-9)
nova/virt/libvirt/connection.py (+30/-3)
To merge this branch: bzr merge lp://qastaging/~nttdata/nova/850602
Reviewer Review Type Date Requested Status
Jason Kölker (community) Approve
Brian Waldon (community) Approve
Review via email: mp+75480@code.qastaging.launchpad.net

Description of the change

block migration needs to copy backing_file.
This branch enables existing nova handling backing_file.
Changes has been done to 2 methods in nova.virt.libvirt.connection.py.
 - pre_block_migration
 - get_instance_disk_info

Unit-test is also changed following this changes.

To post a comment you must log in.
Revision history for this message
Jason Kölker (jason-koelker) wrote :

Functionality looks good. Just a few fixes in the tests:

15 + #network_info = _fake_network_info(self.stubs, 1)
Instead of leaving the other network_info lines comented out, they should be deleted.

56 + open('/tmp/aaa', 'w+').write(str(info))
Do you mean to leave this file around?

Other than that, looks good.

review: Needs Fixing
Revision history for this message
Jason Kölker (jason-koelker) wrote :

There are also some pep8 issues that should be fixed before it hits trunk:

$ ./run_tests.sh -N -x -p
Running pep8 ...
nova/tests/test_libvirt.py:586:63: W291 trailing whitespace
        # as _fake_network_info calls utils.import_class() and
                                                              ^
    JCR: Trailing whitespace is superfluous.
    FBM: Except when it occurs as part of a blank line (i.e. the line is
         nothing but whitespace). According to Python docs[1] a line with only
         whitespace is considered a blank line, and is to be ignored. However,
         matching a blank line to its indentation level avoids mistakenly
         terminating a multi-line statement (e.g. class declaration) when
         pasting code into the standard Python interpreter.

         [1] http://docs.python.org/reference/lexical_analysis.html#blank-lines

    The warning returned varies on whether the line itself is blank, for easier
    filtering for those who want to indent their blank lines.

    Okay: spam(1)
    W291: spam(1)\s
    W293: class Foo(object):\n \n bang = 12
nova/tests/test_libvirt.py:771:63: W291 trailing whitespace
        # as _fake_network_info calls utils.import_class() and
                                                              ^
    JCR: Trailing whitespace is superfluous.
    FBM: Except when it occurs as part of a blank line (i.e. the line is
         nothing but whitespace). According to Python docs[1] a line with only
         whitespace is considered a blank line, and is to be ignored. However,
         matching a blank line to its indentation level avoids mistakenly
         terminating a multi-line statement (e.g. class declaration) when
         pasting code into the standard Python interpreter.

         [1] http://docs.python.org/reference/lexical_analysis.html#blank-lines

    The warning returned varies on whether the line itself is blank, for easier
    filtering for those who want to indent their blank lines.

    Okay: spam(1)
    W291: spam(1)\s
    W293: class Foo(object):\n \n bang = 12
nova/virt/libvirt/connection.py:1748:1: W293 blank line contains whitespace

^
    JCR: Trailing whitespace is superfluous.
    FBM: Except when it occurs as part of a blank line (i.e. the line is
         nothing but whitespace). According to Python docs[1] a line with only
         whitespace is considered a blank line, and is to be ignored. However,
         matching a blank line to its indentation level avoids mistakenly
         terminating a multi-line statement (e.g. class declaration) when
         pasting code into the standard Python interpreter.

         [1] http://docs.python.org/reference/lexical_analysis.html#blank-lines

    The warning returned varies on whether the line itself is blank, for easier
    filtering for those who want to indent their blank lines.

    Okay: spam(1)
    W291: spam(1)\s
    W293: class Foo(object):\n \n bang = 12

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

15, 85: I would prefer you just delete these lines rather than leave them commented out

115: This will definitely cause someone a headache down the road. Can you check local_gb instead of the name?

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

Hello Jason and Brian,
Thanks for review this path, and sorry late reply.
I fixed based on your comment. can you check this?

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

Thanks, Kei. Looks good!

review: Approve
Revision history for this message
Jason Kölker (jason-koelker) wrote :

Is Bueno!

review: Approve
Revision history for this message
Rafi Khardalian (rkhardalian) wrote :

Prior to having this patch I was having my root disks corrupted with block migrations using the latest Diablo release packages. I just applied the patch to my compute nodes and re-tested and it resolved the issue.

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

Kei: can you migrate this MP over to review.openstack.org?

lp://qastaging/~nttdata/nova/850602 updated
1575. By Kei Masumoto

delete unnecessary os.remove(disk) in pre_block_migration. block_migration fails if disk is removed.

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

Brian, thanks for notification! I migrated this MP, but unfortunately, "approbe" is not migrated. So could you check it again?

<https://review.openstack.org/#change,716>

Kei
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Brian Waldon
Sent: Tuesday, September 27, 2011 2:18 AM
To: <email address hidden>
Subject: Re: [Merge] lp:~nttdata/nova/850602 into lp:nova/diablo

Kei: can you migrate this MP over to review.openstack.org?
--
https://code.launchpad.net/~nttdata/nova/850602/+merge/75480
Your team NTT DATA is subscribed to branch lp:~nttdata/nova/850602.

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

moved to gerrit

Unmerged revisions

1575. By Kei Masumoto

delete unnecessary os.remove(disk) in pre_block_migration. block_migration fails if disk is removed.

1574. By Kei Masumoto

using instance['local_gb'] on creating backing file

1573. By Kei Masumoto

pep8 error and unnecessary debug statement fixed

1572. By Kei Masumoto

fix bugs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.