From 8aa4c9ac0ca9bb48303a427661a7dfb86e5699d8 Mon Sep 17 00:00:00 2001
From: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
Date: Mon, 7 Oct 2024 16:16:06 +0800
Subject: [PATCH] Cleanup: Fedora 37/38 CI tests & docs (#11600)

* Feat: update the remaining Fedora 37 vagrant CI

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>

* Cleanup: remove EOL Fedora 37/38 CI tests

Signed-off-by: ChengHao Yang
<17496418+tico88612@users.noreply.github.com>

* Docs: remove EOL Fedora 37/38

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
---
 .gitlab-ci/packet.yml                         | 19 -------------------
 .gitlab-ci/vagrant.yml                        |  2 +-
 README.md                                     |  2 +-
 Vagrantfile                                   | 10 ----------
 docs/developers/ci.md                         |  8 +-------
 .../files/packet_fedora37-calico-selinux.yml  | 14 --------------
 .../packet_fedora37-calico-swap-selinux.yml   | 19 -------------------
 tests/files/packet_fedora37-crio.yml          | 15 ---------------
 tests/files/packet_fedora38-docker-calico.yml | 15 ---------------
 tests/files/packet_fedora38-docker-weave.yml  | 12 ------------
 tests/files/packet_fedora38-kube-ovn.yml      |  7 -------
 ...ter.rb => vagrant_fedora39-kube-router.rb} |  2 +-
 ...r.yml => vagrant_fedora39-kube-router.yml} |  2 +-
 13 files changed, 5 insertions(+), 122 deletions(-)
 delete mode 100644 tests/files/packet_fedora37-calico-selinux.yml
 delete mode 100644 tests/files/packet_fedora37-calico-swap-selinux.yml
 delete mode 100644 tests/files/packet_fedora37-crio.yml
 delete mode 100644 tests/files/packet_fedora38-docker-calico.yml
 delete mode 100644 tests/files/packet_fedora38-docker-weave.yml
 delete mode 100644 tests/files/packet_fedora38-kube-ovn.yml
 rename tests/files/{vagrant_fedora37-kube-router.rb => vagrant_fedora39-kube-router.rb} (95%)
 rename tests/files/{vagrant_fedora37-kube-router.yml => vagrant_fedora39-kube-router.yml} (80%)

diff --git a/.gitlab-ci/packet.yml b/.gitlab-ci/packet.yml
index 0a96dc21c..d7f22c2b3 100644
--- a/.gitlab-ci/packet.yml
+++ b/.gitlab-ci/packet.yml
@@ -169,12 +169,6 @@ packet_ubuntu22-all-in-one-docker:
   extends: .packet_pr_extended
 
 # ### MANUAL JOBS
-packet_fedora37-crio:
-  extends: .packet_pr_manual
-
-packet_fedora39-crio:
-  extends: .packet_pr_manual
-
 packet_ubuntu20-flannel-ha:
   extends: .packet_pr_manual
 
@@ -184,9 +178,6 @@ packet_ubuntu20-all-in-one-docker:
 packet_ubuntu20-flannel-ha-once:
   extends: .packet_pr_manual
 
-packet_fedora37-calico-swap-selinux:
-  extends: .packet_pr_manual
-
 packet_fedora39-calico-swap-selinux:
   extends: .packet_pr_manual
 
@@ -209,22 +200,12 @@ packet_ubuntu20-calico-ha-wireguard:
   extends: .packet_pr_manual
 
 # PERIODIC
-packet_fedora38-docker-calico:
-  stage: deploy-extended
-  extends: .packet_periodic
-  variables:
-    RESET_CHECK: "true"
-
 packet_fedora40-docker-calico:
   stage: deploy-extended
   extends: .packet_periodic
   variables:
     RESET_CHECK: "true"
 
-packet_fedora37-calico-selinux:
-  stage: deploy-extended
-  extends: .packet_periodic
-
 packet_fedora39-calico-selinux:
   stage: deploy-extended
   extends: .packet_periodic
diff --git a/.gitlab-ci/vagrant.yml b/.gitlab-ci/vagrant.yml
index 3e581ae5c..2f8119bb1 100644
--- a/.gitlab-ci/vagrant.yml
+++ b/.gitlab-ci/vagrant.yml
@@ -56,7 +56,7 @@ vagrant_ubuntu20-kube-router-svc-proxy:
   extends: .vagrant
   when: manual
 
-vagrant_fedora37-kube-router:
+vagrant_fedora39-kube-router:
   stage: deploy-extended
   extends: .vagrant
   when: manual
diff --git a/README.md b/README.md
index 637251bd7..1de3e2a7f 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ vagrant up
 - **Debian** Bookworm, Bullseye
 - **Ubuntu** 20.04, 22.04, 24.04
 - **CentOS/RHEL** [8, 9](docs/operating_systems/centos.md#centos-8)
-- **Fedora** 37, 38, 39, 40
+- **Fedora** 39, 40
 - **Fedora CoreOS** (see [fcos Note](docs/operating_systems/fcos.md))
 - **openSUSE** Leap 15.x/Tumbleweed
 - **Oracle Linux** [8, 9](docs/operating_systems/centos.md#centos-8)
diff --git a/Vagrantfile b/Vagrantfile
index ab48fb7af..643aee429 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -28,8 +28,6 @@ SUPPORTED_OS = {
   "almalinux8-bento"    => {box: "bento/almalinux-8",          user: "vagrant"},
   "rockylinux8"         => {box: "rockylinux/8",               user: "vagrant"},
   "rockylinux9"         => {box: "rockylinux/9",               user: "vagrant"},
-  "fedora37"            => {box: "fedora/37-cloud-base",       user: "vagrant"},
-  "fedora38"            => {box: "fedora/38-cloud-base",       user: "vagrant"},
   "fedora39"            => {box: "fedora/39-cloud-base",       user: "vagrant"},
   "fedora40"            => {box: "fedora/40-cloud-base",       user: "vagrant"},
   "fedora39-arm64"      => {box: "bento/fedora-39-arm64",      user: "vagrant"},
@@ -228,14 +226,6 @@ Vagrant.configure("2") do |config|
         node.vm.provision "shell", inline: "rm -f /etc/modprobe.d/local.conf"
         node.vm.provision "shell", inline: "sed -i '/net.ipv6.conf.all.disable_ipv6/d' /etc/sysctl.d/99-sysctl.conf /etc/sysctl.conf"
       end
-      # Hack for fedora37/38 to get the IP address of the second interface
-      if ["fedora37", "fedora38"].include? $os
-        config.vm.provision "shell", inline: <<-SHELL
-          nmcli conn modify 'Wired connection 2' ipv4.addresses $(cat /etc/sysconfig/network-scripts/ifcfg-eth1 | grep IPADDR | cut -d "=" -f2)
-          nmcli conn modify 'Wired connection 2' ipv4.method manual
-          service NetworkManager restart
-        SHELL
-      end
       # Hack for fedora39/40 to get the IP address of the second interface
       if ["fedora39", "fedora40", "fedora39-arm64", "fedora40-arm64"].include? $os
         config.vm.provision "shell", inline: <<-SHELL
diff --git a/docs/developers/ci.md b/docs/developers/ci.md
index 80f86929c..cbc988901 100644
--- a/docs/developers/ci.md
+++ b/docs/developers/ci.md
@@ -11,9 +11,7 @@ amazon |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 centos8 |  :white_check_mark: | :x: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: |
 debian11 |  :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: |
 debian12 |  :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
-fedora37 |  :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: |
-fedora38 |  :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: |
-fedora39 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
+fedora39 |  :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: |
 fedora40 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 opensuse |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 rockylinux8 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
@@ -31,8 +29,6 @@ amazon |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 centos8 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 debian11 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 debian12 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
-fedora37 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
-fedora38 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 fedora39 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 fedora40 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 opensuse |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
@@ -51,8 +47,6 @@ amazon |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 centos8 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 debian11 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 debian12 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
-fedora37 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
-fedora38 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: |
 fedora39 |  :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 fedora40 |  :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
 opensuse |  :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
diff --git a/tests/files/packet_fedora37-calico-selinux.yml b/tests/files/packet_fedora37-calico-selinux.yml
deleted file mode 100644
index 2fbbd7bdc..000000000
--- a/tests/files/packet_fedora37-calico-selinux.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-37
-mode: default
-
-# Kubespray settings
-auto_renew_certificates: true
-# Switching to iptable due to https://github.com/projectcalico/calico/issues/5011
-# Kubernetes v1.23.0 kube-proxy does use v.7.x now. Calico v3.20.x/v3.21.x Pods show the following error
-# Bad return code from 'ipset list'. error=exit status 1 family="inet" stderr="ipset v7.1: Kernel and userspace incompatible: settype hash:ip,port with revision 6 not supported by userspace.
-kube_proxy_mode: iptables
-
-# Test with SELinux in enforcing mode
-preinstall_selinux_state: enforcing
diff --git a/tests/files/packet_fedora37-calico-swap-selinux.yml b/tests/files/packet_fedora37-calico-swap-selinux.yml
deleted file mode 100644
index 775c930b5..000000000
--- a/tests/files/packet_fedora37-calico-swap-selinux.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-37
-mode: default
-
-# Kubespray settings
-auto_renew_certificates: true
-# Switching to iptable due to https://github.com/projectcalico/calico/issues/5011
-# Kubernetes v1.23.0 kube-proxy does use v.7.x now. Calico v3.20.x/v3.21.x Pods show the following error
-# Bad return code from 'ipset list'. error=exit status 1 family="inet" stderr="ipset v7.1: Kernel and userspace incompatible: settype hash:ip,port with revision 6 not supported by userspace.
-kube_proxy_mode: iptables
-
-# Test with SELinux in enforcing mode
-preinstall_selinux_state: enforcing
-
-# Test Alpha swap feature by leveraging zswap default config in Fedora 35
-kubelet_fail_swap_on: false
-kube_feature_gates:
-  - "NodeSwap=True"
diff --git a/tests/files/packet_fedora37-crio.yml b/tests/files/packet_fedora37-crio.yml
deleted file mode 100644
index 5f5e736a2..000000000
--- a/tests/files/packet_fedora37-crio.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-37
-mode: default
-
-# Kubespray settings
-container_manager: crio
-auto_renew_certificates: true
-# Switching to iptable due to https://github.com/projectcalico/calico/issues/5011
-# Kubernetes v1.23.0 kube-proxy does use v.7.x now. Calico v3.20.x/v3.21.x Pods show the following error
-# Bad return code from 'ipset list'. error=exit status 1 family="inet" stderr="ipset v7.1: Kernel and userspace incompatible: settype hash:ip,port with revision 6 not supported by userspace.
-kube_proxy_mode: iptables
-
-# Test with SELinux in enforcing mode
-preinstall_selinux_state: enforcing
diff --git a/tests/files/packet_fedora38-docker-calico.yml b/tests/files/packet_fedora38-docker-calico.yml
deleted file mode 100644
index 8d1a9a44c..000000000
--- a/tests/files/packet_fedora38-docker-calico.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-38
-mode: default
-
-# Kubespray settings
-auto_renew_certificates: true
-# Switching to iptable due to https://github.com/projectcalico/calico/issues/5011
-# Kubernetes v1.23.0 kube-proxy does use v.7.x now. Calico v3.20.x/v3.21.x Pods show the following error
-# Bad return code from 'ipset list'. error=exit status 1 family="inet" stderr="ipset v7.1: Kernel and userspace incompatible: settype hash:ip,port with revision 6 not supported by userspace.
-kube_proxy_mode: iptables
-
-# Docker specific settings:
-container_manager: docker
-etcd_deployment_type: docker
diff --git a/tests/files/packet_fedora38-docker-weave.yml b/tests/files/packet_fedora38-docker-weave.yml
deleted file mode 100644
index 66bcdb12a..000000000
--- a/tests/files/packet_fedora38-docker-weave.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-38
-mode: default
-
-# Kubespray settings
-kube_network_plugin: weave
-
-# Docker specific settings:
-container_manager: docker
-etcd_deployment_type: docker
-resolvconf_mode: docker_dns
diff --git a/tests/files/packet_fedora38-kube-ovn.yml b/tests/files/packet_fedora38-kube-ovn.yml
deleted file mode 100644
index bc4ab5b52..000000000
--- a/tests/files/packet_fedora38-kube-ovn.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Instance settings
-cloud_image: fedora-38
-mode: default
-
-# Kubespray settings
-kube_network_plugin: kube-ovn
diff --git a/tests/files/vagrant_fedora37-kube-router.rb b/tests/files/vagrant_fedora39-kube-router.rb
similarity index 95%
rename from tests/files/vagrant_fedora37-kube-router.rb
rename to tests/files/vagrant_fedora39-kube-router.rb
index 54bcd75fa..ab0c4de84 100644
--- a/tests/files/vagrant_fedora37-kube-router.rb
+++ b/tests/files/vagrant_fedora39-kube-router.rb
@@ -1,6 +1,6 @@
 $num_instances = 2
 $vm_memory ||= 2048
-$os = "fedora37"
+$os = "fedora39"
 
 $kube_master_instances = 1
 $etcd_instances = 1
diff --git a/tests/files/vagrant_fedora37-kube-router.yml b/tests/files/vagrant_fedora39-kube-router.yml
similarity index 80%
rename from tests/files/vagrant_fedora37-kube-router.yml
rename to tests/files/vagrant_fedora39-kube-router.yml
index 2cee42120..71bcc5fe5 100644
--- a/tests/files/vagrant_fedora37-kube-router.yml
+++ b/tests/files/vagrant_fedora39-kube-router.yml
@@ -1,6 +1,6 @@
 ---
 # Instance settings
-cloud_image: fedora-37
+cloud_image: fedora-39
 mode: default
 
 # Kubespray settings
-- 
GitLab