2018 Commits

Author SHA1 Message Date
Thomas Herve
5935afe40c Catch websocket connection close errors in cleanup
This can add useless noise when we have timeouts in particular.

Change-Id: I55d18885f06e530ff9a5492c0b98f37525e88ed6
Closes-Bug: #1805647
2018-11-28 18:19:52 +01:00
Zuul
2a2fe4f58c Merge "Run online data migrations during undercloud/standalone upgrades" 2018-11-23 12:28:27 +00:00
Alex Schultz
eb31beb7f7 Add version to python execution
We invoke python to parse the templates in the tripleo deployment
command so we need to make sure that runs as either python2 or python3
since the python command may not be available.

Change-Id: I242fdd717d9e52de0b122d50cf7d6a9ad7f0e041
Related-Blueprint: python3-support
2018-11-20 17:08:40 -07:00
Jiri Stransky
bd565f734c Run online data migrations during undercloud/standalone upgrades
After we switched from instack-undercloud to t-h-t-based undercloud
installer, we dropped online data migrations. Bring them back.

Change-Id: I31b7281728b75c968701b97234db835c1b8f298f
Closes-Bug: #1804275
2018-11-20 18:13:50 +01:00
Zuul
09c8b52a40 Merge "Don't print None on plan delete" 2018-11-20 13:47:36 +00:00
Zuul
72526fe4d0 Merge "Extend DeployedServerPortMap to include network props" 2018-11-20 13:45:20 +00:00
Zuul
0aa5c0af1d Merge "Add docker bridge ip option to the undercloud.conf" 2018-11-20 13:45:19 +00:00
Zuul
e7a8ca63af Merge "Mock configuration load in unit tests" 2018-11-18 00:34:05 +00:00
Zuul
88cf1d3953 Merge "Allow ansible python interpreter be configurable" 2018-11-16 00:10:05 +00:00
Zuul
2e4fd3db8c Merge "Use full cidr for DeployedServerPortMap" 2018-11-15 23:00:27 +00:00
Zuul
b8dd7066c1 Merge "Use corrent ansible-playbook cmd for py3" 2018-11-15 04:49:12 +00:00
Mathieu Bultel
a22bb05190 Add docker bridge ip option to the undercloud.conf
Add docker_bip option to the undercloud.conf in order
to easily override the value of: DockerNetworkOptions
through the undercloud.conf

Change-Id: Ibbf7c6101539bdf575c23295c1b9fa4bfc84cff7
2018-11-14 23:28:36 +01:00
Alex Schultz
ba9e16639f Mock configuration load in unit tests
Previously if you had an undercloud.conf in your home directory, the
tests would load it and use values from it as the defaults for the tests
if they were not overridden in the tests. This could lead to incorrect
failures. This change mocks the config loading out from the install and
upgrade actions for the undercloud to prevent this loading.

Change-Id: I57a12f0151bc65f26a7e880b0f1f367a7711ead9
Closes-Bug: #1803387
2018-11-14 09:01:23 -07:00
Quique Llorente
6eef81ab76 Allow ansible python interpreter be configurable
In order to be able to properly configure the python interpreter we want
to use for the ansible deployment process, we need to expose it to the
deployment process. If a user is deploying from a CentOS7 host to a
fedora28 host, we need to be able to specify that we want to use
python3. The opposite might be true for Fedora28 host to CentOS7. For
the undercloud or standalone deployment methods we use the version of
python that the openstack client is running under as our default. For
the overcloud deployment, we currently do not specify anything by
default which will fall back to the ansible default. This may need to
change as we begine to run deployments against python3 hosts in CI. But
for now this change lays the framework to be able to specify it in the
deployment commands as an option.

Depends-On: https://review.openstack.org/#/c/617793/
Depends-On: https://review.openstack.org/#/c/616203/
Change-Id: I425905110d701bb7e3079f1017a07678eca42456
Related-Blueprint: python3-support
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2018-11-14 08:14:35 -07:00
Sorin Sbarnea
cc9d7247b6 Avoid printing b'' across logged output
Converts stdout input from bytes to unicode to avoid printing lines
as b'<line>' on python3.

Address runtime warning related to deprecation of iter().

Stop using bugsize=1 as this is likely to break unicode encodings.

Usually an implementation using context managers would look much better
but due to several bugs related to only partial support of context
managers in py27 we cannot use them here.

Tested with py27 and py35-py37.

See: http://logs.openstack.org/37/616937/9/check/tripleo-ci-fedora-28-standalone/4a015f3/logs/undercloud/home/zuul/standalone_deploy.log.txt.gz#_2018-11-12_16_15_51

Change-Id: I00eaa508a6413c05c99beaca49e70c635a9116cc
Partial-Bug: #1787912
2018-11-13 16:37:07 +00:00
Quique Llorente
37ec7906d7 Use corrent ansible-playbook cmd for py3
Use ansible-playbook-3 for from tripleo client when we are at python3
environment.

Change-Id: I572d735b00bde1a0c58f352803f870d7faa74567
2018-11-13 07:57:37 +01:00
Zuul
31aef3859e Merge "Add container build job" 2018-11-12 06:32:09 +00:00
Alex Schultz
82ace31be5 Only return plans if available from the message
There appears to be a race condition in the list_deployment_plans such
that if another message is recieved before the plan results, we attempt
to return the plans payload which may not exist. This change adds a
check to ensure the payload contains plans before trying to return the
values.

Change-Id: I58da6f699fe8257e3ddb89cd3516889944c4ad92
Closes-Bug: #1802592
2018-11-09 14:18:08 -07:00
Zuul
e716376089 Merge "Undercloud: Disable persisting VIPs in /etc/hosts" 2018-11-09 13:46:37 +00:00
Zuul
5ce6c478fa Merge "Add AdditionalArchitectures when configured" 2018-11-08 07:16:22 +00:00
Alex Schultz
9a5f6d594f Add container build job
Change-Id: If7681a83ec40b48660438c1e1a85ff016d8eeaa2
Depends-On: https://review.openstack.org/#/c/614392/
2018-11-05 12:19:02 -07:00
Zuul
71b80730e8 Merge "Always run upgrades/updates as tripleo-admin" 2018-11-05 18:42:33 +00:00
Thomas Herve
0208badb4b Don't print None on plan delete
When successfully deleting a plan, we print a useless "None" on the CLI.
Let's skip it.

Change-Id: I662a538c066a842692b759494f03ae393d902897
2018-11-05 15:51:02 +01:00
Emilien Macchi
ae1f1e0008 standalone/undercloud: run post_upgrade_tasks when upgrading
This changes the upgrade workflow for the standalone and undercloud
where we now run the post_upgrade_tasks after the deployment.
So the order is upgrade_tasks, deployment steps (docker/puppet),
then post_upgrade_tasks which is the same order as the overcloud.
It will allow us to execute some specific post upgrade tasks on standalone
and undercloud, like removing Docker containers when upgrading to Podman.

Change-Id: I311bfa17a3bbe52850092d501d563d53f7095a24
2018-11-03 03:56:11 +00:00
Jiri Stransky
479a530656 Always run upgrades/updates as tripleo-admin
This change has two main parts:

* Ensure that when we ssh *via Mistral*, we always use
  tripleo-admin. `--ssh-user` argument to any update/upgrade run
  commands is now deprecated. The reason i didn't remove it completely
  is that how current upgrade commands use ssh needed some mental
  untangling, and i want us to keep an easy way back in case my
  understanding is wrong here. Deprecation seems safer than outright
  removal.

* On upgrade prepare and FFWD prepare, make sure that the
  tripleo-admin user is created and authorized.

  Note that for tripleo-admin creation and authorization, the
  `--overcloud-ssh-user` parameter is used, and that one still
  defaults to `heat-admin`, which is correct. So initially we connect
  via whatever credentials user provided (which works on Nova+Ironic
  envs unless user customized it), and from that point on we always
  use tripleo-admin, which is common for all environments regardless
  of any user customizations. This is how deployment already works
  now, and after this change upgrades will work that way too.

Change-Id: Ib1a75a0a3f3b2a3bec00d8820c3a097620fa6256
Closes-Bug: #1801066
2018-11-01 15:16:47 +01:00
Quique Llorente
dd6eafe6fe Change 'wa' mode to 'w'
If it's not possible to use 'w' and 'a' mode at the same time in
python3, they are mutually exclusive.

This review changes the mode just to truncate or create as this is just
a mark file.

Change-Id: Iefe4d79d658ce5eb3b86669d9171ef148096fb52
Story: https://tree.taiga.io/project/tripleo-ci-board/task/293?kanban-status=1447275
2018-10-30 11:03:14 +01:00
Juan Antonio Osorio Robles
6789f2e9a9 Undercloud: Disable persisting VIPs in /etc/hosts
This adds the use-dns-for-vips.yaml which disables persisting the VIP
hosts to /etc/hosts. This is because sometimes we might be setting the
CloudName to an IP (for using IPs as keystone endpoints). Without this,
we'll get an erroneous value there.

Change-Id: Ie28f51d6729f5f4b940bfcc8e77968dd57d41669
Closes-Bug: #1799724
2018-10-26 09:13:03 +03:00
Harald Jensås
1774425689 Extend DeployedServerPortMap to include network props
In I68e064d23ec5d43f59146d974cae604d2c5fdb52 we start
using the 'tags' of the ctlplane network via get_attr
on the ControlVirtualIP resource.

The undercloud need to extend it's DeployedServerPortMap
to provide the network tags.

Related: blueprint tripleo-routed-networks-templates
Change-Id: Ia8e219b30d4f8b199b882e95fe2834252a92c15a
2018-10-26 05:59:50 +02:00
Harald Jensås
fd507bb137 Use full cidr for DeployedServerPortMap
Since change: I92ee0f9a2107cdf1ca5903d3756a235a79c36c73
the cidr is resolved from the port attributes. Doc's
change: Id1b643db00ade4993449d3eadabea5eb5fe827eb
states the same.

Change-Id: I265e39accea1bef051173ad43a3c654d9632b000
2018-10-26 04:51:34 +02:00
Zuul
709d0ca49f Merge "Stop using deprecated docker.yaml" 2018-10-25 23:07:47 +00:00
Zuul
643b222378 Merge "Improve standalone success messaging" 2018-10-25 19:15:27 +00:00
Zuul
5a5a2e6b1a Merge "check for existence of output env file for container image prepare" 2018-10-25 19:15:25 +00:00
Zuul
a7a5ae01c1 Merge "Fix type of --config-download-timeout" 2018-10-25 09:33:28 +00:00
Tony Breeds
b3b45efc2b Add AdditionalArchitectures when configured
With a heat based deploy we need to add AdditionalArchitectures to the
environment so that consumers can do the right thing when needed.

Blueprint: multiarch-support
Needed-By: https://review.openstack.org/580829
Change-Id: I173f3991cda24cd77ccba8a4cfb60c128ecfa3a4
2018-10-24 13:44:19 +11:00
Zuul
2f662a50d6 Merge "Switch Heat Launcher to use Podman instead of Docker when containerized" 2018-10-22 21:31:11 +00:00
James Slagle
2dc6920e8b Fix type of --config-download-timeout
This arg should be of type int, not the default type string.

Change-Id: If828292df20bba370791dcb9736fa44b40b3e94c
Closes-Bug: #1799241
2018-10-22 11:05:17 -04:00
Zuul
603db8cd2e Merge "Handle tls endpoint for zaqar websocket client" 2018-10-20 12:20:28 +00:00
Zuul
f361fff651 Merge "Use sync action get_deployment_failures" 2018-10-20 07:54:22 +00:00
Zuul
e7d44f6426 Merge "Add fixture to replace multiple mocks" 2018-10-20 07:54:20 +00:00
Zuul
259ec1c566 Merge "Validate routed networks enabled if multiple subnets in conf" 2018-10-20 07:54:20 +00:00
Zuul
23038c78b0 Merge "Ensure that the --template-file option is passed to the kolla builder" 2018-10-20 07:54:19 +00:00
Zuul
a689b84271 Merge "Don't use deprecated environment for no-tls setup" 2018-10-20 02:03:35 +00:00
Zuul
6fadfb263c Merge "Fix defaults to templates, roles-file and plan-environment" 2018-10-19 11:02:53 +00:00
Jiri Stransky
24255000c6 Stop using deprecated docker.yaml
The docker.yaml env file is being deprecated in change
I6106e223d9c1e399d396d745ad28274107074b06 so we can stop using it. All
deployments are now containerized and the docker.yaml entries should
be part of the default resource registry.

Change-Id: I683cb03ae10f047946a0c1bc7f34344ee944a8f7
2018-10-19 10:29:25 +02:00
Zuul
10bc94439a Merge "Honor blacklist during temp key injection" 2018-10-19 08:07:10 +00:00
Zuul
a97345035b Merge "Fix misspelling in deployment complete message." 2018-10-19 01:41:39 +00:00
Emilien Macchi
45395e8c0d Fix defaults to templates, roles-file and plan-environment
This change updates the --templates parameter to now have a default
which makes it optional and only necessary when something different than
the default.  Additionally we're removing the defaults as it causes
issues, when someone download the overcloud plan on the undercloud
because it would use the current working director to load the file.
Now it will use the --templates folder as a base for the default value
and will take the specific file if --roles-file or
--plan-environment-file is specified.

Change-Id: Ia0c8a7caaf8f24ef1e5b0858d57827633f2473e9
Closes-Bug: #1797922
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2018-10-18 08:07:58 -06:00
Kamil Sambor
16b5048f02 Add fixture to replace multiple mocks
Add fixture for overcloud operations

Change-Id: I41a060a5c4035edfd94de80b9a1cc2f734941fee
Closes-Bug: 1619350
2018-10-17 06:52:12 +00:00
Zuul
38b9184c04 Merge "Use transport_url instead of rpc_backend" 2018-10-16 01:16:31 +00:00
Zuul
efbd6941a4 Merge "Update deployment status when deploying or failed" 2018-10-16 00:57:30 +00:00