This instance will be upgraded to Heptapod 0.26.0rc1 on 2021-10-25 at 14:00 UTC+2 (a few minutes of down time)

Commit 28e5ff4b authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod: added start/end logging for backups

On HDK instances, the backup restoration is often really long,
it's worthwile to know it has started and is still ongoing.

In cases one launches the tests and comes back later, it is also
useful to notice how long it took (time to purge repositories/ and
run `rake dev:setup` to start afresh)

Also, an immediate log that the restoration failed does not hurt.
parent 10f27300c0d5
Pipeline #18230 failed with stage
in 25 minutes and 21 seconds
......@@ -466,7 +466,12 @@ class Heptapod:
if clean_previous:
start = time.time()"Starting backup task")
elapsed = time.time() - start"Backup task finished in %d seconds (%.1f minutes)",
elapsed, elapsed / 60)
def backup_restore(self):
......@@ -479,13 +484,20 @@ class Heptapod:
self.gitlab_ctl('stop', services=self.RAILS_SERVICES)
start = time.time()"Starting backup restoration")
self.rake('gitlab:backup:restore', 'force=yes')
elapsed = time.time() - start"Backup restoration finished in %d seconds (%.1f minutes)."
"Now restarting Rails.",
elapsed, elapsed / 60)
self.gitlab_ctl('start', services=self.RAILS_SERVICES)
except Exception:
logger.error("Backup restoration failed")
# these are idempotent
self.gitlab_ctl('start', services=self.RAILS_SERVICES)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment