-
Notifications
You must be signed in to change notification settings - Fork 85
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
Replace Daemon Communication Mechanism #1308
Conversation
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Codecov Report
@@ Coverage Diff @@
## next #1308 +/- ##
==========================================
- Coverage 91.43% 91.39% -0.04%
==========================================
Files 369 369
Lines 5742 5752 +10
Branches 822 826 +4
==========================================
+ Hits 5250 5257 +7
- Misses 486 489 +3
Partials 6 6
Continue to review full report at Codecov.
|
This reverts commit fbe581a. Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
…s-timothy Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
90ee1d1
to
f740a97
Compare
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
this.startServer = true; | ||
|
||
if (process.env.ZOWE_DAEMON) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think our default values for named pipe or domain socket is less likely to conflict with something that the user is already using than the old port number. Another small benefit for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It definitely is. While it probably won't be used often, we've left the environment variable in place because it can be used to override where the socket file is being placed in a *nix environment. Ideally, the socket will be located at .zowe-daemon.sock in the user's home directory, but it can be moved in case the environment is strange and a problem occurs (i.e. a user logged into multiple workstations, all of which share the same user home directory on an NFS share.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/cli/__tests__/daemon/__unit__/DaemonDecider.unit.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Will review again once the mechanism's behavior is confirmed in Unix
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
…s-timothy Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
process.on(eventType, this.close.bind(this, true)); | ||
}); | ||
|
||
this.mServer.maxConnections = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will have to remember this when we are tasked with operating in a multi-tenant environment, but this seems like good way to solve today's problem.
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Kudos, SonarCloud Quality Gate passed! |
Changes the Daemon communication mechanism from port based communication to socket and named pipe based communication, allowing for the use of file permissions as an access control mechanism.