Merge lp://qastaging/~jordanrinke/nova/hypervupdate into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Jordan Rinke
Status: Work in progress
Proposed branch: lp://qastaging/~jordanrinke/nova/hypervupdate
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 198 lines (+137/-15)
2 files modified
bin/nova-compute (+57/-7)
nova/virt/hyperv.py (+80/-8)
To merge this branch: bzr merge lp://qastaging/~jordanrinke/nova/hypervupdate
Reviewer Review Type Date Requested Status
Vish Ishaya (community) Needs Fixing
Soren Hansen (community) Needs Fixing
Review via email: mp+74323@code.qastaging.launchpad.net

Description of the change

Update to bin/nova-compute to allow nova to run as a service on windows and various fixes to hyperv.py and the addition of difference disk support.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

hey jordan fixes look good, but is it necessary to change every file to executable? Also, looks like you added some tabs in. Can you switch them to spaces?

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

Yes, we do not want everything to be executable, because... well, they aren't. Attempts to run the vast majority of these things will blow up in your face (no #! magic to point it to a python interpreter). Please fix that.

You've added a duplicate "import sys" in nova-compute

> +class compute_win32_service(win32serviceutil.ServiceFramework):

Is there any parts of the win32serviceutil framework that forces a specific naming scheme for classes? If not, please change the class name to match our usual style ("ComputeWin32Service").

> + #Trying to use code directly from vish/libvirt for portability

I don't understand this comment?

Also, some unit tests for all of this would be really nice. I'm have no Windows machines for testing, so I have no way to know if I'll be breaking your code.

review: Needs Fixing
1529. By Édouard Thuleau

An AMI image without ramdisk image should start.

It's possible with EC2 API but it fails with OS API.
This patch corrects that by returns 'None' value if AMI image doesn't contain 'ramdisk_id' metadata.

Revision history for this message
Jordan Rinke (jordanrinke) wrote :

Vish: I didn't specifically change the files on purpose that I remember, I think it has something to do with the dual windows/linux vm environment I use for development with a dual mounted ntfs share. Let me see if I can get that corrected somehow.

Soren: That comment was because I lifted those cache/fetch functions from the libvirt code that vish wrote so if anyone else tries to tinker with it there is a level of familiarity.

I will fix/push shortly.

1530. By Josh Kearney

Set flat_injected to False by default.

Revision history for this message
Jordan Rinke (jordanrinke) wrote :

I was able to confirm that the change to the execute bit is due to the NTFS file system.

1531. By Jordan Rinke

execute bit fix

1532. By Jordan Rinke

execute bit fix

1533. By Jordan Rinke

execute bit fix

Revision history for this message
Vish Ishaya (vishvananda) wrote :

72 + else:
73 + # moved default flags and flag init after handling of
74 + # the command line for the Win32 service wrapper
75 + utils.default_flagfile()

I don't think this placement is what you want. It looks like the service won't get started. I think you need to remove the else and unindent.

82 === modified file 'nova/rpc/impl_carrot.py' (properties changed: -x to +x)
83 === modified file 'nova/tests/api/ec2/test_middleware.py' (properties changed: -x to +x)

a few more execute bits

92 - pass
93 + pass

extra space

188 + #T rying to use code directly from vish/libvirt for familiarity/compatability

formatting of that comment is wrong. Also, consider # NOTE(jordan): xxx form for comments

Tou also need to modify all of your translation strings to use tagged replacements instead of positional. For example:

182 + LOG.error(_("Failed to create difference disk: %s %s"), storage_job.ErrorDescription, storage_job.ErrorCode)
needs to be something like:

LOG.error(_("Failed to create difference disk: %(desc)s %(code)s"),
            {'desc': storage_job.ErrorDescription, 'code': storage_job.ErrorCode})

There are quite a few that need to be fixed.

review: Needs Fixing

Unmerged revisions

1533. By Jordan Rinke

execute bit fix

1532. By Jordan Rinke

execute bit fix

1531. By Jordan Rinke

execute bit fix

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.