Feat: Update OVS 2.17.11 on Ubuntu 22.04 77/114077/2
authorAnil Belur <abelur@linuxfoundation.org>
Fri, 18 Oct 2024 07:14:08 +0000 (17:14 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 18 Oct 2024 11:40:48 +0000 (21:40 +1000)
ODL CIST jobs require and updated version of OVS 2.17.11
supported on Ubuntu 22.04.

Update packer jobs to build the latest version of packer
image. Cleanup the unused platforms and provision files.

A workaround has been added to build MT-cbench since the
repo is not been maintained for a long time.

Ref: https://github.com/intracom-telecom-sdn/mtcbench/issues/13
Change-Id: I4f819e918f15d16362523b0838cc0e5fd69cc33a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
jjb/releng-packer-jobs.yaml
packer/provision/mininet-ovs-217.yaml [moved from packer/provision/mininet-ovs-2.8.yaml with 74% similarity]
packer/templates/mininet-ovs-217.pkr.hcl [moved from packer/templates/mininet-ovs-28.pkr.hcl with 84% similarity]

index 76f5989b1ba20c7d70b2f6104bab51de0088f01a..57bda1c4199ee93e4769e7cf8529f4c99eb3a897 100644 (file)
     update-cloud-image: true
 
 - project:
-    name: packer-mininet-ovs-28-jobs
+    name: packer-mininet-ovs-217-jobs
     jobs:
       - gerrit-packer-merge
 
     cron: "00 H 1 * *"
 
     platforms:
-      - ubuntu-18.04
-      - ubuntu-20.04
       - ubuntu-22.04
 
-    templates: mininet-ovs-28
+    templates: mininet-ovs-217
     update-cloud-image: true
 
 - project:
similarity index 74%
rename from packer/provision/mininet-ovs-2.8.yaml
rename to packer/provision/mininet-ovs-217.yaml
index ad887d87547c56dd69c7beb5f0fc1375f3380e09..209ae7a8d045e3118837cd5f04b302ee666367d7 100644 (file)
@@ -5,8 +5,8 @@
   become_user: root
   become_method: sudo
   vars:
-    ovs_checksum: sha256:e40227e366db55f997344876a692918af68430bcb5fd3bd9ffe8dfd8c0bdd51f
-    ovs_version: 2.8.11
+    ovs_checksum: sha256:d6e943729710f30941d2c4e798f0f917ceed8b07e9aeacf65ff9de86dff374f0
+    ovs_version: 2.17.11
 
   pre_tasks:
     - include_role: name=lfit.system-update
         - name: Install OpenVSwitch dependencies
           apt:
             name:
+              - graphviz
               - autoconf
               - automake
               - bzip2
               - debhelper
               - dh-autoreconf
+              - dh-python
               - libssl-dev
+              - libcap2
               - openssl
               - pkg-config
               - procps
-              - python-all
-              - python-qt4
-              - python-twisted-conch
-              - python-zopeinterface
+              - python3-all
+              - python3-zope.interface
+              - python3-sphinx
+              - python3-twisted
+              - libunbound-dev
+              - libunwind-dev
             state: present
+            update_cache: yes
           become: true
         - name: "Fetch OpenVSwitch {{ovs_version}}"
           get_url:
         - name: "Install OpenVSwitch {{ovs_version}}"
           apt: "deb={{item}}"
           with_items:
-            - /tmp/ovs/libopenvswitch_2.8.11-1_amd64.deb
-            - /tmp/ovs/openvswitch-common_2.8.11-1_amd64.deb
-            - /tmp/ovs/openvswitch-switch_2.8.11-1_amd64.deb
-            - /tmp/ovs/python-openvswitch_2.8.11-1_all.deb
-            - /tmp/ovs/openvswitch-vtep_2.8.11-1_amd64.deb
+            - /tmp/ovs/libopenvswitch_2.17.11-1_amd64.deb
+            - /tmp/ovs/openvswitch-common_2.17.11-1_amd64.deb
+            - /tmp/ovs/openvswitch-switch_2.17.11-1_amd64.deb
+            - /tmp/ovs/python3-openvswitch_2.17.11-1_all.deb
+            - /tmp/ovs/openvswitch-vtep_2.17.11-1_amd64.deb
+            - /tmp/ovs/libopenvswitch_2.17.11-1_amd64.deb
           become: true
         - name: Enable openvswitch-switch service
           systemd:
               - snmp
               - snmpd
             state: present
+            update_cache: yes
           become: true
         - name: Fetch mtcbench git repo
           git:
         - name: Run mtcbench/deploy/docker/provision.sh
           command: /tmp/mtcbench/deploy/docker/provision.sh
           become: true
+        - name: Fix LDADD for Ubuntu 22.04
+          lineinfile:
+            path: /tmp/mtcbench/oflops/Makefile.am
+            regex: "^LDADD=-ldl -lpcap -lnetsnmp -loflops_test$"
+            line: "LDADD=-ldl -lpcap -lnetsnmp liboflops_test.la"
         - name: Build mtcbench
           # TODO: remove workaround for build issue with mtcbench
           # when mtcbench dependency build correctly
           become: true
 
     - name: Install exabgp
-      apt: name=exabgp state=present
+      apt:
+        name:
+          - exabgp
+        state: present
+        update_cache: yes
       become: true
 
     - name: Install python-netaddr for custom mininet topologies
-      apt: name=python-netaddr state=present
+      apt:
+        name:
+          - python3-netaddr
+        state: present
+        update_cache: yes
       become: true
 
     - name: Install vlan for vlan based tests in VTN suites
-      apt: name=vlan state=present
+      apt:
+        name:
+          - vlan
+        state: present
+        update_cache: yes
       become: true
 
     # This image is being used as a CSIT tools image and some of our
     - name: Install CSIT dependencies
       apt:
         name:
-          - python-requests
+          - python3-requests
         state: present
+        update_cache: yes
       become: true
 
   post_tasks:
similarity index 84%
rename from packer/templates/mininet-ovs-28.pkr.hcl
rename to packer/templates/mininet-ovs-217.pkr.hcl
index ff1852458c459b7fdc770c3b4ec8e69834076fe4..ae6ff19a790c67d77b304df79c6567681be030cb 100644 (file)
@@ -110,17 +110,17 @@ variable "vm_volume_size" {
   default = "20"
 }
 
-source "docker" "mininet-ovs-28" {
+source "docker" "mininet-ovs-217" {
   changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
   commit  = true
   image   = "${var.docker_source_image}"
 }
 
-source "openstack" "mininet-ovs-28" {
+source "openstack" "mininet-ovs-217" {
   flavor            = "${var.flavor}"
   image_disk_format = "${var.vm_image_disk_format}"
-  image_name        = "ZZCI - ${var.distro} - mininet-ovs-28 - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
-  instance_name     = "${var.distro}-mininet-ovs-28-${uuidv4()}"
+  image_name        = "ZZCI - ${var.distro} - mininet-ovs-217 - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+  instance_name     = "${var.distro}-mininet-ovs-217-${uuidv4()}"
   metadata = {
     ci_managed = "yes"
   }
@@ -135,7 +135,7 @@ source "openstack" "mininet-ovs-28" {
 }
 
 build {
-  sources = ["source.docker.mininet-ovs-28", "source.openstack.mininet-ovs-28"]
+  sources = ["source.docker.mininet-ovs-217", "source.openstack.mininet-ovs-217"]
 
   provisioner "shell" {
     execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
@@ -157,9 +157,9 @@ build {
     ]
     command            = "./common-packer/ansible-playbook.sh"
     extra_arguments    = [
-        "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa"
+        "--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
     ]
-    playbook_file      = "provision/mininet-ovs-2.8.yaml"
+    playbook_file      = "provision/mininet-ovs-217.yaml"
     skip_version_check = true
   }
 }