Re: [openstack-dev] [nova][cell] Can nova do live migration cross cells?

2016-01-08 Thread 少合冯
Thank you very much. .

And Andrew Laski  has answer my second question.

2016-01-08 20:33 GMT+08:00 John Garbutt :

> On 8 January 2016 at 08:17, 少合冯  wrote:
> > Hi, all
> >
> > Now I'm working on the migrations list/show API.
> > The new api defines  migrations is a sub-collection of an instance.
> > GET   v2.1/tenant_id/servers/server-id/migrations/migration-id
> >
> > I need to support  the new cell API to get a migration of a specified
> > instance.
> > get_migration_by_instance_and_id
> >
> > I read up the nova cell doc.
> > http://docs.openstack.org/developer/nova/cells.html
> >
> > It tells us that, the migrations table will be API-level.
> > The instances table is Cell-level.
> > So does that means that we can do live migration cross cells?
>
> In sort, you can't currently live-migrate between cells.
>
> So there is the current cells v1. When using cells v1 you will never
> be able to move between cells. In addition, when using nova-network,
> network assumptions generally mean IPs can't move between cells.
>
> In cells v2, we were talking about ways that could happen. Its still
> hard, because you would need to copy the instance record between one
> cell database to another, with the API understanding how the move is
> going. Complexity best avoided, if possible.
>
> > And also this will affect my code.
> > If the migrations is API-level, so I do not need a cell name to get the
> > migrations info from DB.
> >
> > Or I need to get the cell name by the specified instance, and then get
> the
> > migrations info by _TargetedMessage.
>
> Afraid I don't have enough context from the rest of your email to
> answer these questions.
>
> Thanks,
> John
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][cell] Can nova do live migration cross cells?

2016-01-08 Thread John Garbutt
On 8 January 2016 at 08:17, 少合冯  wrote:
> Hi, all
>
> Now I'm working on the migrations list/show API.
> The new api defines  migrations is a sub-collection of an instance.
> GET   v2.1/tenant_id/servers/server-id/migrations/migration-id
>
> I need to support  the new cell API to get a migration of a specified
> instance.
> get_migration_by_instance_and_id
>
> I read up the nova cell doc.
> http://docs.openstack.org/developer/nova/cells.html
>
> It tells us that, the migrations table will be API-level.
> The instances table is Cell-level.
> So does that means that we can do live migration cross cells?

In sort, you can't currently live-migrate between cells.

So there is the current cells v1. When using cells v1 you will never
be able to move between cells. In addition, when using nova-network,
network assumptions generally mean IPs can't move between cells.

In cells v2, we were talking about ways that could happen. Its still
hard, because you would need to copy the instance record between one
cell database to another, with the API understanding how the move is
going. Complexity best avoided, if possible.

> And also this will affect my code.
> If the migrations is API-level, so I do not need a cell name to get the
> migrations info from DB.
>
> Or I need to get the cell name by the specified instance, and then get the
> migrations info by _TargetedMessage.

Afraid I don't have enough context from the rest of your email to
answer these questions.

Thanks,
John

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][cell] Can nova do live migration cross cells?

2016-01-08 Thread 少合冯
2016-01-08 21:53 GMT+08:00 Andrew Laski :

> On 01/08/16 at 12:33pm, John Garbutt wrote:
>
>> On 8 January 2016 at 08:17, 少合冯  wrote:
>>
>>> Hi, all
>>>
>>> Now I'm working on the migrations list/show API.
>>> The new api defines  migrations is a sub-collection of an instance.
>>> GET   v2.1/tenant_id/servers/server-id/migrations/migration-id
>>>
>>> I need to support  the new cell API to get a migration of a specified
>>> instance.
>>> get_migration_by_instance_and_id
>>>
>>> I read up the nova cell doc.
>>> http://docs.openstack.org/developer/nova/cells.html
>>>
>>> It tells us that, the migrations table will be API-level.
>>> The instances table is Cell-level.
>>> So does that means that we can do live migration cross cells?
>>>
>>
>> In sort, you can't currently live-migrate between cells.
>>
>> So there is the current cells v1. When using cells v1 you will never
>> be able to move between cells. In addition, when using nova-network,
>> network assumptions generally mean IPs can't move between cells.
>>
>
> Assuming a global network the limitation is just within Nova.  There is no
> mechanism for moving instance data from one cell database to another.  And
> it's not something that will be added since v1 is in a freeze.
>
>
>> In cells v2, we were talking about ways that could happen. Its still
>> hard, because you would need to copy the instance record between one
>> cell database to another, with the API understanding how the move is
>> going. Complexity best avoided, if possible.
>>
>
> Cells v2 makes some architecture choices that will make it easier to
> accomplish this.  But it's not necessary to have for cells v2 so it's not
> likely to be in place initially.
>
>
>> And also this will affect my code.
>>> If the migrations is API-level, so I do not need a cell name to get the
>>> migrations info from DB.
>>>
>>> Or I need to get the cell name by the specified instance, and then get
>>> the
>>> migrations info by _TargetedMessage.
>>>
>>
>> Afraid I don't have enough context from the rest of your email to
>> answer these questions.
>>
>
> I'm not entirely clear on the question either, but if the migration is in
> the api level database then you do not need a cell name to get the
> migration from the db.  The cell name is only used to route a request to a
> cell database.
>
> Thanks very much.
Sorry for my question is not clear.
But you  have  gave me the answer.

>
>> Thanks,
>> John
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][cell] Can nova do live migration cross cells?

2016-01-08 Thread 少合冯
still a question in line.
Thanks.

2016-01-08 21:53 GMT+08:00 Andrew Laski :

> On 01/08/16 at 12:33pm, John Garbutt wrote:
>
>> On 8 January 2016 at 08:17, 少合冯  wrote:
>>
>>> Hi, all
>>>
>>> Now I'm working on the migrations list/show API.
>>> The new api defines  migrations is a sub-collection of an instance.
>>> GET   v2.1/tenant_id/servers/server-id/migrations/migration-id
>>>
>>> I need to support  the new cell API to get a migration of a specified
>>> instance.
>>> get_migration_by_instance_and_id
>>>
>>> I read up the nova cell doc.
>>> http://docs.openstack.org/developer/nova/cells.html
>>>
>>> It tells us that, the migrations table will be API-level.
>>> The instances table is Cell-level.
>>> So does that means that we can do live migration cross cells?
>>>
>>
>> In sort, you can't currently live-migrate between cells.
>>
>> So there is the current cells v1. When using cells v1 you will never
>> be able to move between cells. In addition, when using nova-network,
>> network assumptions generally mean IPs can't move between cells.
>>
>
> Assuming a global network the limitation is just within Nova.  There is no
> mechanism for moving instance data from one cell database to another.  And
> it's not something that will be added since v1 is in a freeze.
>
>
>> In cells v2, we were talking about ways that could happen. Its still
>> hard, because you would need to copy the instance record between one
>> cell database to another, with the API understanding how the move is
>> going. Complexity best avoided, if possible.
>>
>
> Cells v2 makes some architecture choices that will make it easier to
> accomplish this.  But it's not necessary to have for cells v2 so it's not
> likely to be in place initially.
>
>
>> And also this will affect my code.
>>> If the migrations is API-level, so I do not need a cell name to get the
>>> migrations info from DB.
>>>
>>> Or I need to get the cell name by the specified instance, and then get
>>> the
>>> migrations info by _TargetedMessage.
>>>
>>
>> Afraid I don't have enough context from the rest of your email to
>> answer these questions.
>>
>
> I'm not entirely clear on the question either, but if the migration is in
> the api level database then you do not need a cell name to get the
> migration from the db.  The cell name is only used to route a request to a
> cell database.
>

still puzzle the current nova code.
https://github.com/openstack/nova/blob/master/nova/cells/messaging.py#L1668
https://github.com/openstack/nova/blob/master/nova/cells/messaging.py#L1330

why get_migrations in the above link still need to route a request  to a
cell database, or broadcast to all cell database?


>
>> Thanks,
>> John
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][cell] Can nova do live migration cross cells?

2016-01-08 Thread Andrew Laski

On 01/08/16 at 12:33pm, John Garbutt wrote:

On 8 January 2016 at 08:17, 少合冯  wrote:

Hi, all

Now I'm working on the migrations list/show API.
The new api defines  migrations is a sub-collection of an instance.
GET   v2.1/tenant_id/servers/server-id/migrations/migration-id

I need to support  the new cell API to get a migration of a specified
instance.
get_migration_by_instance_and_id

I read up the nova cell doc.
http://docs.openstack.org/developer/nova/cells.html

It tells us that, the migrations table will be API-level.
The instances table is Cell-level.
So does that means that we can do live migration cross cells?


In sort, you can't currently live-migrate between cells.

So there is the current cells v1. When using cells v1 you will never
be able to move between cells. In addition, when using nova-network,
network assumptions generally mean IPs can't move between cells.


Assuming a global network the limitation is just within Nova.  There is 
no mechanism for moving instance data from one cell database to another.  
And it's not something that will be added since v1 is in a freeze.




In cells v2, we were talking about ways that could happen. Its still
hard, because you would need to copy the instance record between one
cell database to another, with the API understanding how the move is
going. Complexity best avoided, if possible.


Cells v2 makes some architecture choices that will make it easier to 
accomplish this.  But it's not necessary to have for cells v2 so it's 
not likely to be in place initially.





And also this will affect my code.
If the migrations is API-level, so I do not need a cell name to get the
migrations info from DB.

Or I need to get the cell name by the specified instance, and then get the
migrations info by _TargetedMessage.


Afraid I don't have enough context from the rest of your email to
answer these questions.


I'm not entirely clear on the question either, but if the migration is 
in the api level database then you do not need a cell name to get the 
migration from the db.  The cell name is only used to route a request to 
a cell database.




Thanks,
John

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev