Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: etcd::backup: consider absence of logs
......................................................................


etcd::backup: consider absence of logs

Change-Id: Iaf33c071c78fc099279c98b04852deb65f525074
---
M modules/etcd/files/etcd-backup.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/etcd/files/etcd-backup.py 
b/modules/etcd/files/etcd-backup.py
index a01d57e..8a5ef87 100755
--- a/modules/etcd/files/etcd-backup.py
+++ b/modules/etcd/files/etcd-backup.py
@@ -51,7 +51,7 @@
             log.debug("Removing old backup dir %s", backupdir)
             shutil.rmtree(backupdir)
 
-    if backupdirs[-1] != backup_dir:
+    if len(backupdirs) == 0 or backupdirs[-1] != backup_dir:
         log.info("Not rotating backups and no unrotated one present")
         return
 

-- 
To view, visit https://gerrit.wikimedia.org/r/296371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf33c071c78fc099279c98b04852deb65f525074
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to