mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-22 02:13:08 +00:00
Tweak setup_tap_static and FreeIPA tests for resolved
This does some of the things suggested by cheimes in https://bugzilla.redhat.com/show_bug.cgi?id=1880628#c24 . It seems to make the replica tests work with resolved, still work with pre-F33 resolving, and not break anything. Also remove the workaround to disable resolved if it's running, as we can now work with it. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
92f5bf90c0
commit
94b47afc53
@ -53,8 +53,6 @@ sub setup_tap_static {
|
||||
assert_script_run "nmcli con up '$connection'";
|
||||
# for debugging
|
||||
assert_script_run "nmcli -t con show '$connection'";
|
||||
# the above doesn't seem to reliably set up resolv.conf, so...
|
||||
clone_host_file "/etc/resolv.conf";
|
||||
}
|
||||
|
||||
sub get_host_dns {
|
||||
|
@ -22,7 +22,6 @@ sub run {
|
||||
$server_mutex = 'replica_ready';
|
||||
}
|
||||
bypass_1691487;
|
||||
assert_script_run "printf 'search domain.local\nnameserver ${server_ip}' > /etc/resolv.conf";
|
||||
# this gets us the name of the first connection in the list,
|
||||
# which should be what we want
|
||||
my $connection = script_output "nmcli --fields NAME con show | head -2 | tail -1";
|
||||
@ -41,15 +40,6 @@ sub run {
|
||||
# do the enrolment
|
||||
if (get_var("FREEIPA_REPLICA")) {
|
||||
# here we're enrolling not just as a client, but as a replica
|
||||
# disable systemd-resolved, it kinda conflicts with FreeIPA's
|
||||
# bind: https://bugzilla.redhat.com/show_bug.cgi?id=1880628
|
||||
unless (script_run "systemctl is-active systemd-resolved.service") {
|
||||
script_run "systemctl stop systemd-resolved.service";
|
||||
script_run "systemctl disable systemd-resolved.service";
|
||||
script_run "rm -f /etc/resolv.conf";
|
||||
script_run "systemctl restart NetworkManager";
|
||||
}
|
||||
|
||||
# install server packages
|
||||
assert_script_run "dnf -y groupinstall freeipa-server", 600;
|
||||
|
||||
@ -58,10 +48,6 @@ sub run {
|
||||
assert_script_run "dnf -y install haveged", 300;
|
||||
assert_script_run 'systemctl start haveged.service';
|
||||
|
||||
# read DNS server IPs from host's /etc/resolv.conf for passing to
|
||||
# ipa-replica-install
|
||||
my @forwards = get_host_dns();
|
||||
|
||||
# configure the firewall
|
||||
for my $service (qw(freeipa-ldap freeipa-ldaps dns)) {
|
||||
assert_script_run "firewall-cmd --permanent --add-service $service";
|
||||
@ -69,10 +55,8 @@ sub run {
|
||||
assert_script_run "systemctl restart firewalld.service";
|
||||
|
||||
# deploy as a replica
|
||||
my $args = "--setup-dns --setup-ca --allow-zone-overlap -U --principal admin --admin-password monkeys123";
|
||||
for my $fwd (@forwards) {
|
||||
$args .= " --forwarder=$fwd";
|
||||
}
|
||||
my ($ip, $hostname) = split(/ /, get_var("POST_STATIC"));
|
||||
my $args = "--ip-address=$ip --setup-dns --auto-forwarders --setup-ca --allow-zone-overlap -U --principal admin --admin-password monkeys123";
|
||||
assert_script_run "ipa-replica-install $args", 1500;
|
||||
|
||||
# enable and start the systemd service
|
||||
|
@ -19,14 +19,6 @@ sub run {
|
||||
# aren't in Modular Server composes)
|
||||
my $extraparams = '';
|
||||
$extraparams = '--enablerepo=fedora' if (get_var("MODULAR"));
|
||||
# disable systemd-resolved, it kinda conflicts with FreeIPA's
|
||||
# bind: https://bugzilla.redhat.com/show_bug.cgi?id=1880628
|
||||
unless (script_run "systemctl is-active systemd-resolved.service") {
|
||||
script_run "systemctl stop systemd-resolved.service";
|
||||
script_run "systemctl disable systemd-resolved.service";
|
||||
script_run "rm -f /etc/resolv.conf";
|
||||
script_run "systemctl restart NetworkManager";
|
||||
}
|
||||
# we need a lot of entropy for this, and we don't care how good
|
||||
# it is, so let's use haveged
|
||||
assert_script_run "dnf ${extraparams} -y install haveged", 300;
|
||||
@ -38,9 +30,6 @@ sub run {
|
||||
# per ab, this gets us more debugging for bind
|
||||
assert_script_run 'mkdir -p /etc/systemd/system/named-pkcs11.service.d';
|
||||
assert_script_run 'printf "[Service]\nEnvironment=OPTIONS=-d5\n" > /etc/systemd/system/named-pkcs11.service.d/debug.conf';
|
||||
# read DNS server IPs from host's /etc/resolv.conf for passing to
|
||||
# ipa-server-install / rolectl
|
||||
my @forwards = get_host_dns();
|
||||
# First install the necessary packages
|
||||
assert_script_run "dnf -y groupinstall freeipa-server", 600;
|
||||
# configure the firewall
|
||||
@ -49,10 +38,7 @@ sub run {
|
||||
}
|
||||
assert_script_run "systemctl restart firewalld.service";
|
||||
# deploy the server
|
||||
my $args = "-U --realm=DOMAIN.LOCAL --domain=domain.local --ds-password=monkeys123 --admin-password=monkeys123 --setup-dns --reverse-zone=2.16.172.in-addr.arpa --allow-zone-overlap";
|
||||
for my $fwd (@forwards) {
|
||||
$args .= " --forwarder=$fwd";
|
||||
}
|
||||
my $args = "-U --auto-forwarders --realm=DOMAIN.LOCAL --domain=domain.local --ds-password=monkeys123 --admin-password=monkeys123 --setup-dns --reverse-zone=2.16.172.in-addr.arpa --allow-zone-overlap";
|
||||
assert_script_run "ipa-server-install $args", 1200;
|
||||
# enable and start the systemd service
|
||||
assert_script_run "systemctl enable ipa.service";
|
||||
|
Loading…
Reference in New Issue
Block a user