diff options
author | 2017-02-27 15:19:56 -0500 | |
---|---|---|
committer | 2017-03-08 21:37:03 +0000 | |
commit | 96490958c5091f325cb0e3e69890b0a9472f4542 (patch) | |
tree | 38351d6807b782f28c537e30b748ae711c86338b /puppet/services/opendaylight-api.yaml | |
parent | 31347846705f8773d9294a347d525096fb61472a (diff) |
Adds upgrade tasks for OpenDaylight services
Change-Id: I740b20b12acb3740886409bff86c4989f0a066f4
Signed-off-by: Tim Rozet <trozet@redhat.com>
(cherry picked from commit 20d7901ab24e93e0224cc1c8b0cde3eb80122818)
Diffstat (limited to 'puppet/services/opendaylight-api.yaml')
-rw-r--r-- | puppet/services/opendaylight-api.yaml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/puppet/services/opendaylight-api.yaml b/puppet/services/opendaylight-api.yaml index 0ed9d206..51a520cc 100644 --- a/puppet/services/opendaylight-api.yaml +++ b/puppet/services/opendaylight-api.yaml @@ -63,3 +63,26 @@ outputs: - 6653 step_config: | include tripleo::profile::base::neutron::opendaylight + upgrade_tasks: + - name: Check if opendaylight is deployed + command: systemctl is-enabled opendaylight + tags: common + ignore_errors: True + register: opendaylight_enabled + - name: "PreUpgrade step0,validation: Check service opendaylight is running" + shell: /usr/bin/systemctl show 'opendaylight' --property ActiveState | grep '\bactive\b' + when: opendaylight_enabled.rc == 0 + tags: step0,validation + - name: Stop opendaylight service + tags: step1 + when: opendaylight_enabled.rc == 0 + service: name=opendaylight state=stopped + - name: Removes ODL snapshots, data, journal directories + file: + state: absent + path: /opt/opendaylight/{{item}} + tags: step2 + with_items: + - snapshots + - data + - journal |