Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a volume mount for the mongosh home directory to resolve permission issues when performing physical restores in OpenShift. The change addresses warnings that occur when mongosh attempts to create directories in /.mongodb without proper write permissions.
- Adds a new emptyDir volume named "mongosh" mounted at
/.mongodbfor operator version 1.21.0+ - Updates container configuration to include the new mongosh home directory mount
- Updates all E2E test comparison files to include the new volume mount
Reviewed Changes
Copilot reviewed 182 out of 182 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/psmdb/config/const.go | Defines constants for mongosh volume name and mount path |
| pkg/psmdb/statefulset.go | Adds mongosh volume to StatefulSet volumes for version 1.21.0+ |
| pkg/psmdb/container.go | Adds mongosh volume mount to container configuration for version 1.21.0+ |
| e2e-tests//compare/.yml | Updates test comparison files to include new mongosh volume configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| name: config | ||
| - mountPath: /opt/percona | ||
| name: bin | ||
| - mountPath: /.mongod |
There was a problem hiding this comment.
The mount path should be /.mongodb to match the constant MongoshHomeMountPath, not /.mongod.
| - mountPath: /.mongod | |
| - mountPath: /.mongodb |
There was a problem hiding this comment.
what an useful bot you are
| name: config | ||
| - mountPath: /opt/percona | ||
| name: bin | ||
| - mountPath: /.mongod |
There was a problem hiding this comment.
The mount path should be /.mongodb to match the constant MongoshHomeMountPath, not /.mongod.
| - mountPath: /.mongod | |
| - mountPath: /.mongodb |
394b0cb to
bd157fb
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 191 out of 191 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -49,7 +49,17 @@ func container(ctx context.Context, cr *api.PerconaServerMongoDB, replset *api.R | |||
| } | |||
|
|
|||
| if cr.CompareVersion("1.14.0") >= 0 { | |||
There was a problem hiding this comment.
why dont we remove this compare statement for 1.14? I think we dont support it anymore.
There was a problem hiding this comment.
it's a last minute fix for the release, let's not make changes other than what's absolutely necessary
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 220 out of 220 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* K8SPSMDB-1496: Add volume for mongosh homedir * fix unit tests * update compare files * bump k8s version * fix upgrade-consistency * fix more compare files * fix upgrade tests * fix upgrade-consistency-sharded-tls --------- Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
CHANGE DESCRIPTION
When a physical restore is performed in Openshift, we get the following
Warning due to lack of permissions to write in /.mongod folder. This causes Operator to malfunction and don’t get the true result fromdb.hello().isWritablePrimaryCHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability