settingsLogin | Registersettings

[openstack-dev] [Heat] Assumptions regarding extensions to OpenStack api's

0 votes

Hello Heat Team,

I was wondering if OpenStack Heat assumes that the Nova extensions api would always exist in a cloud? My impression was that since these features are extensions, they may or may not be implemented by the cloud provider and hence Heat must not rely on it being present.

My question is prompted by this code change: 0 where it is assumed that the os-interfaces extension 1 is implemented.

If we cannot rely on that assumption, then that code would need to be changed with a 404 guard since that endpoint may not exist and the nova client may thus raise a 404.

Thanks,
Pratik Mallya
Software Developer
Rackspace, Inc.


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 Sep 25, 2015 in openstack-dev by Pratik_Mallya (300 points)   1

2 Responses

0 votes

On 09/25/2015 02:32 PM, Pratik Mallya wrote:
Hello Heat Team,

I was wondering if OpenStack Heat assumes that the Nova extensions api
would always exist in a cloud? My impression was that since these
features are extensions, they may or may not be implemented by the cloud
provider and hence Heat must not rely on it being present.

My question is prompted by this code change: [0] where it is assumed
that the os-interfaces extension [1] is implemented.

If we cannot rely on that assumption, then that code would need to be
changed with a 404 guard since that endpoint may not exist and the nova
client may thus raise a 404.

Correct. Extensions are not everywhere and so you must either query the
extensions API to find out what extensions the cloud has, or you must
404 guard.

Of course, you can't ONLY 404 guard, because the cloud may also throw
unauthorized - so querying the nova extension API is the more correct
way to deal with it.

Thanks,
Pratik Mallya
Software Developer
Rackspace, Inc.

[0]:
https://github.com/openstack/heat/commit/54c26453a0a8e8cb574858c7e1d362d0abea3822#diff-b3857cb91556a2a83f40842658589e4fR163
[1]: http://developer.openstack.org/api-ref-compute-v2-ext.html#os-interface


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 Sep 25, 2015 by Monty_Taylor (22,780 points)   2 5 8
0 votes

Guys. Thank you for the pointing to the this gap.

It probably was wrong missed before assumption about nova extension.
I was personally sure, that it this extension always is installed.
Currently we have couple resources OS::Nova::Server and AWS::EC2::Instance,
which uses this extension with wrong assumption, that extension is
presented in nova.

Pratik, I have seen bug created by you and agree, that it's bug.
We will fix this during Mitaka, also I suppose, that it should be
backported to previous releases (may need additional work, but it will be
done, I supppose).

Regards,
Sergey.

On 25 September 2015 at 23:08, Monty Taylor mordred@inaugust.com wrote:

On 09/25/2015 02:32 PM, Pratik Mallya wrote:

Hello Heat Team,

I was wondering if OpenStack Heat assumes that the Nova extensions api
would always exist in a cloud? My impression was that since these
features are extensions, they may or may not be implemented by the cloud
provider and hence Heat must not rely on it being present.

My question is prompted by this code change: [0] where it is assumed
that the os-interfaces extension [1] is implemented.

If we cannot rely on that assumption, then that code would need to be
changed with a 404 guard since that endpoint may not exist and the nova
client may thus raise a 404.

Correct. Extensions are not everywhere and so you must either query the
extensions API to find out what extensions the cloud has, or you must 404
guard.

Of course, you can't ONLY 404 guard, because the cloud may also throw
unauthorized - so querying the nova extension API is the more correct way
to deal with it.

Thanks,

Pratik Mallya
Software Developer
Rackspace, Inc.

[0]:

https://github.com/openstack/heat/commit/54c26453a0a8e8cb574858c7e1d362d0abea3822#diff-b3857cb91556a2a83f40842658589e4fR163
[1]:
http://developer.openstack.org/api-ref-compute-v2-ext.html#os-interface


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 Sep 29, 2015 by Sergey_Kraynev (3,400 points)   3 6
...