|
| 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. The system generates configuration files such as `mssql.conf`, `mssql.json`, `krb5.conf` using the user-provided settings in the custom resource spec and 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 aren't possible through the settings on the custom resource spec. |
| 13 | + |
| 14 | +To alleviate this problem, you can 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 content allows you to try some configuration settings. |
| 15 | + |
| 16 | +For Arc SQL Managed Instance, the supported configuration files that you can override using this method are: |
| 17 | + |
| 18 | +- `mssql.conf` |
| 19 | +- `mssql.json` |
| 20 | +- `krb5.conf` |
| 21 | + |
| 22 | +## Steps to provide override configuration files |
| 23 | + |
| 24 | +1. Prepare the content of the configuration file |
| 25 | + |
| 26 | + Prepare the content of the file that you would like to provide an override for. |
| 27 | + |
| 28 | +1. Create a `ConfigMap` |
| 29 | + |
| 30 | + 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. |
| 31 | + |
| 32 | + You can provide file overrides for multiple configuration files in one `ConfigMap`. |
| 33 | + |
| 34 | + The `ConfigMap` must be in the same namespace as the SQL Managed Instance. |
| 35 | + |
| 36 | + The following spec shows an example of how to provide an override for mssql.conf file: |
| 37 | + |
| 38 | + ```json |
| 39 | + apiVersion: v1 |
| 40 | + kind: ConfigMap |
| 41 | + metadata: |
| 42 | + name: sqlmifo-cm |
| 43 | + namespace: test |
| 44 | + data: |
| 45 | + 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" |
| 46 | + ``` |
| 47 | + |
| 48 | + Apply the `ConfigMap` in Kubernetes using `kubectl apply -f <filename>`. |
| 49 | + |
| 50 | +1. Provide the name of the ConfigMap in SQL Managed Instance spec |
| 51 | + |
| 52 | + In SQL Managed Instance spec, provide the name of the ConfigMap in the field `spec.fileOverrideConfigMap`. |
| 53 | + |
| 54 | + The SQL Managed Instance `apiVersion` must be at least v12 (released in April 2023). |
| 55 | + |
| 56 | + The following SQL Managed Instance spec shows an example of how to provide the name of the ConfigMap. |
| 57 | + |
| 58 | + ```json |
| 59 | + apiVersion: sql.arcdata.microsoft.com/v12 |
| 60 | + kind: SqlManagedInstance |
| 61 | + metadata: |
| 62 | + name: sqlmifo |
| 63 | + namespace: test |
| 64 | + spec: |
| 65 | + fileOverrideConfigMap: sqlmifo-cm |
| 66 | + ... |
| 67 | + ``` |
| 68 | + |
| 69 | + Apply the SQL Managed Instance spec in Kubernetes. This action leads to the delivery of the provided configuration files to Arc SQL Managed Instance container. |
| 70 | + |
| 71 | +1. Check that the files are downloaded in the `arc-sqlmi` container. |
| 72 | + |
| 73 | + The locations of supported files in the container are: |
| 74 | + |
| 75 | + - `mssql.conf`: `/var/run/config/mssql/mssql.conf` |
| 76 | + - `mssql.json`: `/var/run/config/mssql/mssql.json` |
| 77 | + - `krb5.conf`: `/etc/krb5.conf` |
| 78 | + |
| 79 | +## Next steps |
| 80 | + |
| 81 | +[Get logs to troubleshoot Azure Arc-enabled data services](troubleshooting-get-logs.md) |
0 commit comments