Skip to content

Wpb 27230 add preflight - #5

Open
julialongtin wants to merge 20 commits into
mainfrom
WPB-27230-add_preflight
Open

Wpb 27230 add preflight#5
julialongtin wants to merge 20 commits into
mainfrom
WPB-27230-add_preflight

Conversation

@julialongtin

Copy link
Copy Markdown
Member

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Briefly describe the issue you have solved or implemented with this pull request. If the PR contains multiple issues, use a bullet list.

Causes (Optional)

Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.

Solutions

Briefly describe the solutions you have implemented for the issues explained above.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@Veki301 Veki301 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standard question was it tested :D ?

Comment thread scripts/dns_utils.py
Comment thread scripts/tcp_probe.py Outdated

@sghosh23 sghosh23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR handles multiple responsibilities. Based on my understanding just by going through the changes:

  • Pref-light checks
  • Package restructure
  • Multi-mode CLI dispatcher
  • version reporting
  • Dockerfile
  • TCP probe and DNS utilization

At this point reviewing this PR is not easy and there are lot of questions which i did not ask as i am lacking the context.

First thing first: Is this the right tool for per-flight check. This utility tool has only one specific job.

Comment thread Dockerfile.utility

# Warning: Version restriction here.
RUN apt-get remove rabbitmq-server=3.13.6-1 -y

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the motivation of changing the rabbitmq client configurations?
Feels a complicated process to maintain unless there is a solid reason and if so this can be refactored to a script with proper documentation rather significantly large Dockerfile.

Comment thread scripts/entrypoint.py
CASSANDRA_SERVICE_NAME = os.getenv('CASSANDRA_SERVICE_NAME', '')
CASSANDRA_SERVICE_PORT = int(os.getenv('CASSANDRA_SERVICE_PORT')) if os.getenv('CASSANDRA_SERVICE_PORT') else None

# only import these if there is a cassandra to test.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for the future that one day there wont be any cassandra?
If that's the case I would group the ENV vars together

Comment thread scripts/entrypoint.py
).stdout
data = json.loads(out) if out else {}
if "version" in data:
versions["minio"] = data["version"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the data contain the version? Please check the endpoint doc: https://docs.min.io/aistor/operations/monitoring/healthcheck-probe/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mc admin info might give you what you are looking for!

Comment thread scripts/entrypoint.py
elif args.command == "status":
# Fast path – the Bash alias `status` already prints a table.
# We simply exit with success so the container can be used as a one‑shot check.
sys.exit(0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then i dont understand the point of adding it here

Comment thread scripts/entrypoint.py
cass_versions[f"{ip}:{CASSANDRA_SERVICE_PORT}"] = ver
if cass_versions:
versions["cassandra"] = cass_versions

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prints
"cassandra": {
"192.168.122.31:9042": "-----------------",
"192.168.122.32:9042": "-----------------",
"192.168.122.33:9042": "-----------------"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants