CORD-1750 Upgrade OFDPA to OFDPA 3.0 EA4
Change-Id: Ieb79e766f037d7981fefcde6936b303021488b83
diff --git a/roles/fabric-switch/tasks/ofdpa.yml b/roles/fabric-switch/tasks/ofdpa.yml
index 48b0eff..ace1f2b 100644
--- a/roles/fabric-switch/tasks/ofdpa.yml
+++ b/roles/fabric-switch/tasks/ofdpa.yml
@@ -13,13 +13,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
---
- name: Openflow Agent Debian Archive
get_url:
- url: https://github.com/onfsdn/atrium-docs/raw/master/16A/ONOS/builds/ofdpa-3.0-ea0_3.0.0.0%2Baccton1.0-1_amd64.deb
+ url: https://github.com/onfsdn/atrium-docs/blob/master/16A/ONOS/builds/ofdpa_3.0.4.0+accton1.0~1-1_amd64.deb?raw=true
validate_certs: false
- dest: /mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb
+ checksum: "sha256:e0b10051b2032454132c6634a0896883e1548e0c39b847ff10933e559b95a729"
+ dest: /mnt/onl/data/ofdpa_3.0.4.0+accton1.0~1-1_amd64.deb
+
+# We want to kill old agents and stop the old OFDPA service before removing
+- name: OpenFlow Agent Is Not Running
+ command: killall ofagentapp
+ failed_when: false
+ tags:
+ - skip_ansible_lint # there's no harm to run killall if process is not running
+
+- name: Old OFDPA Is Not Running
+ command: killall -9 brcm-indigo-ofdpa-ofagent
+ failed_when: false
+ tags:
+ - skip_ansible_lint # there's no harm to run killall if process is not running
- name: Verify Service Exists
stat:
@@ -32,7 +45,14 @@
service: name=ofdpa state=stopped
when: ofdpa_stat.stat.exists
-- name: Verify Distributeion Release File
+- name: OFDPA 3.0 EA0 Is Not Present
+ apt:
+ name: ofdpa-3.0-ea0
+ state: absent
+ force: yes
+ purge: yes
+
+- name: Verify Distribution Release File
stat:
path: /etc/lsb-release
register: lsb_stat
@@ -45,11 +65,6 @@
changed_when: false
failed_when: false
-- name: Openflow Agent
- apt: deb="/mnt/onl/data/ofdpa-3.0-ea0_3.0.0.0+accton1.0-1_amd64.deb" force=true
+- name: Openflow Agent Installed
+ apt: deb="/mnt/onl/data/ofdpa_3.0.4.0+accton1.0~1-1_amd64.deb" force=true
when: not lsb_stat.stat.exists or dist.stdout == "0"
-
-- name: OpenFlow Agent Started
- service: name=ofdpa state=started
- when: not lsb_stat.stat.exists or dist.stdout == "0"
-