Fix DNS config in realmd_join_sssd and realmd_join_cockpit
Seems what they had before worked until systemd-resolved became the default; now we need to make sure we do nmcli mod and then bring the connection down and up, as we do in tapnet.pm. Writing to resolv.conf is kinda "wrong" for resolved but I don't think it really breaks anything so I think I'll just leave those bits in until F32 goes EOL just in case they're still somehow needed on F31 or F32. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
f69e627dc3
commit
c2e7ddba45
@ -11,6 +11,12 @@ sub run {
|
|||||||
# use FreeIPA server as DNS server
|
# use FreeIPA server as DNS server
|
||||||
bypass_1691487;
|
bypass_1691487;
|
||||||
assert_script_run "printf 'search domain.local\nnameserver 172.16.2.100' > /etc/resolv.conf";
|
assert_script_run "printf 'search domain.local\nnameserver 172.16.2.100' > /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";
|
||||||
|
assert_script_run "nmcli con mod '$connection' ipv4.dns '172.16.2.100'";
|
||||||
|
assert_script_run "nmcli con down '$connection'";
|
||||||
|
assert_script_run "nmcli con up '$connection'";
|
||||||
# wait for the server to be ready (do it now just to make sure name
|
# wait for the server to be ready (do it now just to make sure name
|
||||||
# resolution is working before we proceed)
|
# resolution is working before we proceed)
|
||||||
mutex_lock "freeipa_ready";
|
mutex_lock "freeipa_ready";
|
||||||
|
@ -27,6 +27,9 @@ sub run {
|
|||||||
# which should be what we want
|
# which should be what we want
|
||||||
my $connection = script_output "nmcli --fields NAME con show | head -2 | tail -1";
|
my $connection = script_output "nmcli --fields NAME con show | head -2 | tail -1";
|
||||||
assert_script_run "nmcli con mod '$connection' ipv4.dns '$server_ip'";
|
assert_script_run "nmcli con mod '$connection' ipv4.dns '$server_ip'";
|
||||||
|
assert_script_run "nmcli con down '$connection'";
|
||||||
|
assert_script_run "nmcli con up '$connection'";
|
||||||
|
|
||||||
# wait for the server or replica to be ready (do it now just to be
|
# wait for the server or replica to be ready (do it now just to be
|
||||||
# sure name resolution is working before we proceed)
|
# sure name resolution is working before we proceed)
|
||||||
mutex_lock $server_mutex;
|
mutex_lock $server_mutex;
|
||||||
|
Loading…
Reference in New Issue
Block a user