Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport][ipa-4-7] Increase debugging for blocked port 749 and 464 #2608

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 17 additions & 3 deletions ipatests/pytest_ipa/integration/tasks.py
Expand Up @@ -161,15 +161,29 @@ def prepare_host(host):


def rpcbind_kadmin_workaround(host):
"""Restart rpcbind in case it blocks 749/UDP
"""Restart rpcbind in case it blocks 749/TCP, 464/UDP, or 464/TCP

See https://pagure.io/freeipa/issue/7769
See https://bugzilla.redhat.com/show_bug.cgi?id=1592883
"""
cmd = [
'ss',
'--all', # listening and non-listening sockets
'--tcp', '--udp', # only TCP and UDP sockets
'--numeric', # don't resolve host and service names
'--processes', # show processes
]
# run once to list all ports for debugging
host.run_command(cmd)
# check for blocked kadmin port
cmd.extend((
'-o', 'state', 'all', # ports in any state, not just listening
'( sport = :749 or dport = :749 or sport = :464 or dport = :464 )'
))
for _i in range(5):
result = host.run_command(['ss', '-ulnp', 'sport', '=', '749'])
result = host.run_command(cmd)
if 'rpcbind' in result.stdout_text:
logger.error("rpcbind blocks 749/UDP, restarting service")
logger.error("rpcbind blocks 749, restarting")
host.run_command(['systemctl', 'restart', 'rpcbind.service'])
time.sleep(2)
else:
Expand Down