Skip to content

Commit

Permalink
Make virtual device ports persistent connection check platform specific
Browse files Browse the repository at this point in the history
Limit to Fedora until the change gets to RHEL.
On rhel8 the new behavior used to be present as a failure.
  • Loading branch information
rvykydal committed Jun 23, 2024
1 parent 8b2c651 commit dfc9eb5
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 15 deletions.
14 changes: 11 additions & 3 deletions bindtomac-bridge-2devs-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,17 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE
check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
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
fi

check_device_config_bound_to_mac bridge0_slave_1
check_device_config_bound_to_mac bridge1_slave_1
Expand Down
16 changes: 14 additions & 2 deletions bindtomac-bridge-2devs-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ bridge0 bridge1
%post

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

# bridge0

Expand Down Expand Up @@ -75,8 +77,18 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
# 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
fi

check_device_config_bound_to_mac bridge0_slave_1
check_device_config_bound_to_mac bridge1_slave_1
Expand Down
4 changes: 3 additions & 1 deletion bindtomac-bridge-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ check_device_has_ipv4_address @KSTEST_NETDEV1@ no
check_device_config_value bridge0 ONBOOT no connection autoconnect false
check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi

check_device_config_bound_to_mac bridge0_slave_1

Expand Down
16 changes: 13 additions & 3 deletions bridge-2devs-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ bridge0 bridge1
%post

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

# bridge0

Expand Down Expand Up @@ -77,9 +79,17 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE
check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes
# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
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
fi

# WARNING: this depends on assumption of running %post scripts in order they
# are defined here
Expand Down
11 changes: 9 additions & 2 deletions bridge-2devs-pre.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ bridge0 bridge1
%post

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

# bridge0

Expand Down Expand Up @@ -75,8 +77,13 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
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
fi

# WARNING: this depends on assumption of running %post scripts in order they
# are defined here
Expand Down
11 changes: 9 additions & 2 deletions bridge-2devs.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ bridge0 bridge1
%post

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

# bridge0

Expand Down Expand Up @@ -74,8 +76,13 @@ check_device_config_value bridge1 ONBOOT yes connection autoconnect __NONE

check_device_config_value bridge1_slave_1 ONBOOT yes connection autoconnect __NONE

# Since RHEL-38451 don't create default persistent connection for ports/slaves
check_config_exists @KSTEST_NETDEV2@ no
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
fi

# WARNING: this depends on assumption of running %post scripts in order they
# are defined here
Expand Down
6 changes: 4 additions & 2 deletions bridge-httpks.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ check_device_has_ipv4_address @KSTEST_NETDEV1@ no

check_device_config_value bridge0 ONBOOT no connection autoconnect false
check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
# Configuration from boot options
check_config_exists @KSTEST_NETDEV1@ yes

# 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 dfc9eb5

Please sign in to comment.