-
Notifications
You must be signed in to change notification settings - Fork 9
feat(mongodb-runner): usability improvements for drivers DRIVERS-3335 #603
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
base: main
Are you sure you want to change the base?
Conversation
| await cluster.updateDefaultConnectionOptions({ | ||
| serverApi: String(options.requireApiVersion) as '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.
I'd suggest putting this in a separate method, like we did for addAuthIfNeeded()
| if (buildInfoError) { | ||
| debug('failed to get buildInfo', buildInfoError); | ||
| } | ||
| } |
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 a keyfile is being used, wouldn't we want to use it for authentication?
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, when a keyFile is present you can't do anything on the server until a user has been added to the primary.
| return true; | ||
| } | ||
| // If the server does not support auth, just get the build info without | ||
| // setting the metadata. |
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.
Which scenario is this intended to cover? buildInfo is behind auth on newer server versions
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 covers arbiters after authentication has been added to the replica set (their behavior is a bit weird), I'll update the comment.
Description
keyFile: read/write cannot occur until user is added, and can never be done on an arbiterrequireApiVersion, which must be applied after the cluster has started and update the default connection options.argsto be passed as part of the config file.Tested with:
We didn't need to add extra support for unix sockets, instead we pass in the unix socket prefix.
I couldn't think of an elegant way to let
mongodb-runnermanage thekeyFile, perhaps a new top level argumentkeyFileContent?Open Questions
Checklist