|
| 1 | +--- |
| 2 | +title: Troubleshoot configuration - Azure Arc-enabled SQL Managed Instance |
| 3 | +description: Describes how to troubleshoot configuration. Includes steps to provide configuration files for Azure Arc-enabled SQL Managed Instance Azure Arc-enabled data services |
| 4 | +author: MikeRayMSFT |
| 5 | +ms.author: mikeray |
| 6 | +ms.topic: troubleshooting-general |
| 7 | +ms.date: 04/10/2023 |
| 8 | +--- |
| 9 | + |
| 10 | +# User-provided configuration files |
| 11 | + |
| 12 | +Arc data services provide management of configuration settings and files in the system. Configuration files such as `mssql.conf`, `mssql.json`, `krb5.conf` are generated by the system using the user-provided settings in the custom resource spec as well as some system-determined settings. The scope of what settings are supported and what changes can be made to the configuration files using the custom resource spec evolves over time. You may need to try changes in the configuration files that are not possible through the settings on the custom resource spec. |
| 13 | + |
| 14 | +To alleviate this problem, Arc data services allow you to to provide configuration file content for a selected set of files through a Kubernetes `ConfigMap`. The information in the `ConfigMap` effectively overrides the file content that the system would have otherwise generated. This allows you to try some scenarios that may not be possible through the spec today. |
| 15 | + |
| 16 | +For Arc SQL Managed Instance, the supported configuration files that can be overridden using this method are: |
| 17 | +- `mssql.conf` |
| 18 | +- `mssql.json` |
| 19 | +- `krb5.conf` |
| 20 | + |
| 21 | +## Steps to provide override configuration files |
| 22 | + |
| 23 | +### 1. Prepare the content of the configuration file |
| 24 | +Prepare the content of the file that you would like to provide an override for. |
| 25 | + |
| 26 | +### 2. Create a `ConfigMap` |
| 27 | + |
| 28 | +Create a `ConfigMap` spec to store the content of the configuration file. The key in the `ConfigMap` dictionary should be the name of the file, and the value should be the content. |
| 29 | +You can provide file overrides for multiple configuration files in one `ConfigMap`. |
| 30 | +The `ConfigMap` must be in the same namespace as the SQL Managed Instance. |
| 31 | + |
| 32 | +The following spec shows an example of how to provide an override for mssql.conf file: |
| 33 | + |
| 34 | +```json |
| 35 | +apiVersion: v1 |
| 36 | +kind: ConfigMap |
| 37 | +metadata: |
| 38 | + name: sqlmifo-cm |
| 39 | + namespace: test |
| 40 | +data: |
| 41 | + mssql.conf: "[language]\r\nlcid = 1033\r\n\r\n[licensing]\r\npid = GeneralPurpose\r\n\r\n[network]\r\nforceencryption = 0\r\ntlscert = /var/run/secrets/managed/certificates/mssql/mssql-certificate.pem\r\ntlsciphers = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384\r\ntlskey = /var/run/secrets/managed/certificates/mssql/mssql-privatekey.pem\r\ntlsprotocols = 1.2\r\n\r\n[sqlagent]\r\nenabled = False\r\n\r\n[telemetry]\r\ncustomerfeedback = false\r\n\r\n" |
| 42 | +``` |
| 43 | + |
| 44 | +Apply the `ConfigMap` in Kubernetes using `kubectl apply -f <filename>`. |
| 45 | + |
| 46 | +### 3. Provide the name of the ConfigMap in SQL Managed Instance spec |
| 47 | + |
| 48 | +In SQL Managed Instance spec, provide the name of the ConfigMap in the field `spec.fileOverrideConfigMap`. |
| 49 | +The SQL Managed Instance `apiVersion` must be at least v12 (released in April 2023). |
| 50 | + |
| 51 | +The following SQL Managed Instance spec shows an example of how to provide the name of the ConfigMap. |
| 52 | + |
| 53 | +```json |
| 54 | +apiVersion: sql.arcdata.microsoft.com/v12 |
| 55 | +kind: SqlManagedInstance |
| 56 | +metadata: |
| 57 | + name: sqlmifo |
| 58 | + namespace: test |
| 59 | +spec: |
| 60 | + fileOverrideConfigMap: sqlmifo-cm |
| 61 | + ... |
| 62 | +``` |
| 63 | + |
| 64 | +Apply the SQL Managed Instance spec in Kubernetes. This will lead to the delivery of the provided configuration files to Arc SQL Managed Instance container. |
| 65 | + |
| 66 | +### 4. Check that the files are downloaded in the arc-sqlmi container. |
| 67 | +The locations of supported files in the container are as follows: |
| 68 | +1. mssql.conf: /var/run/config/mssql/mssql.conf |
| 69 | +1. mssql.json: /var/run/config/mssql/mssql.json |
| 70 | +1. krb5.conf: /etc/krb5.conf |
| 71 | + |
| 72 | + |
| 73 | +## Next steps |
| 74 | + |
| 75 | +[Get logs to troubleshoot Azure Arc-enabled data services](troubleshooting-get-logs.md) |
0 commit comments