Skip to content

Commit

Permalink
Enable the listen-on option in named.conf on SLES15SP6+
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxuguang committed Feb 27, 2025
1 parent 9877247 commit 54587ed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/virt_autotest/libvirt_isolated_virtual_network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ sub run_test {
virt_autotest::virtual_network_utils::download_network_cfg($vnet_isolated_cfg_name);

#Stop named.service, refer to poo#175287
systemctl("stop named.service") if (is_sle('15+'));
systemctl("stop named.service") if (is_sle('>=15-SP6'));
#Create ISOLATED NETWORK
assert_script_run("virsh net-create vnet_isolated.xml");
save_screenshot;
upload_logs "vnet_isolated.xml";
assert_script_run("rm -rf vnet_isolated.xml");
#Resume named.service, refer to poo#175287
systemctl("start named.service") if (is_sle('15+'));
systemctl("start named.service") if (is_sle('>=15-SP6'));

my ($mac, $model, $affecter, $exclusive, $skip_type);
my $gate = '192.168.127.1'; # This host exists but should not work as a gate in the ISOLATED NETWORK
Expand Down
12 changes: 10 additions & 2 deletions tests/virt_autotest/libvirt_nated_virtual_network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ use version_utils qw(is_sle is_alp);
sub run_test {
my ($self) = @_;

#Enable the listen-on option in named.conf
#For more details, refer to poo#177354
if (is_sle('>=15-SP6') && (get_required_var('TEST_SUITE_NAME') =~ m/(uefi|sev)/i)) {
my $named_conf_file = "/etc/named.conf";
assert_script_run("sed -i 's/#listen-on/listen-on/' $named_conf_file");
systemctl("restart named.service");
}

#Refer to bsc#1214223 more details
record_soft_failure('bsc#1214223 - Failed to attach NAT virtual network interface to guest system') if (is_xen_host && !is_monolithic_libvirtd);
#Download libvirt host bridge virtual network configuration file
Expand All @@ -31,14 +39,14 @@ sub run_test {
die "The default(NAT BASED NETWORK) virtual network does not exist" if (script_run('virsh net-list --all | grep default') != 0 && !is_alp);

#Stop named.service, refer to poo#175287
systemctl("stop named.service") if (is_sle('15+'));
systemctl("stop named.service") if (is_sle('>=15-SP6'));
#Create NAT BASED NETWORK
assert_script_run("virsh net-create vnet_nated.xml");
save_screenshot;
upload_logs "vnet_nated.xml";
assert_script_run("rm -rf vnet_nated.xml");
#Resume named.service, refer to poo#175287
systemctl("start named.service") if (is_sle('15+'));
systemctl("start named.service") if (is_sle('>=15-SP6'));

my ($mac, $model, $affecter, $exclusive, $skip_type);
my $gate = '192.168.128.1';
Expand Down
8 changes: 4 additions & 4 deletions tests/virt_autotest/libvirt_routed_virtual_network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ sub run_test {
my $vnet_routed_clone_cfg_name = "vnet_routed_clone.xml";
virt_autotest::virtual_network_utils::download_network_cfg($vnet_routed_clone_cfg_name);

#Stop named.service ,refer to poo#175287
systemctl("stop named.service") if (is_sle('15+'));
#Stop named.service, refer to poo#175287
systemctl("stop named.service") if (is_sle('>=15-SP6'));
#Create ROUTED NETWORK
assert_script_run("virsh net-create vnet_routed.xml");
assert_script_run("virsh net-create vnet_routed_clone.xml");
save_screenshot;
upload_logs "vnet_routed.xml";
upload_logs "vnet_routed_clone.xml";
assert_script_run("rm -rf vnet_routed.xml vnet_routed_clone.xml");
#Resume named.service ,refer to poo#175287
systemctl("start named.service") if (is_sle('15+'));
#Resume named.service, refer to poo#175287
systemctl("start named.service") if (is_sle('>=15-SP6'));

my ($mac1, $mac2, $model1, $model2, $affecter, $exclusive);
my $target1 = '192.168.130.1';
Expand Down

0 comments on commit 54587ed

Please sign in to comment.