-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add gateway to app server component checking #405
base: v2.x/staging
Are you sure you want to change the base?
Conversation
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
lib/plugin-loader.js
Outdated
if(config.node.mediationLayer && | ||
config.node.mediationLayer.enabled && | ||
config.node.mediationLayer.server){ | ||
requestOptions.host = config.node.mediationLayer.server.hostname |
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.
gatewayHostname, see https://github.com/zowe/zlux-server-framework/blob/v1.x/staging/lib/index.js#L245
lib/plugin-loader.js
Outdated
} | ||
return new Promise((resolve, reject) => { | ||
httpApi.get(requestOptions, (res) => { | ||
const { statusCode } = res; // TODO: Check status code for bad status |
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.
considering the gateway often starts slower than app-server, i think you need some sort of loop w/ timeout here because it's highly likely to fail on the first request.
…framework into bugfix/explorers
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
@@ -959,12 +971,66 @@ PluginLoader.prototype = { | |||
bootstrapLogger.severe(e.message); | |||
resolve(); // We don't want to reject here. Error gets caught down stream | |||
}); | |||
}) | |||
}).then(() => { /* Obtains and stores the endpoints exposed by the agent */ |
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.
Think this comment was meant to be on line 945, line 975 can say the same thing except for API ML
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.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.
Changes have been addressed and this now seems to do what it was supposed to do 👍
I haven't tested it yet, but functionally looks good
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
…framework into bugfix/explorers
lib/plugin-loader.js
Outdated
|
||
const gatewayCheck = () => { | ||
if (Date.now() > end) { | ||
log.warn(`ZWED0045`, this.apimlHost, this.apimlPort); |
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.
2022-04-12 20:34:27.699 <:> me WARN (_zsf.bootstrap,process.js:29) ZWED0036W - Uncaught exception found. Error:
ReferenceError: log is not defined
ZWED0037W - Ending server process due to uncaught exception.
ZWED0050I - Server shutting down, received signal=SIGQUIT
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
…ficient timeout length to connect to the mediation layer Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
…into bugfix/explorers
Signed-off-by: Timothy Gerstel <tgerstel@rocketsoftware.com>
Proposed changes
This PR addresses Issue: [Link to Github issue within https://github.com/zowe/zlux/issues if any]
This PR depends upon the following PRs:
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
Further comments