13 Commits

Author SHA1 Message Date
Sofer Athlan-Guyot
4cbac12082 Remove hiera hook transition from the upgradeinitcommand.
This is only valid for Netwon to Ocata upgrade.

Change-Id: I57dba7e004455b260d4c862bd6399d8f2848bcd8
2017-11-28 11:53:56 +00:00
Marius Cornea
0c1ac1d752 Update ansible before the ansible upgrade tasks
In case an ansible update is available during the upgrade then
the ansible package gets updated to a new version by the ansible
tasks. This could potentially lead to issues as the one described
in LP#1729546. This change updates the ansible package via yum
before starting the ansible upgrade tasks in order to avoid having
ansible updating itself.

Related-bug: 1729546

Change-Id: I2ea0aa1f670053578996018663c9fa52dec14b77
2017-11-07 09:32:39 +01:00
marios
ce0ef2fa20 Remove package if service stopped and disabled
Adds a UpgradeRemoveUnusedPackages param to use
in the ansible when conditional for the removal

Adds package removal to step2 right after a service
is stopped and disabled on step2. Package updates
happen in step3 so ideally remove before that.

The package removal task has ignore_errors true
so dependencies or other issue removing packages will
not fail the upgrade workflow.

Also adds this to the upgrade environment files
for visibility and defaulting false

Change-Id: Ie4e4a2d41f7752c5a13507a7c15c6f68e203cfca
Related-Bug: 1701501
2017-10-05 11:50:58 +00:00
Oliver Walsh
17fd16b9f2 Support for Ocata-Pike live-migration over ssh
In Ocata all live-migration over ssh is performed on the default ssh port (22).
In Pike the containerized live-migration over ssh is on port 2022 as the
docker host's sshd is using port 22.

To allow live migration during upgrade we need to temporarily pin the Pike
computes to port 22 and in the final converge we can switch over to port 2022.

This also changes the default port to 2022 for baremetal computes in Pike to
enable live-migration between baremetal and containerized computes.

Change-Id: Icb9bfdd9a99dc1dce28eb95c50a9a36bffa621b1
Depends-On: I0b80b81711f683be539939e7d084365ff63546d3
Closes-Bug: 1714171
2017-09-07 12:20:34 +01:00
Jose Luis Franco Arza
0c2c44072e Consolidate deployment in major-upgrade-composable-steps
After 483293 commit is merged, major-upgrade-composable-steps.yaml file
is pointing to the wrong location deployment, which is now under
common/ folder.

Change-Id: Ic6784533d1c21b5b8fcb422bccd820af72e499d9
2017-08-14 11:49:00 +02:00
Steven Hardy
a7b5689679 Add StackUpdateType to set hiera on upgrade
This will enable those consuming the stack_update_type hieradata
set by this parameter to differentiate an update from a major upgrade

Change-Id: I38469f4b7d04165ea5371aeb0cbd2e9349d70c79
2017-05-04 13:00:44 +00:00
Steve Baker
b1c95b6de1 Do not install openstack-heat-agents
Installing openstack-heat-agents is unnecessary since it has the same
effect as installing python-heat-agent-* which happens on the next
line.

Installing openstack-heat-agents is causing issues when mixing ocata
and master repos, since there hasn't been a release on master since
ocata was branched.

Change-Id: I1a75e16810b6a89cf1dd9ff4f4b3b5dccfc0466e
Closes-Bug: #1677278
2017-03-30 11:23:01 +13:00
Steven Hardy
947a7148e8 Only set EnableConfigPurge on major upgrades
Bug #1611800 fixed an upgrade issue by enabling purging configs for
some services, but this causes issues such as longer updates and
restarting services in the minor update case, so only do this for
major upgrades, and default to false.

Related-Bug: #1611800
Closes-Bug: #1674858
Change-Id: Iff7d715f6730c5633f1146008504b4309ef3133d
2017-03-22 09:20:37 +00:00
Marius Cornea
96618f85e6 Install openstack-heat-agents on upgrade
This package wasn't installed in the Newton image and we need to
install it during upgrade to be able to skip preupgrade validations.

Change-Id: If6ee7a3801756ac445ae35534803eab175ad8e40
Closes-Bug: 1667967
2017-02-25 21:02:01 +01:00
marios
01a91d3719 Add Newton to Ocata UpgradeInitCommonCommand
This adds the UpgradeInitCommonCommand for newton..ocata common
UpgradeInit commands. This comes before the ansible upgrade steps
so we need to do things like remove the old newton hieradata and
install the ansible-pacemaker module and ansible heat-agent plugin

This defaults to '' and is set in the major-upgrade-composable-steps
and unset in the major-upgrade-converge environment files.

Change-Id: I0c7a32194c0069b63a501a913c17907b47c9cc16
2017-02-16 10:50:12 +00:00
Steven Hardy
5353f1c7c9 Add nova service support for composable upgrades
Co-Authored-By: Mathieu Bultel <mbultel@redhat.com>
Co-Authored-By: Oliver Walsh <owalsh@redhat.com>

Change-Id: Iafad800a6819d7e75fdaab60d328999d3d3c037f
Partially-Implements: blueprint overcloud-upgrades-per-service
Related-Bug: #1662344
2017-02-14 23:23:33 +00:00
Steven Hardy
87af02d673 Disable puppet on upgrade for roles not upgrading
Where the role has disabled upgrades, we need to skip both the ansible and
puppet steps.  To do this we refactor the post.j2.yaml so that it can be
included in the upgrade template with an adjusted list of roles.

Note this requires https://review.openstack.org/#/c/425220/ - this
change will be required for local testing of this patch
(run mistral-db-mange populate after updating tripleo-common
and restart the mistral services, or update your repos and re-run
openstack undercloud install).

Partially-Implements: blueprint overcloud-upgrades-per-service
Change-Id: Ie7d0fa6fef3528bd93e6cde076b964ea8de3185a
2017-02-03 11:43:47 +00:00
Steven Hardy
dbece39f54 Initial support for composable upgrades with Heat+Ansible
This shows how we could wire in the upgrade steps using Ansible
as was previously proposed e.g in https://review.openstack.org/#/c/321416/
but it's more closely integrated with the new composable services
architecture.

It's also very similar to the approach taken by SpinalStack where
ansible snippets per-service were combined then run in a series of
steps using Ansible tags.

This patch just enables upgrade of keystone - we'll add support for
other patches in subsequent patches.

Partially-Implements: blueprint overcloud-upgrades-per-service
Change-Id: I39f5426cb9da0b40bec4a7a3a4a353f69319bdf9
2016-12-01 13:40:50 +00:00