Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Herve
556325cc8c Add custom subclass to revert mapping
To be able to revert the custom mappings down by config-download, let's
add some tripleo specific subclasses which will be available in the
registry.

Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2
Related-Bug: #1758065
2018-03-27 12:33:24 +02:00
gengchc2
b133b85ec1 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I0c903ca9d566c89e4e0d6bd129dc1f7bc3e95db9
2017-03-10 01:45:40 +00:00
Jenkins
a50c024621 Merge "Ignore changes to images in nova servers" 2016-09-27 00:13:43 +00:00
Jiri Stransky
13b4e8e86e Prevent replacement of Port, Net and Subnet
There have been cases reported of Neutron resources being reallocated on
some stack-updates. (E.g. the ports which are used for VIP allocation
and feeding VIP info to overcloud config files.) This is quite similar
in the OS::Nova::Server replacement issue in the sense that TripleO
clouds currently cannot recover from this happening. While the triggers
of this behavior might have external causes due to manipulation with
templates or environment files (we haven't found any root cause in
TripleO code yet), in general this is an issue that we should probably
prevent if we can.

Closes-Bug: #1572609
Change-Id: I1bfd3b4c2bf23ddb96905ddc654b807955668922
2016-08-08 15:07:12 +02:00
Thomas Herve
eaf0051441 Ignore changes to images in nova servers
Override all changes to the image in OS::Nova::Server, so that we don't
accidently rebuild them.

Change-Id: I2ec318b9776239b166d9537e5ca10c851d1d219a
Closes-Bug: #1609020
2016-08-03 22:36:44 +02:00
Steven Hardy
0461fad1a3 Fix no-replace-server to accurately preview update
This override of OS::Nova::Server needs to reflect the fact
that it never replaces on update or the update --dry-run output
ends up being wrong.

Closes-Bug: 1561076
Change-Id: I9256872b877fbe7f91befb52995c62de006210ef
2016-03-23 16:11:11 +00:00
Steve Baker
b1dda77a9d Prevent any property change from replacing OS::Nova::Server
This change ensures that any property change in an OS::Nova::Server
resource will not result in the server being replaced. This is a more
complete approach to only protecting servers from changes to the
user_data property - upgrades testing have also shown replacement issues
with other properties such as scheduler_hints.

Change-Id: I6127ca9c3abb57c025df7d039c03bb7e64efad2c
Related-Bug: #1539541
2016-03-04 19:50:57 +13:00
Steve Baker
2fe97a4bf5 Override OS::Nova::Server for user_data updates
This change installs a plugin to /usr/lib/heat.
This plugin replaces the OS::Nova::Server type which is a subclass that
will not replace heat servers on stack-update when the user_data
property is changed.

heat-engine needs to be restarted to register the new plugin, so there
needs to be some mechanism to ensure this during an undercloud upgrade.
It might be possible to rely on puppet doing a service restart when
"openstack undercloud install" is run again during the upgrade. Testing
will reveal whether an explicity restart openstack-heat-engine is
needed.

Any undercloud heat can be tested for whether servers are replaced on
user_data changes by running:

  heat resource-type-show OS::Nova::Server | \
    jq '.properties.user_data.update_allowed'

The result will be 'true' when this change has been successfully
applied.

The intention is that this is backported to stable/liberty to allow
overclouds to be upgraded from kilo to liberty. This issue can be fixed
in heat for Mitaka but that heat change can't be backported to Liberty.

This will work as expected for existing overcloud stacks and their
OS::Nova::Server resouces - no resource will be replaced when
ServerUpdateAllowed becomes active.

Downstream packaging needs to do the same file copying as the setup.cfg
data_files entry, which is to copy the undercloud_heat_plugins directory
to /usr/lib/heat

Change-Id: Ibd2b70527977058d18c12ea71de7f302379c50aa
Closes-Bug: #1539541
2016-02-23 22:17:45 +00:00