Skip to content

Commit

Permalink
Merge pull request #1221 from rvykydal/bond-rhel-38451
Browse files Browse the repository at this point in the history
Bond rhel 38451
  • Loading branch information
rvykydal authored Jun 24, 2024
2 parents 0679edd + 0e1df1a commit 6f96a65
Show file tree
Hide file tree
Showing 14 changed files with 167 additions and 25 deletions.
14 changes: 14 additions & 0 deletions bindtomac-bond-vlan-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ bond
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0.222 ONBOOT no connection autoconnect false
check_device_config_value bond0 ONBOOT no connection autoconnect false
Expand All @@ -44,6 +46,18 @@ check_device_has_ipv4_address bond0 no
check_device_config_bound_to_mac bond0_slave_1
check_device_config_bound_to_mac bond0_slave_2

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
18 changes: 18 additions & 0 deletions bindtomac-bond2-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KST
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0 ONBOOT no connection autoconnect false
check_device_config_value bond0_slave_1 ONBOOT no connection autoconnect false
Expand All @@ -47,6 +49,22 @@ check_device_config_value bond1_slave_1 ONBOOT yes connection autoconnect __NONE
check_device_config_value bond1_slave_2 ONBOOT yes connection autoconnect __NONE
check_device_connected bond1 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
check_config_exists @KSTEST_NETDEV4@ yes
check_config_exists @KSTEST_NETDEV5@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
check_config_exists @KSTEST_NETDEV4@ no
check_config_exists @KSTEST_NETDEV5@ no
fi

check_device_config_bound_to_mac bond0_slave_1
check_device_config_bound_to_mac bond0_slave_2
check_device_config_bound_to_mac bond1_slave_1
Expand Down
18 changes: 18 additions & 0 deletions bindtomac-bond2-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KST
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0 ONBOOT no connection autoconnect false

Expand Down Expand Up @@ -63,6 +65,22 @@ check_device_config_bound_to_mac bond1_slave_2
# FIXME this doesn't seem to hold for RHEL
check_device_connected bond1 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
check_config_exists @KSTEST_NETDEV4@ yes
check_config_exists @KSTEST_NETDEV5@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
check_config_exists @KSTEST_NETDEV4@ no
check_config_exists @KSTEST_NETDEV5@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
14 changes: 10 additions & 4 deletions bindtomac-bridge-2devs-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,25 @@ else
check_device_has_ipv4_address @KSTEST_NETDEV2@ yes
fi


check_device_config_value bridge1_slave_1 BRIDGE bridge1 connection master bridge1
check_device_config_value bridge1_slave_1 BRIDGE bridge1 connection slave-type bridge

check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

if [ "${platform}" == "rhel8" ]; then
# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
else
# anaconda does create default config file for enslaved device
check_config_exists @KSTEST_NETDEV2@ yes
fi

check_device_config_bound_to_mac bridge0_slave_1
Expand Down
13 changes: 9 additions & 4 deletions bindtomac-bridge-2devs-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

if [ "${platform}" == "rhel8" ]; then
# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
else
# anaconda does create default config file for enslaved device
check_config_exists @KSTEST_NETDEV2@ yes
fi

check_device_config_bound_to_mac bridge0_slave_1
Expand Down
11 changes: 8 additions & 3 deletions bindtomac-bridge-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ else
check_gui_configurations @KSTEST_NETDEV1@ bridge0
fi


%end

%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_connected bridge0 yes
check_device_connected @KSTEST_NETDEV1@ yes
check_device_config_value bridge0_slave_1 BRIDGE bridge0 connection master bridge0
check_device_config_value bridge0_slave_1 BRIDGE bridge0 connection slave-type bridge
check_device_has_ipv4_address bridge0 yes
check_device_has_ipv4_address @KSTEST_NETDEV1@ no

Expand All @@ -51,8 +53,11 @@ check_device_has_ipv4_address @KSTEST_NETDEV1@ no
# check_device_config_value @KSTEST_NETDEV1@ ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge0 ONBOOT no connection autoconnect false
# TODO: failing, file a bug
#check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

check_device_config_bound_to_mac bridge0_slave_1

Expand Down
14 changes: 14 additions & 0 deletions bond-vlan-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ bond
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0.222 ONBOOT no connection autoconnect false
check_device_config_value bond0 ONBOOT no connection autoconnect false
Expand All @@ -41,6 +43,18 @@ check_bond_has_slave bond0 @KSTEST_NETDEV1@ no
check_device_ipv4_address bond0.222 @KSTEST_STATIC_IP@
check_device_has_ipv4_address bond0 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
14 changes: 14 additions & 0 deletions bond-vlan-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ bond
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0.222 ONBOOT no connection autoconnect false
check_device_config_value bond0 ONBOOT no connection autoconnect false
Expand All @@ -45,6 +47,18 @@ check_bond_has_slave bond0 @KSTEST_NETDEV1@ no
check_device_ipv4_address bond0.222 @KSTEST_STATIC_IP@
check_device_has_ipv4_address bond0 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
18 changes: 18 additions & 0 deletions bond2-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KST
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0 ONBOOT no connection autoconnect false
check_device_config_value bond0_slave_1 ONBOOT no connection autoconnect false
Expand All @@ -47,6 +49,22 @@ check_device_config_value bond1_slave_1 ONBOOT yes connection autoconnect __NONE
check_device_config_value bond1_slave_2 ONBOOT yes connection autoconnect __NONE
check_device_connected bond1 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
check_config_exists @KSTEST_NETDEV4@ yes
check_config_exists @KSTEST_NETDEV5@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
check_config_exists @KSTEST_NETDEV4@ no
check_config_exists @KSTEST_NETDEV5@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
18 changes: 18 additions & 0 deletions bond2-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KST
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_config_value bond0 ONBOOT no connection autoconnect false

Expand All @@ -58,6 +60,22 @@ check_device_config_value bond1_slave_2 MASTER bond1 connection master bond1
# FIXME this doesn't seem to hold for RHEL
check_device_connected bond1 no

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
check_config_exists @KSTEST_NETDEV3@ yes
check_config_exists @KSTEST_NETDEV4@ yes
check_config_exists @KSTEST_NETDEV5@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
check_config_exists @KSTEST_NETDEV3@ no
check_config_exists @KSTEST_NETDEV4@ no
check_config_exists @KSTEST_NETDEV5@ no
fi

# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
Expand Down
13 changes: 9 additions & 4 deletions bridge-2devs-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

if [ "${platform}" == "rhel8" ]; then
# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
else
# anaconda does create default config file for enslaved device
check_config_exists @KSTEST_NETDEV2@ yes
fi

# WARNING: this depends on assumption of running %post scripts in order they
Expand Down
8 changes: 4 additions & 4 deletions bridge-2devs-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

if [ "${platform}" == "rhel8" ]; then
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
else
# anaconda does create default config file for enslaved device
check_config_exists @KSTEST_NETDEV2@ yes
fi

# WARNING: this depends on assumption of running %post scripts in order they
Expand Down
8 changes: 4 additions & 4 deletions bridge-2devs.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

if [ "${platform}" == "rhel8" ]; then
if [ "${platform}" == "rhel9" ] || [ "${platform}" == "rhel10" ]; then
check_config_exists @KSTEST_NETDEV2@ yes
else
# RHEL-8-FAILURE: anaconda does not create default config file for enslaved device in RHEL8
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
else
# anaconda does create default config file for enslaved device
check_config_exists @KSTEST_NETDEV2@ yes
fi

# WARNING: this depends on assumption of running %post scripts in order they
Expand Down
11 changes: 9 additions & 2 deletions bridge-httpks.ks.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#test name bridge
# This test differs from bridge-2devs in using ip=dhcp (no dev specification)
%ksappend repos/default.ks

# --onboot=no doesn't make much sense as a use case but we want to test that it works in this test
Expand Down Expand Up @@ -38,6 +39,8 @@ fi
%post

@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"

check_device_connected bridge0 yes
check_device_connected @KSTEST_NETDEV1@ yes
Expand All @@ -51,8 +54,12 @@ check_device_has_ipv4_address @KSTEST_NETDEV1@ no
# check_device_config_value @KSTEST_NETDEV1@ ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge0 ONBOOT no connection autoconnect false
# TODO: failing, file a bug
#check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false

# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

# WARNING: this depends on assumption of running %post scripts in order they
# are defined here
Expand Down

0 comments on commit 6f96a65

Please sign in to comment.