diff --git a/linux/network_device_ops/apply_new_network_config.yml b/linux/network_device_ops/apply_new_network_config.yml index 34c614d3e..e5bb7183b 100644 --- a/linux/network_device_ops/apply_new_network_config.yml +++ b/linux/network_device_ops/apply_new_network_config.yml @@ -53,8 +53,9 @@ - nm_add_connection is defined - nm_add_connection.rc is defined - nm_add_connection.rc == 0 - fail_msg: "Failed to add network connection" - success_msg: "{{ nm_add_connection.stdout | default('Successfully added network connection') }}" + fail_msg: "Failed to add network connection on VM {{ vm_name }}" + success_msg: "{{ nm_add_connection.stdout | + default('Successfully added network connection on VM ' ~ vm_name) }}" when: guest_os_network_manager == "NetworkManager" # Set network config file in guest OS except VMware Photon OS @@ -175,7 +176,8 @@ - link_status.stdout is defined - search_ip in link_status.stdout fail_msg: >- - Network adapter '{{ new_network_adapter }}' failed to obtain IPv4 address after 100 seconds. + Network adapter '{{ new_network_adapter }}' on VM {{ vm_name }} + failed to obtain IPv4 address after 100 seconds. Its current IPv4 address is '{{ link_status.stdout | default("") }}'. - name: "Print the new networ adapter IP address" diff --git a/linux/network_device_ops/check_and_reload_pvrdma.yml b/linux/network_device_ops/check_and_reload_pvrdma.yml index e9ed142d7..bc7752541 100644 --- a/linux/network_device_ops/check_and_reload_pvrdma.yml +++ b/linux/network_device_ops/check_and_reload_pvrdma.yml @@ -24,7 +24,7 @@ that: - rdma_devices_after_hotadd | length > 0 - rdma_devices_after_hotadd | difference(rdma_devices_before_hotadd) | length == 1 - fail_msg: "No new RDMA device is detected" + fail_msg: "No new RDMA device is detected on VM {{ vm_name }}" - name: "Set fact of new RDMA device" ansible.builtin.set_fact: diff --git a/linux/network_device_ops/hot_add_network_adapter.yml b/linux/network_device_ops/hot_add_network_adapter.yml index bec10f7ca..702272354 100644 --- a/linux/network_device_ops/hot_add_network_adapter.yml +++ b/linux/network_device_ops/hot_add_network_adapter.yml @@ -34,7 +34,7 @@ ansible.builtin.assert: that: - new_network_adapter_dmesg | length > 0 - fail_msg: "There is no message about new {{ adapter_type }} network adapter in dmesg" + fail_msg: "There is no message about new {{ adapter_type }} network adapter in dmesg on VM {{ vm_name }}" - name: "Get network adapters status after hot-add" include_tasks: ../utils/get_network_adapters_status.yml @@ -47,7 +47,7 @@ ansible.builtin.assert: that: - network_adapters_after_hotadd | difference(network_adapters_before_hotadd) | length > 0 - fail_msg: "Fail to detect new added {{ adapter_type }} network adapter in guest OS" + fail_msg: "Guest OS failed to detect new added {{ adapter_type }} network adapter on VM {{ vm_name }}" # Get new added network interface - name: "Set fact of new added network adapter" diff --git a/linux/network_device_ops/hot_remove_network_adapter.yml b/linux/network_device_ops/hot_remove_network_adapter.yml index 05e26c84e..b5c1be319 100644 --- a/linux/network_device_ops/hot_remove_network_adapter.yml +++ b/linux/network_device_ops/hot_remove_network_adapter.yml @@ -24,5 +24,5 @@ ansible.builtin.assert: that: - network_adapters_after_hotremove | difference(network_adapters_before_hotadd) | length == 0 - fail_msg: "After hot removing the new network adapter, guest OS still can detect it" - success_msg: "The new {{ adapter_type }} adapter interface is removed from guest OS" + fail_msg: "After hot removing the new network adapter from VM {{ vm_name }}, guest OS still can detect it" + success_msg: "The new {{ adapter_type }} adapter interface is removed in guest OS on VM {{ vm_name }}" diff --git a/linux/network_device_ops/network_status_validate.yml b/linux/network_device_ops/network_status_validate.yml index 490da5e91..717a887c0 100644 --- a/linux/network_device_ops/network_status_validate.yml +++ b/linux/network_device_ops/network_status_validate.yml @@ -78,4 +78,4 @@ - ping_success_after_ifup - not ping_success_after_disconnect - ping_success_after_reconnect - fail_msg: "At least one result of ping VLAN gateway is not correct" + fail_msg: "At least one result of ping VLAN gateway is not correct on VM {{ vm_name }}" diff --git a/linux/network_device_ops/pvrdma_network_device_ops.yml b/linux/network_device_ops/pvrdma_network_device_ops.yml index af8a3ffc7..02d3514a9 100644 --- a/linux/network_device_ops/pvrdma_network_device_ops.yml +++ b/linux/network_device_ops/pvrdma_network_device_ops.yml @@ -52,7 +52,7 @@ pvrdma_server_vm_ipv4: "{{ vds_vmk_ip_addr | ansible.utils.ipmath(1) }}" pvrdma_server_vm_net_prefix: "{{ vds_vmk_net_prefix }}" pvrdma_server_vm_gateway: "{{ vds_vmk_ip_addr }}" - pvrdma_client_vm_name: "{{ vm_name }}_{{ timestamp }}" + pvrdma_client_vm_name: "{{ vm_name }}_client_{{ timestamp }}" pvrdma_client_vm_ipv4: "{{ vds_vmk_ip_addr | ansible.utils.ipmath(2) }}" pvrdma_client_vm_guest_ip: "" @@ -125,16 +125,11 @@ ansible.builtin.assert: that: - ping_success_after_hotadd | bool - fail_msg: "Failed to ping gateway from client VM PVRDMA device" + fail_msg: "Failed to ping gateway from PVRDMA device on client VM {{ vm_name }}" - name: "Check PVRDMA device status and reload it if necessary on client VM" include_tasks: check_and_reload_pvrdma.yml - # Switch to server VM - - name: "Switch to server VM" - ansible.builtin.set_fact: - vm_name: "{{ pvrdma_server_vm_name }}" - # rping server VM from client VM - name: "RDMA ping server VM '{{ pvrdma_server_vm_name }}' from client VM '{{ pvrdma_client_vm_name }}'" ansible.builtin.shell: "rping -c -I {{ pvrdma_client_vm_ipv4 }} -a {{ pvrdma_server_vm_ipv4 }} -C 5 -vV" @@ -152,9 +147,15 @@ - rping_server_result.rc is defined - rping_server_result.rc == 0 fail_msg: >- - RDMA pinging server VM from client VM failed. + Failed to run RDMA ping from client VM '{{ pvrdma_client_vm_name }}' + to server VM '{{ pvrdma_server_vm_name }}' failed. Hit error '{{ rping_server_result.stderr | default() }}' + # Switch to server VM + - name: "Switch to server VM" + ansible.builtin.set_fact: + vm_name: "{{ pvrdma_server_vm_name }}" + - name: "Power off the client VM" include_tasks: ../../common/vm_set_power_state.yml vars: