settingsLogin | Registersettings

[openstack-dev] [api] [Nova] [Ironic] [Magnum] Microversion guideline in API-WG

0 votes

Hi, guys,

I'm working on adding Microversion into the API-WG's guideline which make sure we have consistent Microversion behavior in the API for user.
The Nova and Ironic already have Microversion implementation, and as I know Magnum https://review.openstack.org/#/c/184975/ is going to implement Microversion also.

Hope all the projects which support( or plan to) Microversion can join the review of guideline.

The Mircoversion specification(this almost copy from nova-specs): https://review.openstack.org/#/c/187112
And another guideline for when we should bump Mircoversion https://review.openstack.org/#/c/187896/

As I know, there already have a little different between Nova and Ironic's implementation. Ironic return min/max version when the requested
version doesn't support in server by http-headers. There isn't such thing in nova. But that is something for version negotiation we need for nova also.
Sean have pointed out we should use response body instead of http headers, the body can includes error message. Really hope ironic team can take a
look at if you guys have compelling reason for using http headers.

And if we think return body instead of http headers, we probably need think about back-compatible also. Because Microversion itself isn't versioned.
So I think we should keep those header for a while, does make sense?

Hope we have good guideline for Microversion, because we only can change Mircoversion itself by back-compatible way.

Thanks
Alex Xu


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Jun 4, 2015 in openstack-dev by Xu,_Hejie (1,160 points)   2

45 Responses

0 votes

As an aside, do we think that exposing the exact version of a server
process is safe from a security perspective?

Michael

On Sat, Jun 20, 2015 at 10:14 AM, Devananda van der Veen
devananda.vdv@gmail.com wrote:
Almost all of our discussions so far on this topic have left something out,
which Monty pointed out to me last week. I'm following up now because
E_TRAVEL...

tldr;
What we're versioning here are API's, not packages. It's not a question of
numbering and dependency ordering, but of communicating support[ed|able]
interfaces between running services. Libtool is more relevant than semver.

http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Right now we lack a means to express that the API response is
"compatible-with" a particular previously-released version of the API. If we
had that, instead of "current-version", I believe we would have much happier
users (and a happier Dmitry and jroll).

Long version...
Every HTTP response from Ironic today includes three headers: min, max, and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say that
a change was made in v1.5 that added a new endpoint. Today, this is what the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current: 1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current 1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current: 1.5)

What we have implemented today is that in case (b), the service will hide
any changes that we introduced in v1.5. But those changes did not affect any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending the
last several months working on api versioning, I actually think all of those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

-Devananda

On Tue, Jun 16, 2015 at 7:13 AM Dmitry Tantsur dtantsur@redhat.com wrote:

On 06/16/2015 03:47 PM, Jim Rollenhagen wrote:

On Tue, Jun 16, 2015 at 08:56:37AM +0200, Dmitry Tantsur wrote:

On 06/04/2015 08:58 AM, Xu, Hejie wrote:

Hi, guys,
I’m working on adding Microversion into the API-WG’s guideline which
make sure we have consistent Microversion behavior in the API for
user.
The Nova and Ironic already have Microversion implementation, and as I
know Magnum _https://review.openstack.org/#/c/184975/_ is going to
implement Microversion also.
Hope all the projects which support( or plan to) Microversion can join
the review of guideline.
The Mircoversion specification(this almost copy from nova-specs):
_https://review.openstack.org/#/c/187112_
And another guideline for when we should bump Mircoversion
_https://review.openstack.org/#/c/187896/_
As I know, there already have a little different between Nova and
Ironic’s implementation. Ironic return min/max version when the
requested
version doesn’t support in server by http-headers. There isn’t such
thing in nova. But that is something for version negotiation we need
for
nova also.
Sean have pointed out we should use response body instead of http
headers, the body can includes error message. Really hope ironic team
can take a
look at if you guys have compelling reason for using http headers.
And if we think return body instead of http headers, we probably need
think about back-compatible also. Because Microversion itself isn’t
versioned.
So I think we should keep those header for a while, does make sense?
Hope we have good guideline for Microversion, because we only can
change
Mircoversion itself by back-compatible way.
Thanks
Alex Xu

Hi all!

I'd like to try put in feedback based on living with microversions in
Kilo
release of Ironic.

And here's my take, based on my experiences. Keep in mind I'm a core
reviewer, a developer, and an operator of Ironic.

Thanks Jim, much appreciated!

From an ops perspective, our team has built our fair share of tooling
to
help us run Ironic. Some of it uses the REST API via python or node.js,
and of course we all use the CLI client often.

We also continuously deploy Ironic, for full transparency. My experience
is not with how this works every 6 months, but in the day-to-day.

First of all, after talking to folks off-list, I realized that we all,
and
the spec itself, confuse 3 aspects of microversion usage:

  1. protecting from breaking changes.
    This is clearly a big win from user's point of view, and it allowed us
    to
    conduct painful change with renaming an important node state in our
    state
    machine. It will allows us even worse change this cycle: change of the
    default state.

+1. Good stuff. My tooling doesn't break when I upgrade. Yay.

  1. API discoverability.
    While I believe that there maybe be better implementation of this idea,
    I
    think I got it now. People want services to report API versions they
    support. People want to be able to request a specific version, and fail
    early if it is not present. Also +1 from me.

I don't tend to personally do this. I usually am aware of what version
of Ironic I'm running against. However I see how this could be useful
for other folks.

I do, however, use the versions to say, "Oh, I can now request 1.5 which
has logical names! That's useful, let's set those to the names in our
CMDB." Now my tooling that interacts with the CMDB and Ironic can look
at the version and decide to use node.name instead of the old hack we
used to use.

  1. hiding new features from older clients
    This is not directly stated by the spec, but many people imply it, and
    Nova
    and Ironic did it in Kilo. I want us to be clear: it is not the same as

2.

You can report versions, but still allow new features to be used.

This is still totally useful. If you know what version you are running
against, you know exactly what features are available.

"You know" is about #2 - that's where confusion is :)
so if you know, that moving to inspection state is disallowed for your
tooling (but not for the whole system!), what does it give you?

I think the disconnect here is that we don't expect users (whether those
are people or computers) to explicitly request a version. We need to
message better that if you are using Ironic or building a tool against
Ironic's API, you should be pinning the version. We also need to take
this comment block[0] and put it in our docs, so users know what each
version does.

Knowing that I get feature X when I upgrade to version Y is useful.

It is this particular thing that gets -2 from me, after I've seen how
it
worked in practice, and that's why.

First of all, I don't believe anyone needs it. Seriously, I can't
imagine a
user asking "please prevent me from using non-breaking changes". And
attempt
to implement it was IMO a big failure for the following reasons:

a) It's hard to do. Even we, the core team, got confused, and for
non-core
people it took several iteration to do right. It's a big load on both
developers and reviewers.

I do agree with this. It's been painful. However, I think we're mostly
past that pain at this point. Does this patch[1] look like developer
pain?

It's not that painful to write. Now. When we have 10-20 version, it
probably will :)
anyway, it's hard to explain newcomers how to do it, and it's hard to
review the result. we failed at it, e.g. with error codes.

b) It's incomplete (at least for Ironic). We have several API-exposed
things
that are just impossible to hide. Good example are node states: if node
is
in a new state, we can't but expose it to older tooling. Our free-form
JSON
fields properties, instanceinfo, driverinfo and driverinternalinfo
are
examples as well. It's useless to speak about API contract, while we
have
those.

I somewhat agree here.

With node states, there are cases where we were able to hide it
(NOSTATE -> AVAILABLE), and cases where we were not (adding MANAGEABLE).
However, this list of states is (AIUI) not part of the API contract;
rather the verbs available to move between states are.

What's the point in contract, if there are things not covered by it that
drastically change the system behavior?

As far as JSON fields, we've never had a contract around what keys are
available. Only the semantics of working with those fields, and which
fields exist.

ditto as above: you can request new features by modifying driver_info.

c) It gives additional push back to making (required) breaking changes.
We
already got suggestions to have ONE MORE feature gating for breaking
changes. Reason: people will need to increase microversions to get
features,
and your breaking change will prevent it.

This is just silly. If 1.10 breaks a user, and the user wants 1.11,
they'll need to fix that breakage.

++ but not everyone agreed on the summit, when I was talking about
ENROLL state

d) It requires a hard compromise on the CLI tool. You either default it
to
1.0 forever, and force all the people to get used to figuring out
version
numbers and using ironic --ironic-api-version x.y every time
(terrible
user experience), or you default it to some known good version, bumping
it
from time to time. This, in turn, has 2 more serious problems:

I disagree that pinning a version all the time is a terrible experience.
We already require a number of options for authentication (OSUSERNAME,
OS
PASSWORD, etc etc). How many folks do you think type these in every
time? Solution is simple: add IRONICAPIVERSION to whatever exports the
other environment variables.

It's not that bad, especially if devstack/tripleo will provide some
reasonable default for you.

I remember, however, Devananda didn't like the idea.

And it definitely makes a quick start guide a bit harder to follow. I
already imagine how many people will forget about this pinning (either
to do it, or do update when they need new features).

The version depends on the environment you are running against - why not
treat it as such?

d.1) you start to break people \o/ that's not a theoretical concern:
our
downstream tooling did get broken by updating to newer ironicclient
from git

As I said before, we need to encourage folks to pin client versions if
they don't want to break. I'm probably alone here, but I would even
propose making the version required. Force people to think about what
they are doing. If folks are okay with being broken, they can pass
"latest".

Could be a good default for devstack btw

d.2) you require complex version negotiations on the client side.
Otherwise
imaging CLI tool defaulting to 1.6 will issue node-create to Ironic
supporting only 1.5. Guess what? It will fail despite node-create being
very
old feature. Again, that's not something theoretical: that's how we
broke
TripleO CI.

Again, pin it.

e) Every microversion should be fully tested separately. Which ended up
in
Ironic having 4 versions 1.2-1.5 that were never ever gate tested. Even
worse, initially, our gate tested only the oldest version 1.1, but we
solved
it (though it took time to realize). The only good thing here is that
these
versions 1.2-1.5 were probably never used by anyone.

Hi. I've used some of these. :)

You didn't tell me last time we talked :) note, that you didn't use
them, unless you explicitly requested, because IIRC we never defaulted
our client to any of these. So for most people, even deploying from
master, it was 1.1 -> 1.6.

// jim

[0]
https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/__init__.py#L59-63
[1]
https://review.openstack.org/#/c/188873/1/ironic/api/controllers/v1/node.py

To sum this long post up, I'm seeing that hiding new features based on
microversions brings much more problems, than it solves (I'm not aware
of
the latter at all). I'm very opposed to continuing doing it in Ironic,
and
I'm going to propose patch stopping gating Kilo changes (non-breaking
obviously).

Hope that helps,
Dmitry

>


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

--
Rackspace Australia


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 21, 2015 by Michael_Still (16,180 points)   3 6 13
0 votes

On 06/20/2015 02:14 AM, Devananda van der Veen wrote:
Almost all of our discussions so far on this topic have left something
out, which Monty pointed out to me last week. I'm following up now
because E_TRAVEL...

tldr;
What we're versioning here are API's, not packages. It's not a question
of numbering and dependency ordering, but of communicating
support[ed|able] interfaces between running services. Libtool is more
relevant than semver.
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Right now we lack a means to express that the API response is
"compatible-with" a particular previously-released version of the API.
If we had that, instead of "current-version", I believe we would have
much happier users (and a happier Dmitry and jroll).

Long version...
Every HTTP response from Ironic today includes three headers: min, max,
and version. The service can present an older API version, as long as it
is greater-than-or-equal-to the minimum supported version, even if that
version is incompatible with the maximum supported version. It does
this by rewriting responses to match what was expected in the requested
(older) version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't
in the version it requested.

+1

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's
not exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say
that a change was made in v1.5 that added a new endpoint. Today, this is
what the response headers would look like when calling a server running
v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current:
1.2) b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
current 1.4) c) client requests v1.5, receives headers (min: 1.1, max:
1.5, current: 1.5)

What we have implemented today is that in case (b), the service will
hide any changes that we introduced in v1.5. But those changes did not
affect any functionality of the v1.4 API, so Dmitry objects to this. So
do I.

The issue at hand is the response in case (b) ... though after spending
the last several months working on api versioning, I actually think all
of those are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

That sounds really like something people actually want from us.
Just one clarifying question: shouldn't b) and c) be compatible-with:
1.4, as 1.4 was a breaking change?

Yes -- (b) and (c) are identical responses.

Discuss.

-Devananda

On Tue, Jun 16, 2015 at 7:13 AM Dmitry Tantsur <dtantsur@redhat.com
dtantsur@redhat.com> wrote:

On 06/16/2015 03:47 PM, Jim Rollenhagen wrote:
 > On Tue, Jun 16, 2015 at 08:56:37AM +0200, Dmitry Tantsur wrote:
 >> On 06/04/2015 08:58 AM, Xu, Hejie wrote:
 >>> Hi, guys,
 >>> I’m working on adding Microversion into the API-WG’s guideline
which
 >>> make sure we have consistent Microversion behavior in the API
for user.
 >>> The Nova and Ironic already have Microversion implementation,
and as I
 >>> know Magnum _https://review.openstack.org/#/c/184975/_ is going to
 >>> implement Microversion also.
 >>> Hope all the projects which support( or plan to) Microversion
can join
 >>> the review of guideline.
 >>> The Mircoversion specification(this almost copy from nova-specs):
 >>> _https://review.openstack.org/#/c/187112_
 >>> And another guideline for when we should bump Mircoversion
 >>> _https://review.openstack.org/#/c/187896/_
 >>> As I know, there already have a little different between Nova and
 >>> Ironic’s implementation. Ironic return min/max version when the
requested
 >>> version doesn’t support in server by http-headers. There isn’t such
 >>> thing in nova. But that is something for version negotiation we
need for
 >>> nova also.
 >>> Sean have pointed out we should use response body instead of http
 >>> headers, the body can includes error message. Really hope
ironic team
 >>> can take a
 >>> look at if you guys have compelling reason for using http headers.
 >>> And if we think return body instead of http headers, we
probably need
 >>> think about back-compatible also. Because Microversion itself isn’t
 >>> versioned.
 >>> So I think we should keep those header for a while, does make
sense?
 >>> Hope we have good guideline for Microversion, because we only
can change
 >>> Mircoversion itself by back-compatible way.
 >>> Thanks
 >>> Alex Xu
 >>
 >> Hi all!
 >>
 >> I'd like to try put in feedback based on living with
microversions in Kilo
 >> release of Ironic.
 >
 > And here's my take, based on my experiences. Keep in mind I'm a core
 > reviewer, a developer, and an operator of Ironic.

Thanks Jim, much appreciated!

 >
 >  From an ops perspective, our team has built our fair share of
tooling to
 > help us run Ironic. Some of it uses the REST API via python or
node.js,
 > and of course we all use the CLI client often.
 >
 > We also continuously deploy Ironic, for full transparency. My
experience
 > is not with how this works every 6 months, but in the day-to-day.
 >
 >>
 >> First of all, after talking to folks off-list, I realized that
we all, and
 >> the spec itself, confuse 3 aspects of microversion usage:
 >>
 >> 1. protecting from breaking changes.
 >> This is clearly a big win from user's point of view, and it
allowed us to
 >> conduct painful change with renaming an important node state in
our state
 >> machine. It will allows us even worse change this cycle: change
of the
 >> default state.
 >>
 >
 > +1. Good stuff. My tooling doesn't break when I upgrade. Yay.
 >
 >> 2. API discoverability.
 >> While I believe that there maybe be better implementation of
this idea, I
 >> think I got it now. People want services to report API versions they
 >> support. People want to be able to request a specific version,
and fail
 >> early if it is not present. Also +1 from me.
 >>
 >
 > I don't tend to personally do this. I usually am aware of what
version
 > of Ironic I'm running against. However I see how this could be useful
 > for other folks.
 >
 > I do, however, use the versions to say, "Oh, I can now request
1.5 which
 > has logical names! That's useful, let's set those to the names in our
 > CMDB." Now my tooling that interacts with the CMDB and Ironic can
look
 > at the version and decide to use node.name 
instead of the old hack we
 > used to use.
 >
 >> 3. hiding new features from older clients
 >> This is not directly stated by the spec, but many people imply
it, and Nova
 >> and Ironic did it in Kilo. I want us to be clear: it is not the
same as #2.
 >> You can report versions, but still allow new features to be used.
 >>
 >
 > This is still totally useful. If you know what version you are
running
 > against, you know exactly what features are available.

"You know" is about #2 - that's where confusion is :)
so if you know, that moving to inspection state is disallowed for your
tooling (but not for the whole system!), what does it give you?

 >
 > I think the disconnect here is that we don't expect users
(whether those
 > are people or computers) to explicitly request a version. We need to
 > message better that if you are using Ironic or building a tool
against
 > Ironic's API, you should be pinning the version. We also need to take
 > this comment block[0] and put it in our docs, so users know what each
 > version does.
 >
 > Knowing that I get feature X when I upgrade to version Y is useful.
 >
 >> It is this particular thing that gets -2 from me, after I've
seen how it
 >> worked in practice, and that's why.
 >>
 >> First of all, I don't believe anyone needs it. Seriously, I
can't imagine a
 >> user asking "please prevent me from using non-breaking changes".
And attempt
 >> to implement it was IMO a big failure for the following reasons:
 >>
 >> a) It's hard to do. Even we, the core team, got confused, and
for non-core
 >> people it took several iteration to do right. It's a big load on
both
 >> developers and reviewers.
 >>
 >
 > I do agree with this. It's been painful. However, I think we're
mostly
 > past that pain at this point. Does this patch[1] look like developer
 > pain?

It's not that painful to write. Now. When we have 10-20 version, it
probably will :)
anyway, it's hard to explain newcomers how to do it, and it's hard to
review the result. we failed at it, e.g. with error codes.

 >
 >> b) It's incomplete (at least for Ironic). We have several
API-exposed things
 >> that are just impossible to hide. Good example are node states:
if node is
 >> in a new state, we can't but expose it to older tooling. Our
free-form JSON
 >> fields properties, instance_info, driver_info and
driver_internal_info are
 >> examples as well. It's useless to speak about API contract,
while we have
 >> those.
 >>
 >
 > I somewhat agree here.
 >
 > With node states, there are cases where we were able to hide it
 > (NOSTATE -> AVAILABLE), and cases where we were not (adding
MANAGEABLE).
 > However, this list of states is (AIUI) not part of the API contract;
 > rather the verbs available to move between states are.

What's the point in contract, if there are things not covered by it that
drastically change the system behavior?

 >
 > As far as JSON fields, we've never had a contract around what
keys are
 > available. Only the semantics of working with those fields, and which
 > fields exist.

ditto as above: you can request new features by modifying driver_info.

 >
 >> c) It gives additional push back to making (required) breaking
changes. We
 >> already got suggestions to have ONE MORE feature gating for breaking
 >> changes. Reason: people will need to increase microversions to
get features,
 >> and your breaking change will prevent it.
 >>
 >
 > This is just silly. If 1.10 breaks a user, and the user wants 1.11,
 > they'll need to fix that breakage.

++ but not everyone agreed on the summit, when I was talking about
ENROLL state

 >
 >> d) It requires a hard compromise on the CLI tool. You either
default it to
 >> 1.0 forever, and force all the people to get used to figuring
out version
 >> numbers and using `ironic --ironic-api-version x.y` every time
(terrible
 >> user experience), or you default it to some known good version,
bumping it
 >> from time to time. This, in turn, has 2 more serious problems:
 >>
 >
 > I disagree that pinning a version all the time is a terrible
experience.
 > We already require a number of options for authentication
(OS_USERNAME,
 > OS_PASSWORD, etc etc). How many folks do you think type these in
every
 > time? Solution is simple: add IRONIC_API_VERSION to whatever
exports the
 > other environment variables.

It's not that bad, especially if devstack/tripleo will provide some
reasonable default for you.

I remember, however, Devananda didn't like the idea.

And it definitely makes a quick start guide a bit harder to follow. I
already imagine how many people will forget about this pinning (either
to do it, or do update when they need new features).

 >
 > The version depends on the environment you are running against -
why not
 > treat it as such?
 >
 >> d.1) you start to break people \o/ that's not a theoretical
concern: our
 >> downstream tooling did get broken by updating to newer
ironicclient from git
 >>
 >
 > As I said before, we need to encourage folks to pin client
versions if
 > they don't want to break. I'm probably alone here, but I would even
 > propose making the version *required*. Force people to think
about what
 > they are doing. If folks are okay with being broken, they can pass
 > "latest".

Could be a good default for devstack btw

 >
 >> d.2) you require complex version negotiations on the client
side. Otherwise
 >> imaging CLI tool defaulting to 1.6 will issue `node-create` to
Ironic
 >> supporting only 1.5. Guess what? It will fail despite
node-create being very
 >> old feature. Again, that's not something theoretical: that's how
we broke
 >> TripleO CI.
 >>
 >
 > Again, pin it.
 >
 >> e) Every microversion should be fully tested separately. Which
ended up in
 >> Ironic having 4 versions 1.2-1.5 that were never ever gate
tested. Even
 >> worse, initially, our gate tested only the oldest version 1.1,
but we solved
 >> it (though it took time to realize). The only good thing here is
that these
 >> versions 1.2-1.5 were probably never used by anyone.
 >>
 >
 > Hi. I've used some of these. :)

You didn't tell me last time we talked :) note, that you didn't use
them, unless you explicitly requested, because IIRC we never defaulted
our client to any of these. So for most people, even deploying from
master, it was 1.1 -> 1.6.

 >
 > // jim
 >
 > [0]
https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/__init__.py#L59-63
 > [1]
https://review.openstack.org/#/c/188873/1/ironic/api/controllers/v1/node.py
 >>
 >> To sum this long post up, I'm seeing that hiding new features
based on
 >> microversions brings much more problems, than it solves (I'm not
aware of
 >> the latter at all). I'm very opposed to continuing doing it in
Ironic, and
 >> I'm going to propose patch stopping gating Kilo changes
(non-breaking
 >> obviously).
 >>
 >> Hope that helps,
 >> Dmitry
 >>
 >>>


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 22, 2015 by Dmitry_Tantsur (18,080 points)   2 3 8
0 votes

On 22 June 2015 at 00:14, Michael Still mikal@stillhq.com wrote:
As an aside, do we think that exposing the exact version of a server
process is safe from a security perspective?

During discussions in the Nova API meeting, it was noted that while we
do expose the exact API version, we are not exposing the git hash of
the deployed cloud.

Its certainly something we need to consider when we talk about bumping
the micro-version for a security fix, but I suspect the need to
backport is likely to force us to not bump the API version for such
changes.

Its certainly a concern that should be noted, in the hope we can get
some extra eyes on that detail.

Thanks,
John

On Sat, Jun 20, 2015 at 10:14 AM, Devananda van der Veen
devananda.vdv@gmail.com wrote:

Almost all of our discussions so far on this topic have left something out,
which Monty pointed out to me last week. I'm following up now because
E_TRAVEL...

tldr;
What we're versioning here are API's, not packages. It's not a question of
numbering and dependency ordering, but of communicating support[ed|able]
interfaces between running services. Libtool is more relevant than semver.

http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Right now we lack a means to express that the API response is
"compatible-with" a particular previously-released version of the API. If we
had that, instead of "current-version", I believe we would have much happier
users (and a happier Dmitry and jroll).

Long version...
Every HTTP response from Ironic today includes three headers: min, max, and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say that
a change was made in v1.5 that added a new endpoint. Today, this is what the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current: 1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current 1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current: 1.5)

What we have implemented today is that in case (b), the service will hide
any changes that we introduced in v1.5. But those changes did not affect any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending the
last several months working on api versioning, I actually think all of those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

-Devananda

On Tue, Jun 16, 2015 at 7:13 AM Dmitry Tantsur dtantsur@redhat.com wrote:

On 06/16/2015 03:47 PM, Jim Rollenhagen wrote:

On Tue, Jun 16, 2015 at 08:56:37AM +0200, Dmitry Tantsur wrote:

On 06/04/2015 08:58 AM, Xu, Hejie wrote:

Hi, guys,
I’m working on adding Microversion into the API-WG’s guideline which
make sure we have consistent Microversion behavior in the API for
user.
The Nova and Ironic already have Microversion implementation, and as I
know Magnum _https://review.openstack.org/#/c/184975/_ is going to
implement Microversion also.
Hope all the projects which support( or plan to) Microversion can join
the review of guideline.
The Mircoversion specification(this almost copy from nova-specs):
_https://review.openstack.org/#/c/187112_
And another guideline for when we should bump Mircoversion
_https://review.openstack.org/#/c/187896/_
As I know, there already have a little different between Nova and
Ironic’s implementation. Ironic return min/max version when the
requested
version doesn’t support in server by http-headers. There isn’t such
thing in nova. But that is something for version negotiation we need
for
nova also.
Sean have pointed out we should use response body instead of http
headers, the body can includes error message. Really hope ironic team
can take a
look at if you guys have compelling reason for using http headers.
And if we think return body instead of http headers, we probably need
think about back-compatible also. Because Microversion itself isn’t
versioned.
So I think we should keep those header for a while, does make sense?
Hope we have good guideline for Microversion, because we only can
change
Mircoversion itself by back-compatible way.
Thanks
Alex Xu

Hi all!

I'd like to try put in feedback based on living with microversions in
Kilo
release of Ironic.

And here's my take, based on my experiences. Keep in mind I'm a core
reviewer, a developer, and an operator of Ironic.

Thanks Jim, much appreciated!

From an ops perspective, our team has built our fair share of tooling
to
help us run Ironic. Some of it uses the REST API via python or node.js,
and of course we all use the CLI client often.

We also continuously deploy Ironic, for full transparency. My experience
is not with how this works every 6 months, but in the day-to-day.

First of all, after talking to folks off-list, I realized that we all,
and
the spec itself, confuse 3 aspects of microversion usage:

  1. protecting from breaking changes.
    This is clearly a big win from user's point of view, and it allowed us
    to
    conduct painful change with renaming an important node state in our
    state
    machine. It will allows us even worse change this cycle: change of the
    default state.

+1. Good stuff. My tooling doesn't break when I upgrade. Yay.

  1. API discoverability.
    While I believe that there maybe be better implementation of this idea,
    I
    think I got it now. People want services to report API versions they
    support. People want to be able to request a specific version, and fail
    early if it is not present. Also +1 from me.

I don't tend to personally do this. I usually am aware of what version
of Ironic I'm running against. However I see how this could be useful
for other folks.

I do, however, use the versions to say, "Oh, I can now request 1.5 which
has logical names! That's useful, let's set those to the names in our
CMDB." Now my tooling that interacts with the CMDB and Ironic can look
at the version and decide to use node.name instead of the old hack we
used to use.

  1. hiding new features from older clients
    This is not directly stated by the spec, but many people imply it, and
    Nova
    and Ironic did it in Kilo. I want us to be clear: it is not the same as

2.

You can report versions, but still allow new features to be used.

This is still totally useful. If you know what version you are running
against, you know exactly what features are available.

"You know" is about #2 - that's where confusion is :)
so if you know, that moving to inspection state is disallowed for your
tooling (but not for the whole system!), what does it give you?

I think the disconnect here is that we don't expect users (whether those
are people or computers) to explicitly request a version. We need to
message better that if you are using Ironic or building a tool against
Ironic's API, you should be pinning the version. We also need to take
this comment block[0] and put it in our docs, so users know what each
version does.

Knowing that I get feature X when I upgrade to version Y is useful.

It is this particular thing that gets -2 from me, after I've seen how
it
worked in practice, and that's why.

First of all, I don't believe anyone needs it. Seriously, I can't
imagine a
user asking "please prevent me from using non-breaking changes". And
attempt
to implement it was IMO a big failure for the following reasons:

a) It's hard to do. Even we, the core team, got confused, and for
non-core
people it took several iteration to do right. It's a big load on both
developers and reviewers.

I do agree with this. It's been painful. However, I think we're mostly
past that pain at this point. Does this patch[1] look like developer
pain?

It's not that painful to write. Now. When we have 10-20 version, it
probably will :)
anyway, it's hard to explain newcomers how to do it, and it's hard to
review the result. we failed at it, e.g. with error codes.

b) It's incomplete (at least for Ironic). We have several API-exposed
things
that are just impossible to hide. Good example are node states: if node
is
in a new state, we can't but expose it to older tooling. Our free-form
JSON
fields properties, instanceinfo, driverinfo and driverinternalinfo
are
examples as well. It's useless to speak about API contract, while we
have
those.

I somewhat agree here.

With node states, there are cases where we were able to hide it
(NOSTATE -> AVAILABLE), and cases where we were not (adding MANAGEABLE).
However, this list of states is (AIUI) not part of the API contract;
rather the verbs available to move between states are.

What's the point in contract, if there are things not covered by it that
drastically change the system behavior?

As far as JSON fields, we've never had a contract around what keys are
available. Only the semantics of working with those fields, and which
fields exist.

ditto as above: you can request new features by modifying driver_info.

c) It gives additional push back to making (required) breaking changes.
We
already got suggestions to have ONE MORE feature gating for breaking
changes. Reason: people will need to increase microversions to get
features,
and your breaking change will prevent it.

This is just silly. If 1.10 breaks a user, and the user wants 1.11,
they'll need to fix that breakage.

++ but not everyone agreed on the summit, when I was talking about
ENROLL state

d) It requires a hard compromise on the CLI tool. You either default it
to
1.0 forever, and force all the people to get used to figuring out
version
numbers and using ironic --ironic-api-version x.y every time
(terrible
user experience), or you default it to some known good version, bumping
it
from time to time. This, in turn, has 2 more serious problems:

I disagree that pinning a version all the time is a terrible experience.
We already require a number of options for authentication (OSUSERNAME,
OS
PASSWORD, etc etc). How many folks do you think type these in every
time? Solution is simple: add IRONICAPIVERSION to whatever exports the
other environment variables.

It's not that bad, especially if devstack/tripleo will provide some
reasonable default for you.

I remember, however, Devananda didn't like the idea.

And it definitely makes a quick start guide a bit harder to follow. I
already imagine how many people will forget about this pinning (either
to do it, or do update when they need new features).

The version depends on the environment you are running against - why not
treat it as such?

d.1) you start to break people \o/ that's not a theoretical concern:
our
downstream tooling did get broken by updating to newer ironicclient
from git

As I said before, we need to encourage folks to pin client versions if
they don't want to break. I'm probably alone here, but I would even
propose making the version required. Force people to think about what
they are doing. If folks are okay with being broken, they can pass
"latest".

Could be a good default for devstack btw

d.2) you require complex version negotiations on the client side.
Otherwise
imaging CLI tool defaulting to 1.6 will issue node-create to Ironic
supporting only 1.5. Guess what? It will fail despite node-create being
very
old feature. Again, that's not something theoretical: that's how we
broke
TripleO CI.

Again, pin it.

e) Every microversion should be fully tested separately. Which ended up
in
Ironic having 4 versions 1.2-1.5 that were never ever gate tested. Even
worse, initially, our gate tested only the oldest version 1.1, but we
solved
it (though it took time to realize). The only good thing here is that
these
versions 1.2-1.5 were probably never used by anyone.

Hi. I've used some of these. :)

You didn't tell me last time we talked :) note, that you didn't use
them, unless you explicitly requested, because IIRC we never defaulted
our client to any of these. So for most people, even deploying from
master, it was 1.1 -> 1.6.

// jim

[0]
https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/__init__.py#L59-63
[1]
https://review.openstack.org/#/c/188873/1/ironic/api/controllers/v1/node.py

To sum this long post up, I'm seeing that hiding new features based on
microversions brings much more problems, than it solves (I'm not aware
of
the latter at all). I'm very opposed to continuing doing it in Ironic,
and
I'm going to propose patch stopping gating Kilo changes (non-breaking
obviously).

Hope that helps,
Dmitry

>


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

--
Rackspace Australia


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 22, 2015 by John_Garbutt (15,460 points)   3 4 5
0 votes

On 06/22/2015 05:28 AM, John Garbutt wrote:
On 22 June 2015 at 00:14, Michael Still mikal@stillhq.com wrote:

As an aside, do we think that exposing the exact version of a server
process is safe from a security perspective?

During discussions in the Nova API meeting, it was noted that while we
do expose the exact API version, we are not exposing the git hash of
the deployed cloud.

Its certainly something we need to consider when we talk about bumping
the micro-version for a security fix, but I suspect the need to
backport is likely to force us to not bump the API version for such
changes.

Its certainly a concern that should be noted, in the hope we can get
some extra eyes on that detail.

First, I don't think this is an issue. Like John said, we aren't
exposing git hash.

Secondly... the API is a programing interface. Hiding the version number
on a programing interface is... kind of crazy. It would be like making
uname -a return ("Probably Linux") instead of anything specific. Or
"probably libc, your guess is as good as mine". I get where people get
freaked out about sharing, but, you can't have an API without sharing
information about what it is and how to use it. The logical follow on
from hiding the API version is we should delete all the API
documentation as well, because someone might use it to do a bad thing.

Thirdly, we're building an endpoint that we expect to be on the
internet. If we think the only security for it is by hiding information
about it, I think we've got to go back to the drawing board about a lot
of things. Yes, it's hard to get that right. But that's kind of the
whole point of the project. :)

-Sean

--
Sean Dague
http://dague.net


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 22, 2015 by Sean_Dague (66,200 points)   4 11 18
0 votes

(Noting that its kind of late where I am).

Sean, I totally agree that we should fix uname. Let's get on that.

Michael

On Mon, Jun 22, 2015 at 8:52 PM, Sean Dague sean@dague.net wrote:
On 06/22/2015 05:28 AM, John Garbutt wrote:

On 22 June 2015 at 00:14, Michael Still mikal@stillhq.com wrote:

As an aside, do we think that exposing the exact version of a server
process is safe from a security perspective?

During discussions in the Nova API meeting, it was noted that while we
do expose the exact API version, we are not exposing the git hash of
the deployed cloud.

Its certainly something we need to consider when we talk about bumping
the micro-version for a security fix, but I suspect the need to
backport is likely to force us to not bump the API version for such
changes.

Its certainly a concern that should be noted, in the hope we can get
some extra eyes on that detail.

First, I don't think this is an issue. Like John said, we aren't
exposing git hash.

Secondly... the API is a programing interface. Hiding the version number
on a programing interface is... kind of crazy. It would be like making
uname -a return ("Probably Linux") instead of anything specific. Or
"probably libc, your guess is as good as mine". I get where people get
freaked out about sharing, but, you can't have an API without sharing
information about what it is and how to use it. The logical follow on
from hiding the API version is we should delete all the API
documentation as well, because someone might use it to do a bad thing.

Thirdly, we're building an endpoint that we expect to be on the
internet. If we think the only security for it is by hiding information
about it, I think we've got to go back to the drawing board about a lot
of things. Yes, it's hard to get that right. But that's kind of the
whole point of the project. :)

    -Sean

--
Sean Dague
http://dague.net


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

--
Rackspace Australia


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 22, 2015 by Michael_Still (16,180 points)   3 6 13
0 votes

Sorry for late response here,

2015-06-20 9:14 GMT+09:00 Devananda van der Veen devananda.vdv@gmail.com:

Long version...
Every HTTP response from Ironic today includes three headers: min, max, and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say that
a change was made in v1.5 that added a new endpoint. Today, this is what the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current: 1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current 1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current: 1.5)

What we have implemented today is that in case (b), the service will hide
any changes that we introduced in v1.5. But those changes did not affect any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending the
last several months working on api versioning, I actually think all of those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

I think it is good that backwards compatible changes(new features) are
available on older microversion also only if the clouds which are
used by users continue upgrading.

I think Sophia's role on "The Backwards Compatibility Fallacy" of
Sean's blog1 has answered to this question, but I'd like to try
explaining it here for considering Ironic situation.
As the example, there are multiple public clouds which provide
different max microversions like:

Cloud A: Max microversion: v1.5
Cloud B: Max microversion: v1.1

A user wrote his own application for running on cloud A and specifying
v1.1 on the first application implementation.
The first application used small number of APIs, and he wanted to
extend the application.
If all backwards compatible changes(v1.2 - v1.5) appear on lower
microversion(in this case v1.1), he can use all new features even if
specifying v1.1.
That seemed really great for users at this time, and he extended the
application for using all features as possible.
but the specified microversion still is v1.1 because his application
worked fine even if using newer features.

After that, he needed to switch to the other cloud because of cost
merit or something.
The specified microversion was v1.1, so he did think his application
can work fine on cloud B also because of cloud B's max microversion.
But yes, his application could not work because his application had
already used newer features which are implemented on v1.2+.
In the real world, there are a lot of clouds and it is easy to imagine
this situation.

Current microversion implementation of Nova is blocking this situation
by making backwards every compatible change appear on each
microversion.
Nova team needs to consider interoperability between clouds so well
because Nova API is one of general external interfaces for end users.

On the other hand, Ironic API is for administrators, not for end users.
I am imaging that:
* Some administrator wrote his application for using Ironic API.
* From the viewpoint of administrator, the switching destination cloud
in newer in most cases.
* The application can continue working on newer clouds even after
switching many times.

So I feel the above interoperable issue example would not happen on
Ironic in most cases unless hiding backwards compatible changes on
lower microversion.
I guess this is the difference between Nova and Ironic on
interoperability discussion.

I cannot/don't want to enforce Ironic way at all, and it's fine to
find the best way on each project as OSS projects.
But only my concern here is that we cannot use "Microversions" as a
perfect keyword for OpenStack interoperability on whole OpenStack
projects if Ironic goes to the other way.

Thanks
Ken Ohmichi



OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 25, 2015 by Ken'ichi_Ohmichi (8,640 points)   2 3 3
0 votes

On 06/25/2015 10:18 AM, Ken'ichi Ohmichi wrote:
Sorry for late response here,

2015-06-20 9:14 GMT+09:00 Devananda van der Veen devananda.vdv@gmail.com:

Long version...
Every HTTP response from Ironic today includes three headers: min, max, and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say that
a change was made in v1.5 that added a new endpoint. Today, this is what the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current: 1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current 1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current: 1.5)

What we have implemented today is that in case (b), the service will hide
any changes that we introduced in v1.5. But those changes did not affect any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending the
last several months working on api versioning, I actually think all of those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

I think it is good that backwards compatible changes(new features) are
available on older microversion also only if the clouds which are
used by users continue upgrading.

I think Sophia's role on "The Backwards Compatibility Fallacy" of
Sean's blog[1] has answered to this question, but I'd like to try
explaining it here for considering Ironic situation.
As the example, there are multiple public clouds which provide
different max microversions like:

Cloud A: Max microversion: v1.5
Cloud B: Max microversion: v1.1

A user wrote his own application for running on cloud A and specifying
v1.1 on the first application implementation.
The first application used small number of APIs, and he wanted to
extend the application.
If all backwards compatible changes(v1.2 - v1.5) appear on lower
microversion(in this case v1.1), he can use all new features even if
specifying v1.1.
That seemed really great for users at this time, and he extended the
application for using all features as possible.
but the specified microversion still is v1.1 because his application
worked fine even if using newer features.

It's a valid concern, but it does not justify such a insanely complex
measure with so many downsides. We can't and shouldn't prevent people
from trying to work around the API contract. It's like people who will
claim version 1.3 while they actually are not compatible with it: they
are asking for breakage. And with hiding new features you WILL get this
situation.

On the other hand, I've put up a lot of concerns with Nova's
implementation, that people didn't even try to address. I'm not going to
consider this one overweighting.

After that, he needed to switch to the other cloud because of cost
merit or something.
The specified microversion was v1.1, so he did think his application
can work fine on cloud B also because of cloud B's max microversion.
But yes, his application could not work because his application had
already used newer features which are implemented on v1.2+.
In the real world, there are a lot of clouds and it is easy to imagine
this situation.

Current microversion implementation of Nova is blocking this situation
by making backwards every compatible change appear on each
microversion.
Nova team needs to consider interoperability between clouds so well
because Nova API is one of general external interfaces for end users.

On the other hand, Ironic API is for administrators, not for end users.
I am imaging that:
* Some administrator wrote his application for using Ironic API.
* From the viewpoint of administrator, the switching destination cloud
in newer in most cases.
* The application can continue working on newer clouds even after
switching many times.

So I feel the above interoperable issue example would not happen on
Ironic in most cases unless hiding backwards compatible changes on
lower microversion.
I guess this is the difference between Nova and Ironic on
interoperability discussion.

I cannot/don't want to enforce Ironic way at all, and it's fine to
find the best way on each project as OSS projects.
But only my concern here is that we cannot use "Microversions" as a
perfect keyword for OpenStack interoperability on whole OpenStack
projects if Ironic goes to the other way.

Thanks
Ken Ohmichi


[1]: https://dague.net/2015/06/05/the-nova-api-in-kilo-and-beyond-2/


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 25, 2015 by Dmitry_Tantsur (18,080 points)   2 3 8
0 votes

2015-06-25 17:31 GMT+09:00 Dmitry Tantsur dtantsur@redhat.com:

On 06/25/2015 10:18 AM, Ken'ichi Ohmichi wrote:

Sorry for late response here,

2015-06-20 9:14 GMT+09:00 Devananda van der Veen
devananda.vdv@gmail.com:

Long version...
Every HTTP response from Ironic today includes three headers: min, max,
and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that
version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't
in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's
not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say
that
a change was made in v1.5 that added a new endpoint. Today, this is what
the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current:
1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current
1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current:
1.5)

What we have implemented today is that in case (b), the service will
hide
any changes that we introduced in v1.5. But those changes did not affect
any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending
the
last several months working on api versioning, I actually think all of
those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

I think it is good that backwards compatible changes(new features) are
available on older microversion also only if the clouds which are
used by users continue upgrading.

I think Sophia's role on "The Backwards Compatibility Fallacy" of
Sean's blog[1] has answered to this question, but I'd like to try
explaining it here for considering Ironic situation.
As the example, there are multiple public clouds which provide
different max microversions like:

Cloud A: Max microversion: v1.5
Cloud B: Max microversion: v1.1

A user wrote his own application for running on cloud A and specifying
v1.1 on the first application implementation.
The first application used small number of APIs, and he wanted to
extend the application.
If all backwards compatible changes(v1.2 - v1.5) appear on lower
microversion(in this case v1.1), he can use all new features even if
specifying v1.1.
That seemed really great for users at this time, and he extended the
application for using all features as possible.
but the specified microversion still is v1.1 because his application
worked fine even if using newer features.

It's a valid concern, but it does not justify such a insanely complex
measure with so many downsides. We can't and shouldn't prevent people from
trying to work around the API contract. It's like people who will claim
version 1.3 while they actually are not compatible with it: they are asking
for breakage. And with hiding new features you WILL get this situation.

Sorry, to be honest, I cannot understand your comment here.
Are you saying the above interoperable issue is not matter by
comparing downsides requirements?
If so, is that just for Ironic? or for whole OpenStack projects including Nova?

What is the reason for justifying your requirement?
Just many people are saying so around you without considering this
interoperable issue?

Thanks
Ken Ohmichi.


On the other hand, I've put up a lot of concerns with Nova's implementation,
that people didn't even try to address. I'm not going to consider this one
overweighting.

After that, he needed to switch to the other cloud because of cost
merit or something.
The specified microversion was v1.1, so he did think his application
can work fine on cloud B also because of cloud B's max microversion.
But yes, his application could not work because his application had
already used newer features which are implemented on v1.2+.
In the real world, there are a lot of clouds and it is easy to imagine
this situation.

Current microversion implementation of Nova is blocking this situation
by making backwards every compatible change appear on each
microversion.
Nova team needs to consider interoperability between clouds so well
because Nova API is one of general external interfaces for end users.

On the other hand, Ironic API is for administrators, not for end users.
I am imaging that:
* Some administrator wrote his application for using Ironic API.
* From the viewpoint of administrator, the switching destination cloud
in newer in most cases.
* The application can continue working on newer clouds even after
switching many times.

So I feel the above interoperable issue example would not happen on
Ironic in most cases unless hiding backwards compatible changes on
lower microversion.
I guess this is the difference between Nova and Ironic on
interoperability discussion.

I cannot/don't want to enforce Ironic way at all, and it's fine to
find the best way on each project as OSS projects.
But only my concern here is that we cannot use "Microversions" as a
perfect keyword for OpenStack interoperability on whole OpenStack
projects if Ironic goes to the other way.

Thanks
Ken Ohmichi


[1]: https://dague.net/2015/06/05/the-nova-api-in-kilo-and-beyond-2/


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@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-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 25, 2015 by Ken'ichi_Ohmichi (8,640 points)   2 3 3
0 votes

On 06/25/2015 11:11 AM, Ken'ichi Ohmichi wrote:
2015-06-25 17:31 GMT+09:00 Dmitry Tantsur dtantsur@redhat.com:

On 06/25/2015 10:18 AM, Ken'ichi Ohmichi wrote:

Sorry for late response here,

2015-06-20 9:14 GMT+09:00 Devananda van der Veen
devananda.vdv@gmail.com:

Long version...
Every HTTP response from Ironic today includes three headers: min, max,
and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that
version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that weren't
in
the version it requested.

However, we do need to signal their presence, and we don't have a good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if it's
not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say
that
a change was made in v1.5 that added a new endpoint. Today, this is what
the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current:
1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current
1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current:
1.5)

What we have implemented today is that in case (b), the service will
hide
any changes that we introduced in v1.5. But those changes did not affect
any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending
the
last several months working on api versioning, I actually think all of
those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

I think it is good that backwards compatible changes(new features) are
available on older microversion also only if the clouds which are
used by users continue upgrading.

I think Sophia's role on "The Backwards Compatibility Fallacy" of
Sean's blog[1] has answered to this question, but I'd like to try
explaining it here for considering Ironic situation.
As the example, there are multiple public clouds which provide
different max microversions like:

Cloud A: Max microversion: v1.5
Cloud B: Max microversion: v1.1

A user wrote his own application for running on cloud A and specifying
v1.1 on the first application implementation.
The first application used small number of APIs, and he wanted to
extend the application.
If all backwards compatible changes(v1.2 - v1.5) appear on lower
microversion(in this case v1.1), he can use all new features even if
specifying v1.1.
That seemed really great for users at this time, and he extended the
application for using all features as possible.
but the specified microversion still is v1.1 because his application
worked fine even if using newer features.

It's a valid concern, but it does not justify such a insanely complex
measure with so many downsides. We can't and shouldn't prevent people from
trying to work around the API contract. It's like people who will claim
version 1.3 while they actually are not compatible with it: they are asking
for breakage. And with hiding new features you WILL get this situation.

Sorry, to be honest, I cannot understand your comment here.
Are you saying the above interoperable issue is not matter by
comparing downsides requirements?
If so, is that just for Ironic? or for whole OpenStack projects including Nova?

What is the reason for justifying your requirement?
Just many people are saying so around you without considering this
interoperable issue?

I'm only saying that these (theoretical) issue is smaller than issues
that your approach introduces. Please see all my upper posts for details.

Thanks
Ken Ohmichi.


On the other hand, I've put up a lot of concerns with Nova's implementation,
that people didn't even try to address. I'm not going to consider this one
overweighting.

After that, he needed to switch to the other cloud because of cost
merit or something.
The specified microversion was v1.1, so he did think his application
can work fine on cloud B also because of cloud B's max microversion.
But yes, his application could not work because his application had
already used newer features which are implemented on v1.2+.
In the real world, there are a lot of clouds and it is easy to imagine
this situation.

Current microversion implementation of Nova is blocking this situation
by making backwards every compatible change appear on each
microversion.
Nova team needs to consider interoperability between clouds so well
because Nova API is one of general external interfaces for end users.

On the other hand, Ironic API is for administrators, not for end users.
I am imaging that:
* Some administrator wrote his application for using Ironic API.
* From the viewpoint of administrator, the switching destination cloud
in newer in most cases.
* The application can continue working on newer clouds even after
switching many times.

So I feel the above interoperable issue example would not happen on
Ironic in most cases unless hiding backwards compatible changes on
lower microversion.
I guess this is the difference between Nova and Ironic on
interoperability discussion.

I cannot/don't want to enforce Ironic way at all, and it's fine to
find the best way on each project as OSS projects.
But only my concern here is that we cannot use "Microversions" as a
perfect keyword for OpenStack interoperability on whole OpenStack
projects if Ironic goes to the other way.

Thanks
Ken Ohmichi


[1]: https://dague.net/2015/06/05/the-nova-api-in-kilo-and-beyond-2/


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@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-request@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-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 25, 2015 by Dmitry_Tantsur (18,080 points)   2 3 8
0 votes

2015-06-25 18:16 GMT+09:00 Dmitry Tantsur dtantsur@redhat.com:

On 06/25/2015 11:11 AM, Ken'ichi Ohmichi wrote:

2015-06-25 17:31 GMT+09:00 Dmitry Tantsur dtantsur@redhat.com:

On 06/25/2015 10:18 AM, Ken'ichi Ohmichi wrote:

Sorry for late response here,

2015-06-20 9:14 GMT+09:00 Devananda van der Veen
devananda.vdv@gmail.com:

Long version...
Every HTTP response from Ironic today includes three headers: min, max,
and
version. The service can present an older API version, as long as it is
greater-than-or-equal-to the minimum supported version, even if that
version
is incompatible with the maximum supported version. It does this by
rewriting responses to match what was expected in the requested (older)
version.

When the newer version is identical for all interfaces present in the
older version, this can be called compatible. Dmitry's point is that we
don't need to hide newer interfaces from users who request an older API
version, because the client won't know or care about things that
weren't
in
the version it requested.

However, we do need to signal their presence, and we don't have a
good
means for that right now. We also need to signal to the client that the
response given is "compatible with" a certain "age" of API, even if
it's
not
exactly the same. And we don't have any means for that, either.

Time for an example....

Let's say that an incompatible change was made in v1.3. Let's also say
that
a change was made in v1.5 that added a new endpoint. Today, this is
what
the
response headers would look like when calling a server running v1.5.

a) client requests v1.2, receives headers (min: 1.1, max: 1.5, current:
1.2)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5, current
1.4)
c) client requests v1.5, receives headers (min: 1.1, max: 1.5, current:
1.5)

What we have implemented today is that in case (b), the service will
hide
any changes that we introduced in v1.5. But those changes did not
affect
any
functionality of the v1.4 API, so Dmitry objects to this. So do I.

The issue at hand is the response in case (b) ... though after spending
the
last several months working on api versioning, I actually think all of
those
are poor responses.

What I believe we should have:
a) client requests v1.2, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.1)
b) client requests v1.4, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)
b) client requests v1.5, receives headers (min: 1.1, max: 1.5,
compatible-with: 1.3)

Yes -- (b) and (c) are identical responses.

Discuss.

I think it is good that backwards compatible changes(new features) are
available on older microversion also only if the clouds which are
used by users continue upgrading.

I think Sophia's role on "The Backwards Compatibility Fallacy" of
Sean's blog[1] has answered to this question, but I'd like to try
explaining it here for considering Ironic situation.
As the example, there are multiple public clouds which provide
different max microversions like:

Cloud A: Max microversion: v1.5
Cloud B: Max microversion: v1.1

A user wrote his own application for running on cloud A and specifying
v1.1 on the first application implementation.
The first application used small number of APIs, and he wanted to
extend the application.
If all backwards compatible changes(v1.2 - v1.5) appear on lower
microversion(in this case v1.1), he can use all new features even if
specifying v1.1.
That seemed really great for users at this time, and he extended the
application for using all features as possible.
but the specified microversion still is v1.1 because his application
worked fine even if using newer features.

It's a valid concern, but it does not justify such a insanely complex
measure with so many downsides. We can't and shouldn't prevent people
from
trying to work around the API contract. It's like people who will claim
version 1.3 while they actually are not compatible with it: they are
asking
for breakage. And with hiding new features you WILL get this situation.

Sorry, to be honest, I cannot understand your comment here.
Are you saying the above interoperable issue is not matter by
comparing downsides requirements?
If so, is that just for Ironic? or for whole OpenStack projects including
Nova?

What is the reason for justifying your requirement?
Just many people are saying so around you without considering this
interoperable issue?

I'm only saying that these (theoretical) issue is smaller than issues that
your approach introduces. Please see all my upper posts for details.

I just want to know your point is just for Ironic or whole projects.
I tried explaining the difference between Nova and Ironic expectation
related to microversions and your comment seems not considering this
difference at all.
and your posts were too many already, so I'm not sure the mail..

Thanks
Ken Ohmichi


On the other hand, I've put up a lot of concerns with Nova's
implementation,
that people didn't even try to address. I'm not going to consider this
one
overweighting.

After that, he needed to switch to the other cloud because of cost
merit or something.
The specified microversion was v1.1, so he did think his application
can work fine on cloud B also because of cloud B's max microversion.
But yes, his application could not work because his application had
already used newer features which are implemented on v1.2+.
In the real world, there are a lot of clouds and it is easy to imagine
this situation.

Current microversion implementation of Nova is blocking this situation
by making backwards every compatible change appear on each
microversion.
Nova team needs to consider interoperability between clouds so well
because Nova API is one of general external interfaces for end users.

On the other hand, Ironic API is for administrators, not for end users.
I am imaging that:
* Some administrator wrote his application for using Ironic API.
* From the viewpoint of administrator, the switching destination cloud
in newer in most cases.
* The application can continue working on newer clouds even after
switching many times.

So I feel the above interoperable issue example would not happen on
Ironic in most cases unless hiding backwards compatible changes on
lower microversion.
I guess this is the difference between Nova and Ironic on
interoperability discussion.

I cannot/don't want to enforce Ironic way at all, and it's fine to
find the best way on each project as OSS projects.
But only my concern here is that we cannot use "Microversions" as a
perfect keyword for OpenStack interoperability on whole OpenStack
projects if Ironic goes to the other way.

Thanks
Ken Ohmichi


[1]: https://dague.net/2015/06/05/the-nova-api-in-kilo-and-beyond-2/


OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
OpenStack-dev-request@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-request@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-request@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-request@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-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Jun 25, 2015 by Ken'ichi_Ohmichi (8,640 points)   2 3 3
...