-
Notifications
You must be signed in to change notification settings - Fork 5
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
The config importer [will minimize the issue] #79
Conversation
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, just a few minor comments 😁
dashboard-visualiser-kibana/swarm.sh
Outdated
@@ -42,6 +42,22 @@ configure_nginx() { | |||
fi | |||
} | |||
|
|||
AwaitServiceTojoinNetwork() { |
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.
If we're going to implement this function in a few places, it's probably worth writing this into a utility function and inserting that in config-utils.sh.
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.
Yea yea you're right 👍
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.
Please remove this function, it's no longer referenced
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, just two minor comments
dashboard-visualiser-kibana/swarm.sh
Outdated
@@ -42,6 +42,22 @@ configure_nginx() { | |||
fi | |||
} | |||
|
|||
AwaitServiceTojoinNetwork() { |
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.
Please remove this function, it's no longer referenced
utils/config-utils.sh
Outdated
local start_time=$(date +%s) | ||
local exit_time=30 | ||
local warning_time=10 | ||
local timer=0 |
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.
Unreferenced variable
local timer=0 |
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.
Nice catch man
config::await_network_join() { | ||
echo "Waiting for elasticsearch service to join network..." | ||
|
||
local -r SERVICE_NAME="${1:?"FATAL: await_service_removed SERVICE_NAME not provided"}" |
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.
Nice one!
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
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 just one comment.
It turns out that the elasticsearch service will join the network after some time.
An error ENOTFOUND will occur if the config importer send the config before elasticsearch join the network.
So, we added a loop that will wait for elasticsearch to join the network.
With this fix, the config importer issue will not occur again.
But, with this fix the code will exit with error and the config importer will not be executed.
This issue still rarely exists with elasticsearch and other services as well.