Commit Graph

8 Commits

Author SHA1 Message Date
Dougal Matthews 5566697549 Remove the logging to Swift custom Mistral actions
In I0419ca070553ad7261cda947c2d246a44df5580d the workflow was removed,
this change removes the related custom actions that are now unused.

Change-Id: I4e73402a2bb2feec2e8fde0ab134317d31be5df9
2019-08-22 09:21:47 +01:00
Alex Schultz 550537acf4 Handle swift interactions are strings as necessary
To properly handle the differences between python2/python3 we need to
ensure that when we interact with swift and are dealing with string data
that we handle the types correctly. This change adds a swift utils
helper to call to get the string data from an object out of swift. For
example our json and yaml files are all strings so if we try to use
something like json.dumps() from data we pull from swift, it errors
because we're given a bytes like object in python3.

Change-Id: I7996cc08cdd3bddf3f4ba0fb2e48f926f944c0dd
Related-Blueprint: python3-support
2019-03-01 15:45:56 -07:00
Honza Pokorny ca0b4ad397 Fix tarball generation when downloading logs
The argument list for the function `create_and_upload_tarball` has
recently changed, and it broke the PrepareDownload action.  An extra
positional argument was added.  We switch our last argument to be a
named one.

Related: https://review.openstack.org/#/c/517610/

Change-Id: Ifa564b2046ca6a304e9f8f82dd1949dc3c127817
Story: #2001916
Task: #14440
2018-04-25 14:31:40 -03:00
Carlos Camacho 13f2704c8e Allow uploading big files to swift (5GB)
This patch enables the swift upload for big files (+5GB)
in TripleO.
Also, adds support to the undercloud backup CLI to upload
big backups to swift.

Change-Id: I80163c8df15377dd3b5a44b5439a23223d8cccee
Depends-On: Iff73833f1d470750862873f70a4a9aaba50bd164
Closes-Bug: 1761412
2018-04-23 16:48:30 +02:00
Thomas Herve 7fadeae577 Make some tweaks to swift logging
This made some minor changes to the container management for logging,
mostly using copy_object to rotate logs, instead of get/put, and using
the idempotency of put_container for container creation.

Change-Id: I852184fcbdf9fb7e811e7ae203733e5e17f2c086
2018-03-20 08:53:28 +00:00
Honza Pokorny 85333e7a75 Use an epoch as default, not a datetime
The `epoch_to_formatted_date` function expects an epoch, not a datetime.

Change-Id: I43f46b153aa7485db0554bf4b300c316fb57da00
2018-02-05 09:00:28 -04:00
Honza Pokorny e6bf7def6c Cast content-length to an int when comparing sizes
Let's compare int with int instead of int with string.  This fixes the
log rotation logic in logging_to_swift.

Change-Id: Id59489d5c9c6c3a806bbfe104479d3884b62fc05
Closes-Bug: #1731472
2017-11-16 15:15:47 -04:00
Honza Pokorny 4cd60846af Add GUI logging workflows
The workflow works like this:

1.  Drain the tripleo Zaqar queue
2.  Format the messages as a log string
3.  Publish the string to a swift object

If the swift object exceeds 10MB, we rotate it.

This patch also includes a workflow to download the latest log via a temporary
url.  The download log action shares a lot of code with the plan export action,
so the common bits were extracted.

Implements: spec gui-logging
Implements: blueprint websocket-logging
Change-Id: I2affd39e85ccfdbaa18590de182104715cfbbed4
2017-08-08 08:55:55 +02:00