Skip to content

Commit 15ff356

Browse files
committed
Catch puppetdb sync-wait exit code and continue
When the replica is upgraded and PuppetDB sync doesn't complete within 15 minutes, the upgrade command exits with exitstatus 11. This should not be a condition in which the upgrade plan fails; the upgrade plan should proceed forward in this case. There are many reasons why PuppetDB sync might not complete quickly, but it's not a reason not to continue upgrading the compilers. Upgrading the remaining compilers will result in a more stable deployment than not upgrading them, whatever the reason for PuppetDB sync being incomplete/slow.
1 parent 7f063d8 commit 15ff356

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# PEADM module
22

3+
## UNRELEASED
4+
### Summary
5+
6+
### Improvements
7+
8+
- Handle exit code 11 from replica upgrade (still waiting for PuppetDB sync to complete) gracefully.
9+
310
## 2.4.5
411
### Summary
512

tasks/puppet_infra_upgrade.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ def main
2727
puts stdouterr
2828
if status.success?
2929
exit 0
30+
elsif status.exitstatus == 11 # Waiting for PuppetDB sync to complete, but otherwise successful
31+
exit 0
3032
else
31-
exit 1
33+
exit status.exitstatus
3234
end
3335
end
3436

0 commit comments

Comments
 (0)