diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-05 03:14:17 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-05 03:14:17 +0000 |
commit | 81e7cd9b45883ec5a4c971b33aefcf15a6d427bd (patch) | |
tree | f7e0a8142a11924708c6df1a071253c56d5f8cb1 /hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch | |
parent | 0fa696bda0f73911bdc7b68578708331301a4d5e (diff) |
automatic import of hyperv-daemonsopeneuler24.03_LTS
Diffstat (limited to 'hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch')
-rw-r--r-- | hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch b/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch new file mode 100644 index 0000000..4f933f9 --- /dev/null +++ b/hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch @@ -0,0 +1,46 @@ +From 74730b2187402e29c3c6b4074eae945b7614d1dc Mon Sep 17 00:00:00 2001 +From: Mohammed Gamal <mgamal@redhat.com> +Date: Tue, 8 Nov 2022 16:20:17 +0100 +Subject: [PATCH 1/3] redhat: hv_set_if_config: Workaround for gateway + numbering in NetworkManager + +RH-Author: Mohamed Gamal Morsy <mmorsy@redhat.com> +RH-MergeRequest: 4: redhat: hv_set_if_config: Workaround for gateway numbering in NetworkManager +RH-Bugzilla: 2122115 +RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com> +RH-Acked-by: Cathy Avery <cavery@redhat.com> +RH-Commit: [1/1] 5fef25a723094255f3cb25beaa4e18f1ec9d339f + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2122115 + +Unlike older sysconfig scripts, NetworkManager expects GATEWAYx=ipaddr for all values of x. +So the first gateway is GATEWAY0 instead of GATEWAY. Other values should remain unchanged. +Workaround this by replacing GATEWAY= with GATEWAY0=. + +A proper fix however, would be to generate NetworkManager keyfiles instead of ifcfg files. +That can be done eitter by changing hypervkvpd code to do that or to let the script parse +ifcfg files and generate corresponding NetworkManager keyfiles + +Signed-off-by: Mohammed Gamal <mgamal@redhat.com> +--- + hv_set_ifconfig.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/hv_set_ifconfig.sh b/hv_set_ifconfig.sh +index 146829b..fe7fccf 100644 +--- a/hv_set_ifconfig.sh ++++ b/hv_set_ifconfig.sh +@@ -54,6 +54,10 @@ echo "IPV6INIT=yes" >> $1 + echo "PEERDNS=yes" >> $1 + echo "ONBOOT=yes" >> $1 + ++#Unlike older sysconfig scripts, NetworkManager expects GATEWAYx=ipaddr for all values of x. ++#So the first gateway is GATEWAY0 instead of GATEWAY. Other values should remain unchanged. ++#Workaround this by replacing GATEWAY= with GATEWAY0=. ++sed -i "s/GATEWAY=/GATEWAY0=/" $1 + + cp $1 /etc/sysconfig/network-scripts/ + +-- +2.31.1 + |