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

Modifying regex pattern to accurately retrieve MINIO endpoint based on pid #89

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dss_metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ def get_minio_endpoint_from_process(pid, logger):
stdout=subprocess.PIPE
)
minio_cmd = proc.stdout.read().decode("utf-8")
endpts_found = re.findall("--address(.*?)/", minio_cmd)
endpts_found = re.findall("--address(.*?)(?:http|/)", minio_cmd)
if endpts_found:
minio_endpoint = endpts_found[0].rstrip('\x00').strip('\x00')
minio_endpoint = endpts_found[0].rstrip('\x00').strip('\x00').strip(' ')
else:
logger.error("Unable to find MINIO Endpt from MINIO process")
raise ValueError("Unable to find MINIO Endpt from MINIO process")
Expand Down