diff options
author | Jiri Stransky <jistr@redhat.com> | 2017-06-29 14:25:21 +0200 |
---|---|---|
committer | Jiri Stransky <jistr@redhat.com> | 2017-06-29 14:25:21 +0200 |
commit | af5eaf11337c363bdf9a126744ceddb94a80343e (patch) | |
tree | 562c05f8de83c562b0ff64d7f466ac9bf6b03456 /puppet/services/disabled/ceilometer-expirer-disabled.yaml | |
parent | 3b7de8a2514cf9b90ee7aec3365bfbf4547175ad (diff) |
Make ceilometer crontab removal idempotent
When we re-execute an upgrade and the crontab has already been
removed, the crontab removal returns 1, saying "no crontab for
ceilometer", and the upgrade fails. This change makes the removal
idempotent.
Change-Id: Ic955fb67bb2f7afde44291f7db3293c88f167566
Closes-Bug: #1701250
Diffstat (limited to 'puppet/services/disabled/ceilometer-expirer-disabled.yaml')
-rw-r--r-- | puppet/services/disabled/ceilometer-expirer-disabled.yaml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/puppet/services/disabled/ceilometer-expirer-disabled.yaml b/puppet/services/disabled/ceilometer-expirer-disabled.yaml index 7be394b6..7110afaa 100644 --- a/puppet/services/disabled/ceilometer-expirer-disabled.yaml +++ b/puppet/services/disabled/ceilometer-expirer-disabled.yaml @@ -36,3 +36,6 @@ outputs: - name: Remove ceilometer expirer cron tab on upgrade tags: step1 shell: '/usr/bin/crontab -u ceilometer -r' + register: remove_ceilometer_expirer_crontab + failed_when: remove_ceilometer_expirer_crontab.rc != 0 and remove_ceilometer_expirer_crontab.stderr != "no crontab for ceilometer" + changed_when: remove_ceilometer_expirer_crontab.stderr != "no crontab for ceilometer" |