[openstack-dev] [heat] Remove deprecation properties

Sergey Kraynev skraynev at mirantis.com
Thu Dec 25 09:52:43 UTC 2014


Hi all.

In the last time we got on review several patches, which removes old
deprecation properties [1],
and one mine [2].

The aim is to delete deprecated code and redundant tests. It looks simple,
but the main problem, which we met, is backward compatibility.
F.e. user has created resource (FIP) with old property schema, i.e. using
SUBNET_ID instead of SUBNET. On first look nothing bad will not happen,
because:
1. handle_delete use resource_id and any changes in property schema does
not affect other actions.
2. If user want to use old template, he will get adequate error message,
that this property is not presented in schema. After that he just should
switch to new property and update stack using this new property.

In the same time we have one big issues for shadow dependencies, which is
actual for neutron resources. The simplest approach will not be worked [3],
due to old properties was deleted from property_schema.

Why is it bad ?
- we will get again all bugs related with such dependencies.
- how to make sure:
    - create stack with old property (my template [4])
    - open horizon, and look on topology
    - download patch [2] and restart engine
    - reload horizon page with topology
    - as result it will be different

I have some ideas about how to solve this, but none of them is not enough
good for me:
 - getting such information from self.properties.data is bad, because we
will skip all validations mentioned in properties.__getitem__
 - renaming old key in data to new or creating copy with new key is not
correct for me, because in this case we actually change properties
(resource representation) invisibly from user.
 - as possible we may leave old deprecated property and mark it something
like (removed), which will have similar behavior such as for
implemented=False. I do not like it, because it means, that we never remove
this "support code", because wants to be compatible with old resources.
(User may be not very lazy to do simple update or something else ...)
- last way, which I have not tried yet, is using _stored_properties_data
for extraction necessary information.

So now I have the questions:
Should we support such case with backward compatibility?
If yes, how will be better to do it for us and user?
May be we should create some strategy for removing  deprecated properties ?

[1]
https://review.openstack.org/#/q/status:open+project:openstack/heat+branch:master+topic:rm-depr-props,n,z
[2]  https://review.openstack.org/#/c/139990/7
[3]
https://review.openstack.org/#/c/139990/7/heat/engine/resources/neutron/floatingip.py
[4] http://paste.openstack.org/show/154591/

Regards,
Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141225/caa599b2/attachment.html>


More information about the OpenStack-dev mailing list