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

0211 fix remsh #9961

Merged
merged 7 commits into from Feb 13, 2023
Merged

0211 fix remsh #9961

merged 7 commits into from Feb 13, 2023

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Feb 13, 2023

Fixes EMQX-8936

The issue was exposed in a system where there is no compatible SSL dynamic library from the OS.
It failed to start a second remote_console session due to the ps -ef grep pattern included the first remote_console process in the output.
This caused the script to consider that there are two EMQX nodes running, so it had to consult the bootstrap config file to resolve node name and node cookie.
Since remote_console is not a boot command, it did not load the zip package included SSL dynamic libs, hence failed to parse the configs.

This PR included two changes, one fix and two enhancement

  • Fix the grep pattern for ps -ef output lines
  • Read node name and cookie directly from ps -ef output, instead of reading the latest (generated) vm.<time>.args file.
  • Read -kernel ticktime from ps -ef output instead of RPC the live node to get it

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • [~] Added tests for the changes
  • [~] Changed lines covered in coverage report
  • Change log has been added to changes/<version>/(feat|fix)-<PR-id>.en.md and .zh.md files
  • For internal contributor: there is a jira ticket to track this change
  • [~] If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • [~] Schema changes are backward compatible

@zmstone zmstone requested a review from a team as a code owner February 13, 2023 09:59
instead of parsing the generated vm.args file,
because the file might have been deleted
bin/emqx Outdated Show resolved Hide resolved
bin/emqx Outdated Show resolved Hide resolved
bin/emqx Outdated Show resolved Hide resolved
@coveralls
Copy link
Collaborator

coveralls commented Feb 13, 2023

Pull Request Test Coverage Report for Build 4164636620

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.04%) to 80.736%

Files with Coverage Reduction New Missed Lines %
apps/emqx/src/bpapi/emqx_bpapi.erl 1 95.83%
apps/emqx/src/emqx_authentication_config.erl 1 81.25%
apps/emqx/src/emqx_channel.erl 1 87.27%
apps/emqx/src/emqx_cm.erl 1 90.83%
apps/emqx/src/emqx_schema.erl 1 90.91%
apps/emqx_connector/src/emqx_connector_jwt_worker.erl 2 92.54%
apps/emqx/src/emqx_logger_textfmt.erl 2 56.82%
apps/emqx/src/emqx_flapping.erl 3 80.85%
apps/emqx/src/emqx_broker.erl 4 83.15%
apps/emqx/src/emqx_reason_codes.erl 6 93.38%
Totals Coverage Status
Change from base Build 4163497345: 0.04%
Covered Lines: 23704
Relevant Lines: 29360

💛 - Coveralls

@zmstone zmstone marked this pull request as draft February 13, 2023 13:31
@zmstone zmstone marked this pull request as ready for review February 13, 2023 14:21
@zmstone zmstone merged commit 43aab61 into emqx:master Feb 13, 2023
@zmstone zmstone deleted the 0211-fix-remsh branch February 13, 2023 17:20
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.

None yet

3 participants