Commit Graph

13 Commits (2f9215b2535a976e1d1568650aa78be3fe8b5606)

Author SHA1 Message Date
Rabi Mishra becee11a5a Use ansible playbook for plan deploy
Depends-On: https://review.opendev.org/713641
Depends-On: https://review.opendev.org/714280
Change-Id: I9b9488672293558747c6dc41eb6d41c18bdc9e05
2020-03-22 10:07:39 +05:30
Kevin Carter dc9ae1ac5b Remove mistral from the config_download deploy workflow
This change removes all of mistral from the config_download_deploy function
by calling the required functions directly.

- All of the inputs within this function have been cleaned up and documented.
- New log entires will be created when using this method giving the deployer
  a better overall user experience.
- To ensure we're able to support the ability to reproduce commands, the ssh
  args extravar has been moved to an environment variable.
- The methods get_config and get_key have been moved to the utils module.
  This was done to help avoid circular imports.

Update methods have been changed to execute without running within a mistral
workflow. This was changed because there's no need to support the multiple
code paths anymore given config_download is now running directly.

Test classes have been updated to reduce duplication.

With the new streamlined execution process we should see improved deployment
times and better visability into the deployment process.

Task: 38422
Story: 2007212

Depends-On: I006291a2465aa4c950abce76f9e5f9459b76e330
Change-Id: Ide1a4503dd2bdd2d5e494cd1eac483b842a21acf
Co-authored-by: Luke Short <ekultails@gmail.com>
Co-authored-by: Dougal Matthews <dougal@dougalmatthews.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-14 23:40:16 +00:00
Kevin Carter 4866ab8fde Convert deployment to use new ssh-admin playbook
This change converts the deployment process to use the new enable ssh admin
playbook instead of the shell commands and a mistral workflow.

Tests have been updated to reflect the use of the new methods.

Story: 2007212
Task: 38427
Depends-On: https://review.opendev.org/#/c/706196/
Depends-On: I5ab7f4d9dc39a74714c9bcfa39fa50cc586e8e08
Change-Id: I5c744e116f00e81f92c014fc1f599ad3db11ada2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-06 18:16:57 +00:00
Zuul b6bcdefbdc Merge "Handle config-download in progress in tripleoclient" 2019-12-21 02:42:59 +00:00
Kevin Carter bcc9c66747
Replace ansible shell with python runner
This change replaces all of the ansible shell commands with the
python library, ansible-runner. This library is supported by
upstream ansible, is approved by the openstack foundation, is
supported in global requirements, and provides a better, more
programatic interface into running ansible playbooks.

All tests that interacted with the old shell commands have been
updated to now test using the library.

Change-Id: I8db50da826e2fbc074f4e7986d6fd00f6d488648
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-12-17 07:35:35 -06:00
James Slagle 72f5762e45 Handle config-download in progress in tripleoclient
This patch adds handling and checking of any instances of the workflow
tripleo.deployment.v1.config_download_deploy already in progress for the
current stack. It will prevent duplicate instances of the same workflow
being started and running at the same time.

It will allow for multiple instances of the workflow running at the same
time as long as they are for different stacks.

Change-Id: Ic8dbf28b5796ff998165b6b73b941f21c65f1dfa
Closes-Bug: #1852314
2019-12-10 16:23:11 -05:00
Sergii Golovatiuk b40c9e3b1c Suppress output for ssh-keygen
ssh-keygen has private key which shouldn't be visible in output. This
patch change the behaviour to print only exit code on failure. Also this
patch closes file descriptor once key is read.

Change-Id: I5a286cca6e48b0abc9cec3f15b2648977ae838c2
Related-Bug: rhbz#1734356
2019-08-14 15:11:37 +02:00
Alex Schultz 6e13179ecd Additional resource cleanup
These resources were previously not properly closed when leading to
ResourceWarnings being printed to the end user.

Change-Id: I27e3f209f948b4c7c04e7994fc4dc7489f28f720
Related-Bug: #1837393
2019-08-02 12:34:42 -06:00
James Slagle 7cef36bc9b Honor blacklist during temp key injection
The server blacklist also needs to be honored when getting the list
of hosts that we use to check for the ssh port being available, and
injecting the temporary ssh key.

Change-Id: I7ea9201f39af17bb43b7a1b8a9d8d1064e365c14
Closes-Bug: #1797572
2018-10-12 12:31:43 -04:00
James Slagle 23f19693a5 Pass stack name to enable_ssh_admin workflow
Pass the stack/plan name to the enable_ssh_admin workflow, otherwise,
only the default 'overcloud' name works.

Depends-On: Ie5dbe86232c3b6a85665a9eec08ace8ba9415ea1
Change-Id: I76531c5fb36135cfd733ddb6980bf43d0295db30
Closes-Bug: #1795417
2018-10-02 13:38:38 -04:00
James Slagle d910d4a7a1 Handle workflow error for enable_ssh_admin
workflow states can be FAILED or ERROR, we need to handle both.

Change-Id: Ieeeb88dbc10900aadba9c14200e0a154419ede8a
Closes-Bug: #1785621
2018-08-06 17:48:59 -04:00
James Slagle a1c01dfc7a Add --overcloud-ssh-network
In some cases, we may not want to always assume the ctlplane as the
network to use for both ssh access to the overcloud nodes, and for
generating the ansible inventory. This patches adds a new cli argument,
--overcloud-ssh-network that can be used to set the network name to be
used. Defaults to ctlplane.

Depends-On: I1e3f9a5142bff5e4f77e5e40df164089d9144652
Change-Id: I767984623c7d2402b10bae3d30b695783166f6bf
2018-05-30 14:00:32 -04:00
James Slagle 6cc67c3398 Convert enable-ssh-admin.sh to python
Instead of using the script from the templates, use python for the
enable-ssh-admin logic. This will allow for more properly handling
failures.

This also fixes a race condition where sshd has not already started on
some of the nodes before we try and connect via ssh. A timeout is added
where we wait for the port to come up. If the timeout has passed and the
port is still not up, then an exception is raised.

Change-Id: I3431d2ec724a880baf0de8f586490d145bedf870
Closes-Bug: #1769230
2018-05-14 12:54:47 -04:00