Merge lp://qastaging/~raxnetworking/nova/bare_bones_melange into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Rajaram Mallya
Status: Work in progress
Proposed branch: lp://qastaging/~raxnetworking/nova/bare_bones_melange
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 4909 lines (+4616/-9)
45 files modified
.bzrignore (+6/-9)
.mailmap (+1/-0)
Authors (+4/-0)
bin/melange (+57/-0)
bin/melange-manage (+58/-0)
etc/melange/melange.conf.sample (+40/-0)
melange/README (+16/-0)
melange/__init__.py (+33/-0)
melange/common/__init__.py (+16/-0)
melange/common/auth.py (+56/-0)
melange/common/config.py (+234/-0)
melange/common/exception.py (+45/-0)
melange/common/pagination.py (+68/-0)
melange/common/utils.py (+106/-0)
melange/common/wsgi.py (+179/-0)
melange/db/__init__.py (+23/-0)
melange/db/sqlalchemy/__init__.py (+16/-0)
melange/db/sqlalchemy/api.py (+100/-0)
melange/db/sqlalchemy/mappers.py (+29/-0)
melange/db/sqlalchemy/schema.py (+68/-0)
melange/db/sqlalchemy/session.py (+92/-0)
melange/ipam/__init__.py (+16/-0)
melange/ipam/models.py (+504/-0)
melange/ipam/service.py (+240/-0)
melange/ipv6/__init__.py (+37/-0)
melange/ipv6/tenant_based_generator.py (+48/-0)
melange/tests/__init__.py (+77/-0)
melange/tests/factories/__init__.py (+16/-0)
melange/tests/factories/models.py (+61/-0)
melange/tests/functional/__init__.py (+16/-0)
melange/tests/functional/test_service.py (+104/-0)
melange/tests/unit/__init__.py (+88/-0)
melange/tests/unit/mock_generator.py (+28/-0)
melange/tests/unit/test_auth.py (+141/-0)
melange/tests/unit/test_config.py (+50/-0)
melange/tests/unit/test_ipam_models.py (+773/-0)
melange/tests/unit/test_ipam_service.py (+709/-0)
melange/tests/unit/test_ipv6.py (+59/-0)
melange/tests/unit/test_pagination.py (+67/-0)
melange/tests/unit/test_sqlalchemy_api.py (+45/-0)
melange/tests/unit/test_tenant_based_ipv6_generator.py (+58/-0)
melange/tests/unit/test_utils.py (+114/-0)
melange/tests/unit/test_wsgi.py (+115/-0)
run_tests.sh (+1/-0)
tools/pip-requires (+2/-0)
To merge this branch: bzr merge lp://qastaging/~raxnetworking/nova/bare_bones_melange
Reviewer Review Type Date Requested Status
Sandy Walsh (community) Needs Information
Brian Lamar Pending
Rick Harris Pending
Monty Taylor Pending
Jay Pipes Pending
Nova Core security contacts Pending
Review via email: mp+76249@code.qastaging.launchpad.net

Description of the change

adds melange to nova
The rationale for having melange as a subfolder in nova can be found here: https://lists.launchpad.net/openstack/msg03366.html

melange is currently an IP or L3 management service, but will probably expand into more of a "network identifier" management service which may include L2 data in the future.

The current merge prop is a stripped down version of the older one at https://code.launchpad.net/~raxnetworking/nova/melange/+merge/72926
The idea is to break down the main melange code into smaller chunks so that it is easier to review.
The current merge prop has the most basic set of features that works with the quantum network manager.
Subsequently to this, we will be introducing merge props which will have the melange-client cli, client library, migration framework, api versioning and ip allocation policies.

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

I understand the rationale behind wanting to hang on to the name, but if it's not a top level project, it seems to me that the name melange should go away as it is integrated back into nova.

I think that will lessen the confusion quite a bit. Anyone else have thoughts on this?

Revision history for this message
Monty Taylor (mordred) wrote :

I agree with Devin. I think if it's getting integrated into nova, then it should get integrated.

Revision history for this message
Troy Toman (troy-toman) wrote :

As the original creator of the name, I have absolutely no need to hold onto it. I'm all for simplifying.

Revision history for this message
Rajaram Mallya (rajarammallya) wrote :

> I understand the rationale behind wanting to hang on to the name, but if it's
> not a top level project, it seems to me that the name melange should go away
> as it is integrated back into nova.

We can just call this folder IPAM to convey the functionality it provides.
The only problem is the quantum manager part. It calls current ip management features in nova as nova_ipam and the melange one as melange_ipam. It would be great if we had better names to distinguishing these two ipam implementations once we get rid of the word 'melange'.

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

I agree with Devin, perhaps it should be a facet of ./nova/network, just like quantum is.

This does, however, beg the following questions:
1. should it continue to use it's own database, or should the tables merge with the nova db? Wouldn't this make migrations easier and remove a lot of the duplication of sqlalchemy infrastructure?

2. this adds a new HTTP service, which implies this is a new API just for the networking aspect of nova ... shouldn't networking just be a new facet of OS API? /network/<foo>/... In which case, shouldn't novaclient be the tool for accessing it?

That said, this is a vast improvement over the initial merge-prop.

In the sense of getting it into trunk and iterating from there, it would be nice to see this addressed shortly afterwards: melange.utils seems to be largely applicable to nova in general, perhaps it should just move into that?

Oh, and I don't see factory-boy actually being used anywhere?

review: Needs Information
Revision history for this message
Trey Morris (tr3buchet) wrote :

Sandy,
Good points, you're sortof hinting at melange not being a standalone service. I think Troy would be best to answer this as he knows more about what melange is to become, where and at what scope it will be running, what its use cases are, and how it will be interacted with. I'm in general happy with it either way, stand alone or integrated.

Being that its code is to be merged with nova, maybe the service should be as well.

Revision history for this message
Trey Morris (tr3buchet) wrote :

oops forgot to mention, as far as the migrations and sqlalchemy infrastructure go, we're untying everything for quantum anyway so it wouldn't be that great of a difference one way or the other.

Revision history for this message
Troy Toman (troy-toman) wrote :

> I agree with Devin, perhaps it should be a facet of ./nova/network, just like
> quantum is.
Quantum is a standalone service. There is a network manager that integrates with Quantum (and Melange).
>
> This does, however, beg the following questions:
> 1. should it continue to use it's own database, or should the tables merge
> with the nova db? Wouldn't this make migrations easier and remove a lot of the
> duplication of sqlalchemy infrastructure?
>
> 2. this adds a new HTTP service, which implies this is a new API just for the
> networking aspect of nova ... shouldn't networking just be a new facet of OS
> API? /network/<foo>/... In which case, shouldn't novaclient be the tool for
> accessing it?
>
The original thought is that OpenStack would benefit from an IPAM service that was shared across many components. There could be significant benefit to having a single IPAM service that works across zones or hands out IPs across compute, load balancers, firewall-as-a-service or any other IP-based services. We wanted to start with tight Nova integration because that should be the primary user in the near term. But, I worry that deeper integration would lead to yet-another-IPAM project down the line or a messy separation effort. That's why there is the level of separation in the present implementation

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

Hmm, tricky ... 'cause it's not really Nova then is it?

Arguably, we could just stand up the [melanage] portions of nova that handle the IPAM stuff, but that seems very non-nova.

Revision history for this message
Rajaram Mallya (rajarammallya) wrote :

> In the sense of getting it into trunk and iterating from there, it would be
> nice to see this addressed shortly afterwards: melange.utils seems to be
> largely applicable to nova in general, perhaps it should just move into that?
I guess most of the methods here are generic enough that we could do that.
We'll make a note of that for the next merge prop we intend to make.

> Oh, and I don't see factory-boy actually being used anywhere?
It is used in melange/tests/factories/models.py.

Revision history for this message
Trey Morris (tr3buchet) wrote :

Sandy: it was this aspect that puzzled me when we first proposed merging.

Revision history for this message
Troy Toman (troy-toman) wrote :

At the Diablo summit, there was no clear path forward for projects outside of the core pieces of OpenStack. Jesse and Vish both expressed a desire to Melange "incubated" inside of Nova so that we could ensure that it integrated well and with the hope that we would have more control over when it could be leveraged to solve problems with the limited IPAM functionality within Nova.

In retrospect, that was probably not the right choice. The incubated projects path developed rather quickly and we were unable to move faster on getting Melange into Nova because of the delays with multi-nic and several bits of network refactoring that drug out. So, that's where we are.

After discussing this with Jay Pipes, we decided the fastest path forward was not to carve all of this out and start over but to continue with the original while breaking the merge prop into smaller, more digestible pieces and address as many comments as possible from the early reviews in the initial merge prop.

Ideally, this probably spins off at some point down the road so that we can leverage it more cleanly as a standalone IPAM that services multiple OpenStack components. However, right now, there are significant limitations in the current IPAM that limit scaling. I think we can Melange this as a vehicle to solve those problems. So, I am hoping we can get some consensus to move forward. If there is concern that it doesn't make sense, then I would ask that we raise that Vish quickly so that we can resolve them.

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

Yeah, sorry for making this difficult. Certainly wasn't my intention.

The question becomes: how do we deal with packages that use large portions of the Nova infrastructure that, by themselves, don't really belong to the nova stack per se?

My gut says they should depend on nova-common and not nova.

So, given nova-common not being ready for prime time (yet), I'd say we bring it into nova, with the guarantee that nova-common will get more attention and soonish/eventually the package will be able to stand on it's own two feet.

Does that sound fair to both projects?

Revision history for this message
Rajaram Mallya (rajarammallya) wrote :

> So, given nova-common not being ready for prime time (yet), I'd say we bring
> it into nova, with the guarantee that nova-common will get more attention and
> soonish/eventually the package will be able to stand on it's own two feet.

Very succinctly put. This is actually what we are doing with Melange as of now :-)
Right now melange only depends on the 'infrastructure' components in nova. And we do aim to move these dependencies to the openstack commons once its available.

I have moved the merge prop to gerrit at https://review.openstack.org/#change,646
We can continue the discussions there.

Unmerged revisions

1394. By Rajaram Mallya

Merge from nova

1393. By Rajaram Mallya

Rajaram/Vinkesh| a few more small style change

1392. By Rajaram Mallya

Rajaram/Vinkesh|misc style changes, moved AppUrl class to utils

1391. By Rajaram Mallya

Rajaram/Vinkesh | Added basic functional tests. Removed unsed codes. Removed rfc2462 IpV6 generator

1390. By Rajaram Mallya

Rajaram/Vinkesh | Removed CLI clients and its functional tests. Removed keystone client, MethodInspector, Version

1389. By Rajaram Mallya

Vinkesh/Rajaram|removed versioning by mime type and some unused code

1388. By Rajaram Mallya

Vinkesh/Rajaram|Removed migration framework and test conf

1387. By Rajaram Mallya

Rajaram/Vinkesh | Removed dependencies on openstack common

1386. By Rajaram Mallya

Rajaram/Vinkesh| collapsed migrations and removed delayed deallocation and restore of ip addresses

1385. By Rajaram Mallya

Merged from nova trunk

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.