Skip to content

Commit

Permalink
Merge pull request #11375 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-10930-to-enterprise-3.9

[enterprise-3.9] BZ#1601757 - added considerations for using MySQL and PostgreSQL with azure file
  • Loading branch information
Gaurav Nelson committed Aug 5, 2018
2 parents 3bf8e97 + a9952a3 commit 90a47f6
Showing 1 changed file with 35 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,54 @@ $ mount
If the `dir_mode` and `file_mode` permissions are set to `0755`, change the
default value `0755` to `0777` or `0775`. This manual step is required because
the default `dir_mode` and `file_mode` permissions changed from `0777` to `0755`
in {product-title} 3.9. The following examples show configuration files with the
in {product-title} 3.9. The following examples show configuration files with the
changed values.

.Considerations when using MySQL and PostgresSQL with Azure file
* The owner UID of the Azure File mounted directory is different from the UID of a container.
* MySQL containers change the file owner permission in the mounted directory. Because of the mismatch between the owner UID and container process UID, this operation fails. Therefore to run MySQL with Azure File:
** Specify the Azure File mounted directory UID in the `runAsUser` variable in the PV configuration file.
+
[source, yaml]
----
spec:
containers:
...
securityContext:
runAsUser: <mounted_dir_uid>
----
** Specify the container process UID under `mountOptions` in the PV configuration file.
+
[source, yaml]
----
mountOptions:
- dir_mode=0700
- file_mode=0600
- uid=<conatiner_process_uid>
- gid=0
----

* PostgreSQL does not work with Azure file. This is because PostgreSQL requires
hard links in the Azure File directory, and since Azure File does not support
link:https://docs.microsoft.com/en-us/rest/api/storageservices/features-not-supported-by-the-azure-file-service[hard
links] the pod fails to start.

.PV configuration file example
[source,yaml]
----
# azf-pv.yml
# azf-pv.yml
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "azpv"
name: "azpv"
spec:
capacity:
storage: "1Gi"
storage: "1Gi"
accessModes:
- "ReadWriteMany"
azureFile:
azureFile:
secretName: azure-secret
shareName: azftest
shareName: azftest
readOnly: false
mountOptions:
- dir_mode=0777
Expand Down

0 comments on commit 90a47f6

Please sign in to comment.