mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
PR-CI: Restart rpcbind when it blocks kadmin port
Every now and then, a PR-CI job fails because rpcbind blocks the kadmin port 749/UDP and kadmin.service fails to start. When NFS secure port is configured, rpcbind reserves a random low port. A new workaround detects the blocked port and restarts rpcbind.service. See: https://pagure.io/freeipa/issue/7769 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
This commit is contained in:
parent
122f968cee
commit
7434a3299d
@ -160,15 +160,32 @@ def prepare_host(host):
|
||||
host.put_file_contents(env_filename, env_to_script(host.to_env()))
|
||||
|
||||
|
||||
def allow_sync_ptr(host):
|
||||
kinit_admin(host)
|
||||
host.run_command(["ipa", "dnsconfig-mod", "--allow-sync-ptr=true"],
|
||||
raiseonerr=False)
|
||||
def rpcbind_kadmin_workaround(host):
|
||||
"""Restart rpcbind in case it blocks 749/UDP
|
||||
|
||||
See https://pagure.io/freeipa/issue/7769
|
||||
See https://bugzilla.redhat.com/show_bug.cgi?id=1592883
|
||||
"""
|
||||
for _i in range(5):
|
||||
result = host.run_command(['ss', '-ulnp', 'sport', '=', '749'])
|
||||
if 'rpcbind' in result.stdout_text:
|
||||
logger.error("rpcbind blocks 749/UDP, restarting service")
|
||||
host.run_command(['systemctl', 'restart', 'rpcbind.service'])
|
||||
time.sleep(2)
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
def apply_common_fixes(host):
|
||||
prepare_host(host)
|
||||
fix_hostname(host)
|
||||
rpcbind_kadmin_workaround(host)
|
||||
|
||||
|
||||
def allow_sync_ptr(host):
|
||||
kinit_admin(host)
|
||||
host.run_command(["ipa", "dnsconfig-mod", "--allow-sync-ptr=true"],
|
||||
raiseonerr=False)
|
||||
|
||||
|
||||
def backup_file(host, filename):
|
||||
|
Loading…
Reference in New Issue
Block a user