27 Commits

Author SHA1 Message Date
Sofer Athlan-Guyot
06afcee786 FFU: repo section string manipulation error.
A nit was introduced during the refactor of the repo selection.  This
should fix it.

Closes-Bug: #1750643

Change-Id: If8a0feed236d7f4d7eaf679c93461816efd7b628
2018-02-21 16:21:42 +00:00
Sofer Athlan-Guyot
19029070c5 Simplify FastForwardRepoArgs structure used in FFU repo selection.
The current structure is unnecessarily complex forcing the use of
json_query filter with a parameter.  The quoting inside that line
become hard to read and is currently failing.

We change the structure to a simple hash, as this is currently all
what is needed.

Change-Id: I17f2d1b4e549e275d7d6a675cd522c6b567815ac
Closes-Bug: #1749911
2018-02-19 08:56:45 +00:00
Sofer Athlan-Guyot
d20264c8ba Do not depends on the order of the hash vars in ffu repo switching.
As vars in defined as an hash and we can't depends on the ordering
here.

Change-Id: I93fb1811aff6a5c0e5f984f8562a6cdd207f1b5c
Related-Bug: #1749338
2018-02-14 15:35:07 +01:00
marios
7cf9a76b76 ffu: tripleo-packages repo management
This change introduces some basic repo management for fast-forward
upgrades using the tripleo-repos tool as the default implementation.

The following parameters have been added to the template to allow for
additional implementations to be added.

FastForwardRepoType - Currently defaults to tripleo-repos
FastForwardRepoArgs - Currently defaults to tripleo-repos args for O and P

bp fast-forward-upgrades
Change-Id: I92f6f5015f34e6c5e8ef131f303d9c8144d1c83e
2018-02-09 17:13:31 +01:00
Lukas Bezdicka
0cb5c847f3 Always evaluate step first in conditional
If we use variables defined in later step in conditional before
checking which step are we on we will fail.

Resolves: rhbz#1535457
Closes-Bug: #1743764
Change-Id: Ic21f6eb5c4101f230fa894cd0829a11e2f0ef39b
2018-02-09 17:12:29 +01:00
marios
dec003def8 Convert tags to when statements for Q major upgrade workflow
This converts "tags: stepN" to "when: step|int == N" for the direct
execution as an ansible playbook, with a loop variable 'step'.
The tasks all include the explicit cast |int.

This also adds a set_fact task for handling of the package removal
with the UpgradeRemovePackages parameter (no change to the interface)

The yaml-validate also now checks for duplicate 'when:' statements

Q upgrade spec @ Ibde21e6efae3a7d311bee526d63c5692c4e27b28
Related Blueprint: major-upgrade-workflow
[0]: 394a92f761/tripleo_common/utils/config.py (L141)
Change-Id: I6adc5619a28099f4e241351b63377f1e96933810
2018-01-08 13:57:47 +02:00
Zuul
b37b75790e Merge "Ensure os-net-config conditional for upgrade doesn’t fail." 2017-11-27 15:25:08 +00:00
Zuul
107b610923 Merge "Change template names to queens" 2017-11-24 16:21:27 +00:00
Sofer Athlan-Guyot
aa8bf4b058 Ensure os-net-config conditional for upgrade doesn’t fail.
When using grep the check will fail if no upgrade is available.  This
has the side effect of not registering the variable and the check
later on will fail as “.stdout” property is not defined.

Using awk doesn’t have this side effect and will return empty stdout
without error in case of error.

Change-Id: I9d9bb3b625c2f0fb5f4a2c98bd3bf903f4bec176
Closes-Bug: #1733924
2017-11-23 17:27:45 +01:00
Sofer Athlan-Guyot
fac92ba0e7 Fix wrong logic for triggering os-net-config special handling.
We want the special upgrade to be trigger when the
os_net_config_need_upgrade is true.

Change-Id: I6da13ad8bc9675ea2a80006615f4dc98355182f9
Closes-Bug: #1734135
2017-11-23 15:31:12 +00:00
Carlos Camacho
927495fe3d Change template names to queens
The new master branch should point now to queens instead of pike.

So, HOT templates should specify that they might contain features
for queens release [1]

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#queens

Change-Id: I7654d1c59db0c4508a9d7045f452612d22493004
2017-11-23 10:15:32 +01:00
Mike Bayer
0a001b6672 Correct ignore_error -> ignore_errors
In  Ic905f7ed7e7fc9018bc494f77811392045fddfe8, the
addition of logic to confirm os-net-config needs to be run relies
upon the shell command being able to fail.  This patch corrects
the Ansible directive "ignore_errors" to be properly stated.

Change-Id: Ie0efdce47dc11f05c436fbacaca6ec22cbe33ca1
Closes-Bug: #1730328
2017-11-20 13:08:17 -05:00
Sofer Athlan-Guyot
48aa4ff004 Add condition to os-net-config run during upgrade.
This add two conditionals:
 - first check that os-net-config needs upgrade
 - second verify that the configuration file exist and non empty.

This prevent unnecessary run of os-net-config and error in certain
network configuration.

Change-Id: Ic905f7ed7e7fc9018bc494f77811392045fddfe8
Closes-Bug: #1730328
2017-11-06 11:22:54 +01:00
Jenkins
42b2222704 Merge "Special treatment for os-net-config upgrade." 2017-10-09 11:49:20 +00:00
marios
a953bda0ae Adds pacemaker update_tasks for Pike minor update workflow
Adds update_tasks for the minor update workflow. These will be
collected into playbooks during an initial 'update init' heat
stack update and then invoked later by the operator as ansible
playbooks.

Current understanding/workflow:
 Step=1: stop the cluster on the updated node
 Step=2: Pull the latest image and retag the it pcmklatest
 Step=3: yum upgrade happens on the host
 Step=4: Restart the cluster on the node
 Step=5: Verification: test pacemaker services are running.

https://etherpad.openstack.org/p/tripleo-pike-updates-upgrades

Related-Bug: 1715557
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Co-Authored-By: Sofer Athlan-Guyot <sathlang@redhat.com>
Change-Id: I101e0f5d221045fbf94fb9dc11a2f30706843806
2017-10-05 14:35:26 +00:00
Sofer Athlan-Guyot
5aab25bb68 Special treatment for os-net-config upgrade.
We make sure to run upgrade and run os-net-config on its own.  Running
os-net-config with the no-activate option will
 - prevent the restart of the interface
 - adjust the network files to the expected configuration so that next
 run won't restart the network.

Eventually at next reboot the change will be taken into account.
Currently we have no change that are required to be taken live during
the upgrade so it safe to ignore the new parameters.

Closes-Bug: #1721073
Change-Id: I51464274d5dff8a267992ae303ac3517b78d08fb
2017-10-03 18:16:47 +02:00
Steven Hardy
1801565a75 Add support for update_tasks
These work the same way as upgrade_tasks *but* they use a step variable
instead of tags, so we can iterate over a count/sequence which isn't
possibly via a wrapper playbook with tags (we may want to align upgrade
tasks with the same approach if this works out well).

Note the tasks can be run via ansible-playbook on the undercloud, like:

openstack overcloud config download --config-dir tmpconfig
cd tmpconfig/tripleo-HCrDA6-config
ansible-playbook -b -i /usr/bin/tripleo-ansible-inventory update_steps_playbook.yaml --limit controller

The above will do a rolling update for the Controller role (note the inconsistent
capitalization, we probably need to fix the group naming in tripleo-ansible-inventory)
because we specify serial: 1 in the playbook.

You can also trigger an update explicitly on one node like this, which is useful for debugging:

ansible-playbook -vvv -b -i /usr/bin/tripleo-ansible-inventory update_steps_playbook.yaml --limit overcloud-controller-0

Change-Id: I20bb3e26ab9d9cadf1a31fd304de8a014a901aa9
2017-08-12 10:40:48 +00:00
Ben Nemec
8fb3da3c60 Make EnablePackageInstall and Debug descriptions consistent
Change-Id: I3ea7c0c7ea049043668e68c6e637fd2aaf992622
Partial-Bug: 1700664
2017-07-21 18:38:58 +00:00
Giulio Fidente
baf6eee501 Adds network/cidr mapping into a new service property
Makes it possible to resolve network subnets within a service
template; the data is transported into a new property ServiceData
wired into every service which hopefully is generic enough to
be extended in the future and transport more data.

Data can be consumed in service templates to set config values
which need to know what is the subnet where a deamon operates (for
example the Ceph Public vs Cluster network).

Change-Id: I28e21c46f1ef609517175f7e7ee19e28d1c0cba2
2017-07-14 13:44:04 +02:00
Carlos Camacho
0a0e2ee629 Update the template_version alias for all the templates to pike.
Master is now the development branch for pike
changing the release alias name.

Change-Id: I938e4a983e361aefcaa0bd9a4226c296c5823127
2017-05-19 09:58:07 +02:00
Saravanan KR
a096ddab34 Add role specific information to the service template
When a service is enabled on multiple roles, the parameters for the
service will be global. This change enables an option to provide
role specific parameter to services and other templates.

Two new parameters - RoleName and RoleParameters, are added to the
service template. RoleName provides the role name of on which the
current instance of the service is being applied on. RoleParameters
provides the list of parameters which are configured specific to the
role in the environment file, like below:

  parameters_default:
      # Default value for applied to all roles
      NovaReservedHostMemory: 2048
      ComputeDpdkParameters:
          # Applied only to ComputeDpdk role
          NovaReservedHostMemory: 4096

In above sample, the cluster contains 2 roles - Compute, ComputeDpdk.
The values of ComputeDpdkParameters will be passed on to the templates
as RoleParameters while creating the stack for ComputeDpdk role. The
parameter which supports role specific configuration, should find the
parameter first in in the RoleParameters list, if not found, then the
default (for all roles) should be used.
Implements: blueprint tripleo-derive-parameters

Change-Id: I72376a803ec6b2ed93903cc0c95a6ffce718b6dc
2017-05-15 10:06:46 +05:30
marios
7ac5ef5f85 Adds a step0 for pre upgrade-init checks
Adds a step0 for any pre-upgrade checks. This migrates
some of the checks we have at the top of
extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh

Checks for other services (and for the cluster) will follow
in separate commits.

Partially-Implements: blueprint overcloud-upgrades-per-service
Change-Id: I607f1fed68d7f11773484c3d7cb3e5af67465d57
2017-01-13 12:34:57 +00:00
Steven Hardy
3c6ec654b4 Bump template version for all templates to "ocata"
Heat now supports release name aliases, so we can replace
the inconsistent mix of date related versions with one consistent
version that aligns with the supported version of heat for this
t-h-t branch.

This should also help new users who sometimes copy/paste old templates
and discover intrinsic functions in the t-h-t docs don't work because
their template version is too old.

Change-Id: Ib415e7290fea27447460baa280291492df197e54
2016-12-23 11:43:39 +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
Dan Prince
3b62761d2f Add DefaultPasswords to composable services
This patch adds a new DefaultPasswords parameter to
composable services. This is needed to help provide
access to top level password resources that overcloud.yaml
currently manages (passwords for Rabbit, Mysql, etc.).

Moving the RandomString resources into composable services
would cause them to regenerate within the stack. With this
approach we can leave them where they are while we deprecate
the top level mechanism and move the code that uses the
passwords into the composable services.

Change-Id: I4f21603c58a169a093962594e860933306879e3f
2016-08-18 12:45:30 -04:00
Giulio Fidente
885b37c80e Pass ServiceNetMap to services
This will be needed to pick the network where the service has
to bind to from within the service template.

Change-Id: I52652e1ad8c7b360efd2c7af199e35932aaaea8c
2016-08-18 12:36:18 -04:00
Dan Prince
0df577c6f0 Add tripleo-packages composable service
This creates a new service to help manage the puppet-tripleo
class that enables and disables package installation features.

NOTE: we can't move the upgrade setting into the new composable
service yet due to coupling with the UpgradeDeployment resources.

Change-Id: If35cf6a6f023e12ae8ebbc2d9929d244eb3ffa3a
2016-08-17 08:25:37 -04:00