Re: [openstack-dev] [Neutron] Getting project version from API

2016-06-08 Thread Andreas Scheuring
Now I'm blaming myself - had a closer look at the code - it's NOT a
message via the Bus, but some nova external events interface that I was
not aware of. 

Sorry for all the confusion
-- 
-
Andreas 
IRC: andreas_s



On Mi, 2016-06-08 at 08:09 +0200, Andreas Scheuring wrote:
> > This handshake between Neutron and Nova does not happen over RPC
> Sorry, Armando, you're absolutely right. What I meant to say is, that
> this communication goes via the Message Bus instead of an ReST API.
> Thanks for correcting!
> 
> 
> 


__
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] [Neutron] Getting project version from API

2016-06-08 Thread Andreas Scheuring
> This handshake between Neutron and Nova does not happen over RPC
Sorry, Armando, you're absolutely right. What I meant to say is, that
this communication goes via the Message Bus instead of an ReST API.
Thanks for correcting!



-- 
-
Andreas 
IRC: andreas_s



On Mo, 2016-06-06 at 20:17 +0200, Armando M. wrote:
> 
> 
> On 6 June 2016 at 17:05, Andreas Scheuring
>  wrote:
> Is there a chance to get rid of this vif-plugged event at all?
> E.g. by
> transitioning it to an ReST API interface? As far as I know
> this is the
> only RPC interface between neutron and nova.
> 
> 
> This handshake between Neutron and Nova does not happen over RPC
>  
> 
> 
> 
> --
> -
> Andreas
> IRC: andreas_s (formerly scheuran)
> 
> 
> 
> On Mo, 2016-06-06 at 20:25 +0900, Akihiro Motoki wrote:
> > Hi,
> >
> > If I understand correctly, what you need is to expose the
> neutron
> > behavior through API or something. In this particular case,
> neutron
> > need to send a vif-plugged event when neutron detects some
> event in
> > the data plane (VIF plugging in OVS or some virtual switch).
> Thus I
> > think the question can be generalized to whether we expose a
> > capability (such that neutron server behaves in XXX way)
> through API
> > (API version? extension?). For example, do we have an
> extension to
> > expose that neutron supports the event callback mechanism?
> >
> > I also think the important point is that it is a topic of
> > deployment.Operators are responsible of deploying correct
> combination
> > of nova and neutron.
> >
> > Honestly I am not sure we need to expose this kind of things
> through
> > API. Regarding the current event callback mechanism, we
> assume that
> > operators deploy the expected combination of releases of
> nova and
> > neutron. Can't we assume that operators deploy Newton nova
> and neutron
> > when they want to use live-migration vif-plugging support?
> >
> > Akihiro
> >
> > 2016-06-06 17:06 GMT+09:00 Oleg Bondarev
> :
> > > Hi,
> > >
> > > There are cases where it would be useful to know the
> version of Neutron (or
> > > any other project) from API, like during upgrades or in
> cross-project
> > > communication cases.
> > > For example in https://review.openstack.org/#/c/246910/
> Nova needs to know
> > > if Neutron sends vif-plugged event during live migration.
> To ensure this it
> > > should be enough to know Neutron is "Newton" or higher.
> > >
> > > Not sure why it wasn't done before (or was it and I'm just
> blind?) so the
> > > question to the community is what are possible
> issues/downsides of exposing
> > > code version through the API?
> > >
> > > Thanks,
> > > Oleg
> > >
> > >
> 
> __
> > > 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
> >
> 
> 
> 
> __
> 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


__
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] [Neutron] Getting project version from API

2016-06-07 Thread Oleg Bondarev
On Mon, Jun 6, 2016 at 7:18 PM, Ihar Hrachyshka  wrote:

>
> > On 06 Jun 2016, at 16:44, Sean M. Collins  wrote:
> >
> > I agree, it would be convenient to have something similar to what Nova
> > has:
> >
> >
> https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versions.py#L59-L60
> >
> > We should put some resources behind implementing micro versioning and we
> > could end up with something similar.
> >
> > It would also be nice to have the agents report their version, so it
> > bubbles up into the agent-list REST API calls.
>
> Agents already report a list of object versions known to them:
>
>
> https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L258
>
> In theory, we can deduce the version from there. The versions are reported
> through state reports. Not sure if it’s exposed in API.
>

In my case I mostly need to know the version of neutron server, in
particular if it's still Mitaka or Newton already. This is what Dan's
concern is about in https://review.openstack.org/#/c/246910/: if we're
upgrading cluster from Mitaka to Newton and at some point have nova
upgraded but neutron still of Mitaka version, than live migration will be
broken (nova will wait for event which neutron does not send). But if we
can know neutron version we can solve the issue.


>
> Ihar
> __
> 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] [Neutron] Getting project version from API

2016-06-07 Thread Oleg Bondarev
On Mon, Jun 6, 2016 at 2:03 PM, Armando M.  wrote:

>
>
> On 6 June 2016 at 10:06, Oleg Bondarev  wrote:
>
>> Hi,
>>
>> There are cases where it would be useful to know the version of Neutron
>> (or any other project) from API, like during upgrades or in cross-project
>> communication cases.
>> For example in https://review.openstack.org/#/c/246910/ Nova needs to
>> know if Neutron sends vif-plugged event during live migration. To ensure
>> this it should be enough to know Neutron is "Newton" or higher.
>>
>> Not sure why it wasn't done before (or was it and I'm just blind?) so the
>> question to the community is what are possible issues/downsides of exposing
>> code version through the API?
>>
>
> If you are not talking about features exposed through the API (for which
> they'd have a new extension being advertised), knowing that you're running
> a specific version of the code might not guarantee that a particular
> feature is available, especially in the case where the capability is an
> implementation detail that is config tunable (evil, evil). This may also
> lead to needless coupling between the two projects, as you'd still want to
> code defensively and assume the specific behavior may or may not be there.
>

Agree, that's why we have extensions-list in the API, right?


>
> I suspect that your case is slightly different in that the lack of a
> received event may be due to an error rather than a missing capability and
> you would not be able to distinguish the difference if not optimistically
> assume lack of capability. Then you need to make a "mental" note and come
> back to the code to assume a failure two cycles down the road from when
> your code merges. Definitely not a pretty workflow without advertising the
> new feature explicitly via the API.
>

I'd not call it a feature, but a tiny behavior change for the neutron
reference implementation: if patch https://review.openstack.org/#/c/246898/
merges in Newton then we can be sure that neutron (newton or higher) with
ml2+ovs should send a particular event to nova during live migration (if it
doesn't than it a bug, but it's another topic) and nova can be sure it
should wait for this event.


>
>
>>
>> Thanks,
>> Oleg
>>
>> __
>> 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
>
>
__
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] [Neutron] Getting project version from API

2016-06-06 Thread Sean M. Collins
Ihar Hrachyshka wrote:
> 
> > On 06 Jun 2016, at 16:44, Sean M. Collins  wrote:
> > 
> > I agree, it would be convenient to have something similar to what Nova
> > has:
> > 
> > https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versions.py#L59-L60
> > 
> > We should put some resources behind implementing micro versioning and we
> > could end up with something similar.
> > 
> > It would also be nice to have the agents report their version, so it
> > bubbles up into the agent-list REST API calls.
> 
> Agents already report a list of object versions known to them:
> 
> https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L258
> 
> In theory, we can deduce the version from there. The versions are reported 
> through state reports. Not sure if it’s exposed in API.
> 

Right - I was looking at your commit that implemented that - and perhaps
using that information to return something similar to the nova
min_version and max_versions - in the agent-list output.
-- 
Sean M. Collins

__
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] [Neutron] Getting project version from API

2016-06-06 Thread Armando M.
On 6 June 2016 at 17:05, Andreas Scheuring 
wrote:

> Is there a chance to get rid of this vif-plugged event at all? E.g. by
> transitioning it to an ReST API interface? As far as I know this is the
> only RPC interface between neutron and nova.
>

This handshake between Neutron and Nova does not happen over RPC


>
>
> --
> -
> Andreas
> IRC: andreas_s (formerly scheuran)
>
>
>
> On Mo, 2016-06-06 at 20:25 +0900, Akihiro Motoki wrote:
> > Hi,
> >
> > If I understand correctly, what you need is to expose the neutron
> > behavior through API or something. In this particular case, neutron
> > need to send a vif-plugged event when neutron detects some event in
> > the data plane (VIF plugging in OVS or some virtual switch). Thus I
> > think the question can be generalized to whether we expose a
> > capability (such that neutron server behaves in XXX way) through API
> > (API version? extension?). For example, do we have an extension to
> > expose that neutron supports the event callback mechanism?
> >
> > I also think the important point is that it is a topic of
> > deployment.Operators are responsible of deploying correct combination
> > of nova and neutron.
> >
> > Honestly I am not sure we need to expose this kind of things through
> > API. Regarding the current event callback mechanism, we assume that
> > operators deploy the expected combination of releases of nova and
> > neutron. Can't we assume that operators deploy Newton nova and neutron
> > when they want to use live-migration vif-plugging support?
> >
> > Akihiro
> >
> > 2016-06-06 17:06 GMT+09:00 Oleg Bondarev :
> > > Hi,
> > >
> > > There are cases where it would be useful to know the version of
> Neutron (or
> > > any other project) from API, like during upgrades or in cross-project
> > > communication cases.
> > > For example in https://review.openstack.org/#/c/246910/ Nova needs to
> know
> > > if Neutron sends vif-plugged event during live migration. To ensure
> this it
> > > should be enough to know Neutron is "Newton" or higher.
> > >
> > > Not sure why it wasn't done before (or was it and I'm just blind?) so
> the
> > > question to the community is what are possible issues/downsides of
> exposing
> > > code version through the API?
> > >
> > > Thanks,
> > > Oleg
> > >
> > >
> __
> > > 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
> >
>
>
> __
> 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] [Neutron] Getting project version from API

2016-06-06 Thread Ihar Hrachyshka

> On 06 Jun 2016, at 16:44, Sean M. Collins  wrote:
> 
> I agree, it would be convenient to have something similar to what Nova
> has:
> 
> https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versions.py#L59-L60
> 
> We should put some resources behind implementing micro versioning and we
> could end up with something similar.
> 
> It would also be nice to have the agents report their version, so it
> bubbles up into the agent-list REST API calls.

Agents already report a list of object versions known to them:

https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L258

In theory, we can deduce the version from there. The versions are reported 
through state reports. Not sure if it’s exposed in API.

Ihar
__
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] [Neutron] Getting project version from API

2016-06-06 Thread Andreas Scheuring
The ovs agent reports if it uses hybrid plug or not since [1]. At least
the hybrid plug is part of the agent state - haven't tested if it's
visible via the API. Might that be helpful?

[1]https://review.openstack.org/#/c/311814/

-- 
-
Andreas 
IRC: andreas_s (formerly scheuran)



On Mo, 2016-06-06 at 14:44 +, Sean M. Collins wrote:
> I agree, it would be convenient to have something similar to what Nova
> has:
> 
> https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versions.py#L59-L60
> 
> We should put some resources behind implementing micro versioning and we
> could end up with something similar.
> 
> It would also be nice to have the agents report their version, so it
> bubbles up into the agent-list REST API calls.
> 


__
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] [Neutron] Getting project version from API

2016-06-06 Thread Andreas Scheuring
Is there a chance to get rid of this vif-plugged event at all? E.g. by
transitioning it to an ReST API interface? As far as I know this is the
only RPC interface between neutron and nova. 


-- 
-
Andreas 
IRC: andreas_s (formerly scheuran)



On Mo, 2016-06-06 at 20:25 +0900, Akihiro Motoki wrote:
> Hi,
> 
> If I understand correctly, what you need is to expose the neutron
> behavior through API or something. In this particular case, neutron
> need to send a vif-plugged event when neutron detects some event in
> the data plane (VIF plugging in OVS or some virtual switch). Thus I
> think the question can be generalized to whether we expose a
> capability (such that neutron server behaves in XXX way) through API
> (API version? extension?). For example, do we have an extension to
> expose that neutron supports the event callback mechanism?
> 
> I also think the important point is that it is a topic of
> deployment.Operators are responsible of deploying correct combination
> of nova and neutron.
> 
> Honestly I am not sure we need to expose this kind of things through
> API. Regarding the current event callback mechanism, we assume that
> operators deploy the expected combination of releases of nova and
> neutron. Can't we assume that operators deploy Newton nova and neutron
> when they want to use live-migration vif-plugging support?
> 
> Akihiro
> 
> 2016-06-06 17:06 GMT+09:00 Oleg Bondarev :
> > Hi,
> >
> > There are cases where it would be useful to know the version of Neutron (or
> > any other project) from API, like during upgrades or in cross-project
> > communication cases.
> > For example in https://review.openstack.org/#/c/246910/ Nova needs to know
> > if Neutron sends vif-plugged event during live migration. To ensure this it
> > should be enough to know Neutron is "Newton" or higher.
> >
> > Not sure why it wasn't done before (or was it and I'm just blind?) so the
> > question to the community is what are possible issues/downsides of exposing
> > code version through the API?
> >
> > Thanks,
> > Oleg
> >
> > __
> > 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
> 


__
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] [Neutron] Getting project version from API

2016-06-06 Thread Sean M. Collins
I agree, it would be convenient to have something similar to what Nova
has:

https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versions.py#L59-L60

We should put some resources behind implementing micro versioning and we
could end up with something similar.

It would also be nice to have the agents report their version, so it
bubbles up into the agent-list REST API calls.

-- 
Sean M. Collins

__
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] [Neutron] Getting project version from API

2016-06-06 Thread Akihiro Motoki
Hi,

If I understand correctly, what you need is to expose the neutron
behavior through API or something. In this particular case, neutron
need to send a vif-plugged event when neutron detects some event in
the data plane (VIF plugging in OVS or some virtual switch). Thus I
think the question can be generalized to whether we expose a
capability (such that neutron server behaves in XXX way) through API
(API version? extension?). For example, do we have an extension to
expose that neutron supports the event callback mechanism?

I also think the important point is that it is a topic of
deployment.Operators are responsible of deploying correct combination
of nova and neutron.

Honestly I am not sure we need to expose this kind of things through
API. Regarding the current event callback mechanism, we assume that
operators deploy the expected combination of releases of nova and
neutron. Can't we assume that operators deploy Newton nova and neutron
when they want to use live-migration vif-plugging support?

Akihiro

2016-06-06 17:06 GMT+09:00 Oleg Bondarev :
> Hi,
>
> There are cases where it would be useful to know the version of Neutron (or
> any other project) from API, like during upgrades or in cross-project
> communication cases.
> For example in https://review.openstack.org/#/c/246910/ Nova needs to know
> if Neutron sends vif-plugged event during live migration. To ensure this it
> should be enough to know Neutron is "Newton" or higher.
>
> Not sure why it wasn't done before (or was it and I'm just blind?) so the
> question to the community is what are possible issues/downsides of exposing
> code version through the API?
>
> Thanks,
> Oleg
>
> __
> 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] [Neutron] Getting project version from API

2016-06-06 Thread Armando M.
On 6 June 2016 at 10:06, Oleg Bondarev  wrote:

> Hi,
>
> There are cases where it would be useful to know the version of Neutron
> (or any other project) from API, like during upgrades or in cross-project
> communication cases.
> For example in https://review.openstack.org/#/c/246910/ Nova needs to
> know if Neutron sends vif-plugged event during live migration. To ensure
> this it should be enough to know Neutron is "Newton" or higher.
>
> Not sure why it wasn't done before (or was it and I'm just blind?) so the
> question to the community is what are possible issues/downsides of exposing
> code version through the API?
>

If you are not talking about features exposed through the API (for which
they'd have a new extension being advertised), knowing that you're running
a specific version of the code might not guarantee that a particular
feature is available, especially in the case where the capability is an
implementation detail that is config tunable (evil, evil). This may also
lead to needless coupling between the two projects, as you'd still want to
code defensively and assume the specific behavior may or may not be there.

I suspect that your case is slightly different in that the lack of a
received event may be due to an error rather than a missing capability and
you would not be able to distinguish the difference if not optimistically
assume lack of capability. Then you need to make a "mental" note and come
back to the code to assume a failure two cycles down the road from when
your code merges. Definitely not a pretty workflow without advertising the
new feature explicitly via the API.


>
> Thanks,
> Oleg
>
> __
> 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


[openstack-dev] [Neutron] Getting project version from API

2016-06-06 Thread Oleg Bondarev
Hi,

There are cases where it would be useful to know the version of Neutron (or
any other project) from API, like during upgrades or in cross-project
communication cases.
For example in https://review.openstack.org/#/c/246910/ Nova needs to know
if Neutron sends vif-plugged event during live migration. To ensure this it
should be enough to know Neutron is "Newton" or higher.

Not sure why it wasn't done before (or was it and I'm just blind?) so the
question to the community is what are possible issues/downsides of exposing
code version through the API?

Thanks,
Oleg
__
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