-
Notifications
You must be signed in to change notification settings - Fork 209
Improve error reporting in start-servers.php and fix 3.0 servers #856
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
Conversation
This fixes an issue introduced in 0f2e387. Trailing colons causes mongod to incorrectly assume the legacy config file produced by MO is in YAML format. We can work around this by swapping the order of the IPv6 and IPv4 addresses.
scripts/start-servers.php
Outdated
} | ||
|
||
return $result; | ||
} | ||
|
||
function json_decode_or_fail(/* json_decode() args */) |
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.
No variadics for here and the call to json_decode
below? http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
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.
Not until we drop PHP 5.5 compatibility.
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.
"start-servers.php" doesn't have to be PHP 5.5 compatible though...
@@ -47,30 +47,39 @@ function make_ctx($preset, $method = "POST") { | |||
return $ctx; | |||
} | |||
|
|||
function failed($result) { |
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 quite liked the failed, with the print, the "last operation time" and the exit. I would rather see this repurposed than deleted.
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.
Restored in eafc29a.
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 (but with a comment)
scripts/start-servers.php
Outdated
} | ||
|
||
return $result; | ||
} | ||
|
||
function json_decode_or_fail(/* json_decode() args */) |
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.
"start-servers.php" doesn't have to be PHP 5.5 compatible though...
Added variadic args and splat. |
Improves error reporting for failures in
start-servers.php
.Also fixes an issue that prevented 3.0 servers from starting successfully after
bind_ip
was added in 0f2e387 (#850). See SERVER-35705 for more info.