From 1c263167d84091cdb5e6aae836d3d67ee6272aa6 Mon Sep 17 00:00:00 2001 From: "psklenar@redhat.com" Date: Tue, 18 Feb 2025 11:48:30 +0100 Subject: [PATCH] debug log --- Smoke/IpaInstallAndStart/test.sh | 27 +++++++++++---------------- plans/bind/ipa.fmf | 4 +++- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Smoke/IpaInstallAndStart/test.sh b/Smoke/IpaInstallAndStart/test.sh index bce17ac..bfbf566 100755 --- a/Smoke/IpaInstallAndStart/test.sh +++ b/Smoke/IpaInstallAndStart/test.sh @@ -20,7 +20,7 @@ REALM=IPA.TEST fetch_local_ipv4() { - IP4=`ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'` + IP4=`ip address | awk '$1 == "inet" { print $2 }' | cut -d/ -f1 | grep -v '^127\.'| tail -n1` } prepareIpaServer() @@ -33,21 +33,12 @@ prepareIpaServer() rlRun "dnf -y install freeipa-server-dns" ORIG_HOSTNAME=${HOSTNAME} # there is longer name at AWS, more than 64char - #hostnamectl set-hostname ipa.ipa #echo '127.0.0.1 ipa.ipa' >> /etc/hosts - HOSTNAME=`hostname|tail -n1` -# not needed after change ^ - if echo $HOSTNAME | grep '\.' - then - rlLog "Using full hostname $HOSTNAME" - else - IP4=`fetch_local_ipv4` - HOSTNAME=`dig +short -x ${IP4}` - HOSTNAME="${HOSTNAME%.}" - ORIG_HOSTNAME=${HOSTNAME} - HOSTNAME=primary.ipa.test - rlRun "hostname ${HOSTNAME}" 0 "Resetting machine hostname to $HOSTNAME" - fi + HOSTNAME='petr.svetr' + hostnamectl hostname petr.svetr + IP4=`fetch_local_ipv4` + hostname ${HOSTNAME} + if ! ipactl status then if ! grep ${HOSTNAME} /etc/hosts @@ -55,7 +46,7 @@ prepareIpaServer() # getent hosts ${HOSTNAME} >> /etc/hosts echo "${IP4} ${HOSTNAME} ${ORIG_HOSTNAME}" >> /etc/hosts fi - rlRun "ipa-server-install -U --hostname ${HOSTNAME} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" + rlRun "ipa-server-install -U --hostname ${HOSTNAME} --ip-address ${IP4} -n ${DOMAIN} -r ${REALM} --setup-dns -p ${DM_SECRET} -a ${ADMIN_SECRET} --auto-forwarders" fi } @@ -86,6 +77,8 @@ rlJournalStart rlPhaseEnd rlPhaseStartSetup "Prepare IPA" + rlFileBackup /etc/hosts + echo '' > /etc/hosts prepareIpaServer rpm -qa | grep bind > pkgs rlLog "`cat pkgs`" @@ -120,6 +113,7 @@ rlJournalStart grep _______________end ipa-server-install --uninstall --unattended killall named + rlFileRestore systemctl daemon-reload rlServiceStop systemctl stop named @@ -128,6 +122,7 @@ rlJournalStart rlRun "rm -f $rlRun_LOG" rlRun "popd" rlRun "hostname ${ORIG_HOSTNAME}" + rlRun "hostnamectl hostname ${ORIG_HOSTNAME}" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText diff --git a/plans/bind/ipa.fmf b/plans/bind/ipa.fmf index 9779c9f..5bc04d7 100644 --- a/plans/bind/ipa.fmf +++ b/plans/bind/ipa.fmf @@ -6,6 +6,8 @@ url: "https://src.fedoraproject.org/tests/bind.git" provision: hardware: - memory: ">= 6 GB" + memory: ">= 6 GB" + cpu: + processors: ">= 4" execute: how: tmt