← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1747935] [NEW] Openstack APIs and RFC 7234 HTTP caching

 

Public bug reported:

Description
===========
I recently hit an issue where I was using Terraform through an HTTP proxy (enforced by my company IT) to provision some resources in an Openstack cloud. Since creating the resources took some time, the initial response from openstack was "still creating...". Further polling of the resource status resulted in receiving *cached* copies of "still creating..." from the proxy until time-out.

RFC7234 that describes HTTP caching states that in absence of all
headers describing the lifetime/validity of the response, heuristic
algorithms may be applied by caches to guesstimate an appropriate value
for the validity of the response... (Who knows what is implemented out
there...) See: the HTTP caching RFC section 4.2.2
<https://tools.ietf.org/html/rfc7234#section-4.2.2>.

The API responses describe the current state of an object which isn't
permanent, but has a limited validity. In fact very limited as the state
of an object might change any moment.

Therefore it is my opinion that the Openstack API (Nova in this case,
but equally valid for all other APIs) should be responsible to include
proper HTTP headers in their responses to either disallow caching of the
response or at least limit it's validity.

See the HTTP caching RFC section 5
<https://tools.ietf.org/html/rfc7234#section-5> for headers that could
be used to accomplish that.

For sake of completeness; also see
https://github.com/gophercloud/gophercloud/issues/727 for my initial
client-side fix and related discussion with client-side project
owners...

Expected result
===============
Openstack APIs to include header(s) from RFC7234 section 5 <https://tools.ietf.org/html/rfc7234#section-5> to either disallow caching or to specify a meaningful lifetime or to force/implement revalidation options.

Actual result
=============
No headers controlling caching present whatsoever.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1747935

Title:
  Openstack APIs and RFC 7234 HTTP caching

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  I recently hit an issue where I was using Terraform through an HTTP proxy (enforced by my company IT) to provision some resources in an Openstack cloud. Since creating the resources took some time, the initial response from openstack was "still creating...". Further polling of the resource status resulted in receiving *cached* copies of "still creating..." from the proxy until time-out.

  RFC7234 that describes HTTP caching states that in absence of all
  headers describing the lifetime/validity of the response, heuristic
  algorithms may be applied by caches to guesstimate an appropriate
  value for the validity of the response... (Who knows what is
  implemented out there...) See: the HTTP caching RFC section 4.2.2
  <https://tools.ietf.org/html/rfc7234#section-4.2.2>.

  The API responses describe the current state of an object which isn't
  permanent, but has a limited validity. In fact very limited as the
  state of an object might change any moment.

  Therefore it is my opinion that the Openstack API (Nova in this case,
  but equally valid for all other APIs) should be responsible to include
  proper HTTP headers in their responses to either disallow caching of
  the response or at least limit it's validity.

  See the HTTP caching RFC section 5
  <https://tools.ietf.org/html/rfc7234#section-5> for headers that could
  be used to accomplish that.

  For sake of completeness; also see
  https://github.com/gophercloud/gophercloud/issues/727 for my initial
  client-side fix and related discussion with client-side project
  owners...

  Expected result
  ===============
  Openstack APIs to include header(s) from RFC7234 section 5 <https://tools.ietf.org/html/rfc7234#section-5> to either disallow caching or to specify a meaningful lifetime or to force/implement revalidation options.

  Actual result
  =============
  No headers controlling caching present whatsoever.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1747935/+subscriptions


Follow ups