Commit Graph

102 Commits

Author SHA1 Message Date
chengebj5238 f67e6b376e Correct spelling mistakes
Change-Id: I4a87c3cc9562437ff7548bb523b9f94684bed05b
2021-03-01 08:16:33 +00:00
Dmitriy Rabotyagov b88a8fbb16 Fix linters
Change-Id: Ide46cd2379d6ba32c844a9779ecfd32faead7b35
2020-10-01 13:44:46 +03:00
melissaml 87cbdd6649 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I790c1876a3e44da8623c74632332f0e453dce1f6
2019-07-09 16:36:22 +00:00
Antony Messerli 79cbbd23d7 Skip neutron rebalance if ha-tool is disabled
If neutron_legacy_ha_tool_enabled is disabled, it will
skip the step as the tool is probably not present.

Change-Id: I4ef054feeacb380e1c8d1f7b243ffe37ef6d5183
2019-05-10 09:48:36 -05:00
Antony Messerli 6c101e313c Better handling for resuming leapfrog upgrade
Copies the openstack-release file to another location
so that the original version being upgraded can be referenced
in the event of a failure where openstack-setup-hosts has
replaced the openstack-release file.  That way the list
of versions to upgrade is correct upon re-running the
leapfrog upgrade script.

Change-Id: I63de16bf27813dd623e996a5ac5de7bb8f8668b6
2018-12-12 17:14:12 -06:00
Antony Messerli 2ec3466ad8 Allow the option to specify OSA git repo URL
Given the leapfrog branches are all EOL and frozen, an operator
may need to make changes to branches on a local repo in order to combat
bit rot over time.

Change-Id: Ia8214a273b38418808b063b0192bbf81bf455daf
2018-11-28 10:35:56 -06:00
Zuul b23eab6305 Merge "Remove anti-bind mount config" 2018-08-15 20:04:02 +00:00
Kevin Carter 9e13b7c620
Remove anti-bind mount config
The config `default_bind_mount_logs` was being set in the leap tooling
which results in all containers not having a log bind mount. This change
removes the task that sets the offending config.

Change-Id: Ib85e77ed1f993bad44f1cb36ed11056f8a83dfc5
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-15 13:09:53 -05:00
Antony Messerli aa26271ee5 Allow for Swift Leap Upgrade to be skipped
An operator might want to ensure Swift is available during
an upgrade and manually upgrade Swift on completion of the
maintenance.

The operator would need to set these vars before operation:

   export SKIP_SWIFT_UPGRADE=yes
   export CONTAINERS_TO_DESTROY=add_!swift_all_exclusion

This would prevent the swift containers from being torn
down during the upgrade and would skip all Swift upgrade
operations.

Change-Id: Ibf40499750751dd9f41e447b7b90bb77f592cc14
2018-08-15 10:58:48 -05:00
Zuul ce54ff8bee Merge "Remove hardening from leap upgrades" 2018-08-09 18:48:21 +00:00
Antony Messerli 852e0329a7 Remove hardening from leap upgrades
In order to reduce time to run and avoid complexities
from older environments that may have specific
requirements or devations from recommended practices,
disable the hardening play during the leap upgrades.

If security-hardening is desired, the recommendation for operators
is to run hardening after the upgrade has completed.

Change-Id: I85865a39e84e65ac211c1077f484bf008673c840
2018-08-06 15:07:14 -05:00
Antony Messerli 368b9c0137 Remove destroy reminent grouped containers
This was a provider specific command which can be
removed as it could remove unintended containers.

Change-Id: I179565f84fd8176cbcb79eacc8e63e0fef554223
2018-08-06 14:54:59 -05:00
zhulingjie 08bd475017 Remove the unnecessary space
Change-Id: I95567f20ea5257f27f5b4e8fbde4da41cb186efa
2018-07-11 23:17:55 -04:00
Jean-Philippe Evrard d7f8076294 Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: I897b918785c34523688c450bec16661f0f6e496e
2018-07-12 17:05:08 +02:00
Antony Messerli e5d39f460e Use setuptools==33.1.1 in leap upgrade-requirements.txt
Avoids using setuptools 34.x as using it can hit this bug
when packages are being upgraded:

https://github.com/pypa/setuptools/issues/951

Pinning to setuptools==33.1.1 also aligns to the
global-requirement-pins.txt in newton-eol

Change-Id: Ib33b828751c5a36d61448d148c5941beb6827c73
2018-07-06 09:25:05 -05:00
zhulingjie 4f734efd16 Remove the duplicated word
Change-Id: Ib213eb887df7d914271d3a60c6a9d8a37a830302
2018-06-12 12:24:10 -04:00
Zuul 9b3a190581 Merge "Update Newton release to newton-eol in leap-upgrades" 2018-06-20 15:12:02 +00:00
Antony Messerli 027ee66b28 Update Newton release to newton-eol in leap-upgrades
Bumps NEWTON_RELEASE to newton-eol tag

Change-Id: I38639f678ec54627f908abb88e0297ad53560ecd
2018-06-19 19:10:59 -05:00
Antony Messerli 851d22e4d5 Adds support for leaping from Mitaka
Adds a few tweaks to get Mitaka to function as a
leapfrog source.

- Adds Mitaka as option
- Adjusts detection to include eol branches
- Creates file if user_variables.yml doesn't exist
- Checks if osa_secrets_file_name exists

Change-Id: Id0bce1441456bc545deca67710004b750901e81b
2018-06-14 14:05:48 -05:00
Antony Messerli 788418634d Ability to skip security hardening tags in leap
Add the ability to skip certain hardening tags during the leap
process if required.

Change-Id: If30c27d370e0bdf18bf71a4df895e89a40efbca7
2018-02-05 16:55:10 -06:00
Zuul 052bdbf672 Merge "On failure return output of all tasks to be reran" 2018-01-24 05:34:26 +00:00
Zuul 8da0aa287d Merge "Add insecure flag for post upgrade CLI commands" 2018-01-24 05:34:26 +00:00
Bjoern Teipel 80db361d31 Add insecure flag for post upgrade CLI commands
In situations where self signed certs are utilized for the API,
the addition of the insecure is necessary to make post-redeploy-cleanup
work.

Change-Id: Ie5d5b6248feba5c4479567d22e74c76065725fda
2018-01-23 10:33:12 -06:00
Antony Messerli f5e74f065f Remove BOOTSTRAP_ANSIBLE_FOLDER variable
Removes the BOOTSTRAP_ANSIBLE_FOLDER variable because
the assumption was made that Ansible would always be
bootstrapped from /opt/openstack-ansible and setting
this would cause a noop when Ansible was bootstrapped.

Change-Id: I284ad62b6f14cc334ae949946e839a1e8ec6a1d8
2018-01-22 17:42:15 -06:00
Antony Messerli c8107e781b On failure return output of all tasks to be reran
Appears that the last task in the list was being
stripped off of the output.

Change-Id: Ifade924961855ac22452e80149916027af068b06
2018-01-22 13:39:39 -06:00
Frank-ZhangXin 1416812e12 RLM-322 Fix domain name
Current leapupgrade would accidentally add extra period sign
between hostnames, this fix would remove the hardcoded sign.

Change-Id: I7705da00ec651909f9bef9d4be96478dff22b993
2018-01-15 13:11:46 -06:00
Kevin Carter e24ef8d57c
Stop building a newton venv for LEAP upgrades
Because "newton" is the last release LEAP upgrades are compatible with
there's no need to build a migration venv for newton. All of the newton
specific migrations will be run during the redeployment phase so this
venv has no specific purpose and is simply prolonging an already long
maintenance.

Change-Id: I06f23ed3bfdca5f1d5d56cb9fabd53cab01b83b6
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-01-03 14:46:45 -06:00
Zuul f907d7aa74 Merge "Add reserved IP of old neutron_agent container" 2017-12-17 00:30:15 +00:00
Antony Messerli e67f805f35 Link the current deployed release on a leapfrog
Existing code assumes starting point of KILO_RELEASE.
This change allows other releases to be the starting
point before the migrations occur.

Change-Id: Idb7d2981b37e653c9e92a9e41e4bf54b17aef1f5
2017-12-14 14:36:32 -06:00
Marc Gariepy 074a2e9530 Add reserved IP of old neutron_agent container
this should prevent the system to allocate those IP to the new neutron_agent containers.

Change-Id: Idc5207a933d1dd865ec2d480dfe368f9f5a7d3dd
2017-12-05 10:31:23 -05:00
Zuul 2566ca8a9a Merge "cinder is_metal is undefined" 2017-12-01 16:52:33 +00:00
Marc Gariepy ce9d791291 cinder is_metal is undefined
Check if is_metal is defined, also renaming the tasks name to reduce stress.

Change-Id: Ifcd5b4d1a99ca61cbe508d4980d063a6a9adff1a
2017-12-01 10:59:01 -05:00
Marc Gariepy c753f86d17 Ignore comments in openstack_user_config
Ignore comments in the config file to get the right host.

Change-Id: I68b444a4fe1f180c9146b6b1df743de072615861
2017-12-01 09:23:23 -05:00
Marc Gariepy 2ccc760da8 Validate the target directory exists before linking.
If you run the script manually and export the target release to another tag, it
might generate a broken link, this ensure the target exists.

Change-Id: Ia18bd7796f5f48c42ad9c23e917ddb37aa8103b3
2017-11-29 14:06:22 +00:00
Zuul b4f3e676f7 Merge "Specify containers to destroy" 2017-11-14 20:25:37 +00:00
Antony Messerli 4538a7e083 Specify containers to destroy
Allows the operator to specify the containers to destroy
or exclude.

Change-Id: If1b72fd8bdf790184579130aa4b44221b339a41f
2017-11-13 19:04:42 -06:00
Antony Messerli 71fd2f6b7f Prevent deploying old code once leaped
Previously the operator could choose to leap from old
code once the code to leap to had been deployed. This
would cause things to break as it would attempt to
run the older version code on top of the newly deployed
leaped code.

This identifies those conditions, alerts the operator
and calls the resume_incompete_leap instead of asking
the operator to input the release to upgrade from
again.

Change-Id: I928bf7e6db88d46617af800692e9b76a6bcc1ba8
2017-11-03 11:42:47 -05:00
Kevin Carter 676d574623
Run security hardening when leaping a deployment
The security hardening playbook was not being executed. This change adds
the security hardning playbook to the defeault re-deployment process. If
a deployer wishes to opt-out of the default security hardening they can
disable it using the `apply_security_hardening` option.

Change-Id: I69baa1d2cb209cf3686ca2da00e698ed5dbf92f9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-10-25 10:47:48 -05:00
Zuul 0690bb6085 Merge "Clean out old mariadb apt sources" 2017-10-20 15:26:04 +00:00
Antony Messerli 027c91704c Clean out old mariadb apt sources
Cleans out old mariadb apt sources before
running redeploy to prevent issues during
leap frog with galera client.

Change-Id: Iba91de800d4f1ec66a062e2213344e61c392407b
2017-10-19 22:20:28 -05:00
Frank-ZhangXin 0176aa4624 Exclude elasticsearch from container-destroy task
The goal is to keep elasticsearch logs from leap upgrade from Kilo,
Liberty and Mitaka to Newton.

Change-Id: I14840c16266dcfe2ed0aa0b89078adae441c8569
2017-10-18 15:09:43 -05:00
Kevin Carter e7ea3b56c6 Add option to set FROM code and fix logic bug
The leap tooling was attempting to run `set_upgrade_vars` at point where
specific upgrade variables were already needed. Within this change that
function call is moved up a few lines so that it has the chance to set
the required values. Additionally the option to pre-define the variable
CODE_UPGRADE_FROM has been added giving the deployer the option to set
this variable before a leap upgrade is run.

Change-Id: I2c780eb46dd57e680fc8681824de2fe913824fd9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-10-11 14:15:56 +00:00
Antony Messerli e2592e4d06 Allow for Leapfrogs from other Releases
Leapfrogs currently only work with Juno/Kilo
releases as certain parts are hard coded.

This patch adds support for handling
multiple releases and attempts to remove some
duplicate code with loops.

Also adds a UPGRADES_TO_TODOLIST variable check on
migration.sh and upgrade.sh to ensure the list of
releases to be ugpraded to are set if the commands
are ran individually.

Change-Id: Ia56f073863533d4b6fa58b78b59b5086c7f9a331
2017-09-27 14:11:42 -05:00
Jenkins 8a9d9ed96a Merge "Echo warning to export TODOLIST var." 2017-09-22 10:19:59 +00:00
Antony Messerli 16e5db982c Adjust logic to allow for redeploy retry on failure
Previously if a redeploy failed during the process, if
you attempted to start it over, it would reprompt for the
version you were attempting to upgrade.  At this point in
process, you are already on the latest version of the code,
so putting the original code version would actually break
the leap.  This attempts to detect if a redeploy started
but didn't complete and asks the user if they would like
to reattempt the redeploy.

Change-Id: I7c2f734edc4ec3186be3d24a60ee41b43269d07b
2017-09-15 10:13:34 -05:00
Marc Gariepy 100b38128a Echo warning to export TODOLIST var.
In case the scripts are run independently and not via run-stages.sh
some vars are not set for script execution and the deployer need to
export a new env var.

Change-Id: I4f24478d92563f5c00fefce269120f1b908aedcd
2017-09-14 13:39:44 -04:00
Kevin Carter c19a606d58 Save the rsyslog containers
These containers store logs within them and it would be bad to lose
these logs.

Change-Id: I0b3b114dce89c6e55d54efb351788e0cfe85c3b4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-09-06 16:38:31 -05:00
Jean-Philippe Evrard 50f3fd6df7 Ensure the user_secrets file is updated
We shouldn't allow any arbitrary secret file to be updated in the
leap process, but instead ensuring the file present in
J/K/L will be properly updated to the end of the process.

If you had set the variable in those playbooks, you would
naturally CREATE a new file, alongside the existing user_secrets,
with the risks of:

- Having different values
- Having precedence issues depending on the file name

Change-Id: I2873318e2f1fd34673e95f8eb77a0001d649df1e
2017-08-31 09:27:55 +00:00
Jean-Philippe Evrard b77287b87f redeploy should be done in the proper folder
run_ansible wrapper should work in the latest checkout of OA,
which should be in a REDEPLOY folder instead of just
a static "/opt/openstack-ansible"

Change-Id: I4d20fd7480f2f38e55d3f081c0c0f11726458583
2017-08-30 13:59:30 +00:00
Jenkins 3d85e5a5fd Merge "Correct leap hook closing brackets" 2017-08-30 13:41:40 +00:00