-
Notifications
You must be signed in to change notification settings - Fork 252
Improved logging and Replica set compatibility #1097
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
config.json
Outdated
| "database": "metadata" | ||
| }, | ||
| "log": { | ||
| "logLevel": "trace" |
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 should not be trace
lib/metadata/mongoclient/backend.js
Outdated
| MongoClient.connect(mongoUrl, (err, client) => { | ||
| if (err) { | ||
| throw (errors.InternalError); | ||
| throw (err); |
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 good here: We should log.error(err.message) (or similar field) and return errors.InternalError
lib/metadata/mongoclient/backend.js
Outdated
| 'attributes to metastore', | ||
| { error: err }); | ||
| throw (errors.InternalError); | ||
| throw (err); |
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.
Same for all errors ...
5409486 to
5e0c6b5
Compare
|
PR has been updated. Reviewers, please be cautious. |
5e0c6b5 to
8e4b5ba
Compare
1e45272 to
250283c
Compare
250283c to
7dbcd4b
Compare
lib/metadata/mongoclient/backend.js
Outdated
| // initialize this backend | ||
| MongoClient.connect(mongoUrl, (err, client) => { | ||
| if (err) { | ||
| this.logger.error('error connecting to mongo server', err); |
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.
For werelogs logging, the pattern is to have the second argument as an object containing additional information. For example, ...mongo server', { error: err });. I guess I would assume we should maintain that for these changes as well?
dfbb3ac to
1848025
Compare
|
Hello @bennettbuchanan "r+": Success |
|
There is already a pending pull request on the same branch |
|
⌛ PR is now pending. CI build url: http://ci.ironmann.io/gh/scality/Integration/18941 |
1848025 to
7204ac7
Compare
|
Didn't realize I had some linting issues. Fixed the issues and should be okay now. |
|
Hello @bennettbuchanan "r+": Failure: Pull request isn't approved |
|
Hello @bennettbuchanan "r+": Failure: Pull request isn't approved |
|
@ironman-machine try |
|
Hello @bennettbuchanan "try": Success: Try build successfully launched on 'http://ci.ironmann.io/gh/scality/Integration/18946' with the following env. args: {
"SCALITY_INTEGRATION_BRANCH": "ultron/master",
"REPO_NAME": "S3",
"DEFAULT_BRANCH": "master",
"SCALITY_S3_BRANCH": "ft/kub-mongo"
} |
|
☀️ 👍 circleCI test succeeded! |
|
Failing the awssdk tests. Will make the necessary changes. |
7204ac7 to
ca741bf
Compare
ca741bf to
acf5473
Compare
lib/metadata/mongoclient/backend.js
Outdated
| upsert: true, | ||
| }, () => cb()); | ||
| }, err => { | ||
| log.error('putObjectNoVer: error putting obect with no versioning', |
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.
This line is causing error ""Cannot read property 'message' of null", needs an if (err) statement
acf5473 to
c162c49
Compare
c162c49 to
d195267
Compare
|
Hello @vrancurel "r+": Failure: Pull request isn't approved |
|
Hello @LaurenSpiegel "r+": Failure: Pull request isn't approved |
|
Hello @LaurenSpiegel "r+": Success |
|
There is already a pending pull request on the same branch |
|
@ironman-machine try |
|
Hello @LaurenSpiegel "try": Success: Try build successfully launched on 'http://ci.ironmann.io/gh/scality/Integration/18998' with the following env. args: {
"SCALITY_INTEGRATION_BRANCH": "ultron/master",
"REPO_NAME": "S3",
"DEFAULT_BRANCH": "master",
"SCALITY_S3_BRANCH": "ft/kub-mongo"
} |
|
⌛ PR is now pending. CI build url: http://ci.ironmann.io/gh/scality/Integration/19001 |
|
☀️ 👍 circleCI test succeeded! |
This allows for replica sets to be defined and used as the metadata backends