diff options
author | Maros Mullner <maros.mullner@pantheon.tech> | 2020-05-22 08:27:07 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-05-27 13:11:10 +0000 |
commit | 5d4c299d02072fd18ef175bfbf7c694e94db79a6 (patch) | |
tree | 2c68868b5fd42a86197aeae205557a435f4eef16 /resources/tools/testbed-setup/ansible/roles | |
parent | 3ea4fcebabfaac866d469a7b4355ac8df7732a0f (diff) |
Terraform and ansible changes for Cloud environment (AWS, Azure).
Signed-off-by: Maros Mullner <maros.mullner@pantheon.tech>
Change-Id: Ic78b5dae22b67763b99c50a5f15d7dd16152d5d5
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles')
9 files changed, 61 insertions, 5 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml index b155b4b246..7363dc2c34 100644 --- a/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml @@ -6,3 +6,10 @@ reboot_timeout: 3600 tags: - reboot-server + +- name: AWS - Reload systemd-modules + systemd: + name: "systemd-modules-load" + state: "restarted" + tags: + - reload-systemd-modules diff --git a/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link b/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link new file mode 100644 index 0000000000..a8e0aa10f3 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link @@ -0,0 +1,4 @@ +[Match] +OriginalName=dtap* +[Link] +NamePolicy=kernel diff --git a/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml index 246e8dbfe0..f0d46062d9 100644 --- a/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml @@ -7,7 +7,7 @@ tags: - reboot-server -- name: Reload systemd-modules +- name: Azure - Reload systemd-modules systemd: name: "systemd-modules-load" state: "restarted" diff --git a/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml index 3513bb7132..c8d72475d8 100644 --- a/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml @@ -11,7 +11,7 @@ - "ib_uverbs" - "mlx4_ib" - "mlx5_ib" - notify: "Reload systemd-modules" + notify: "Azure - Reload systemd-modules" tags: - load-kernel-modules @@ -24,3 +24,15 @@ reload: "yes" tags: - set-sysctl + +- name: Azure - prevent interface renaming + copy: + src: "files/10-dtap.link" + dest: "/etc/systemd/network/" + owner: "root" + group: "root" + mode: "0644" + notify: + - "Reboot server" + tags: + - prevent-interface-renaming diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml index 5be9fa93a5..c639f11088 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml @@ -19,12 +19,14 @@ packages_by_arch: - [] # Kernel version to check. -kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] | join(' ') }}" +kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] }}" kernel_version_by_distro_by_arch: ubuntu: x86_64: - "4.15.0-72-generic" + - "5.3.0-1020-azure" + - "5.3.0-1017-aws" aarch64: - "4.15.0-54-generic" diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml index 02a9ef3d00..e88c39c180 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml @@ -24,7 +24,7 @@ register: current_kernel_version changed_when: false failed_when: | - kernel_version not in current_kernel_version.stdout + current_kernel_version.stdout not in kernel_version tags: - check-kernel-version diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch b/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch new file mode 100644 index 0000000000..a3928d70f7 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch @@ -0,0 +1,19 @@ +diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c +index d7d3bc73c..c21c38485 100644 +--- a/drivers/net/mlx5/mlx5_ethdev.c ++++ b/drivers/net/mlx5/mlx5_ethdev.c +@@ -1032,11 +1032,14 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, + ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX); + dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds & + ETH_LINK_SPEED_FIXED); ++#if 0 ++ /* FIXME: this does not work on Azure w/ CX4-LX */ + if (((dev_link.link_speed && !dev_link.link_status) || + (!dev_link.link_speed && dev_link.link_status))) { + rte_errno = EAGAIN; + return -rte_errno; + } ++#endif + *link = dev_link; + return 0; + } diff --git a/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch b/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch index 65b437588d..e7db647779 100644 --- a/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch +++ b/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch @@ -534,3 +534,15 @@ index 782de540..8cedea84 100644 #ifdef HAVE_TC_ACT_BPF #include <linux/tc_act/tc_bpf.h> #endif +diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp +index 0f66b07a..8c37ea15 100644 +--- a/src/main_dpdk.cpp ++++ b/src/main_dpdk.cpp +@@ -6969,6 +6969,7 @@ COLD_FUNC bool DpdkTRexPortAttr::update_link_status_nowait(){ + bool changed = false; + rte_eth_link_get_nowait(m_repid, &new_link); + ++ new_link.link_speed = ETH_SPEED_NUM_50G; + if (new_link.link_speed != m_link.link_speed || + new_link.link_duplex != m_link.link_duplex || + new_link.link_autoneg != m_link.link_autoneg || diff --git a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml index d8f35cbc17..0e139a22e6 100644 --- a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml @@ -46,7 +46,7 @@ strip: 1 loop: "{{ trex_version }}" when: - - azure is defined + - azure is defined and "{{ item }}" == "2.73" tags: - install-trex |