Skip to content

Commit e3c05c1

Browse files
authored
Adding documentation for common challenges and solutions (#1940)
List of common challenges and their solutions
1 parent 21c219e commit e3c05c1

File tree

1 file changed

+219
-0
lines changed

1 file changed

+219
-0
lines changed

README.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ See [contributing instructions](CONTRIBUTING.md) to help improve this project.
9898
* [`validate-groups-membership` command](#validate-groups-membership-command)
9999
* [`cluster-remap` command](#cluster-remap-command)
100100
* [`revert-cluster-remap` command](#revert-cluster-remap-command)
101+
* [Common Challenges and the Solutions](#common-challenges-and-the-solutions)
102+
* [Network Connectivity Issues](#network-connectivity-issues)
103+
* [Insufficient Privileges](#insufficient-privileges)
104+
* [Version Issues](#version-issues)
105+
* [Multiple Profiles in Databricks CLI](#multiple-profiles-in-databricks-cli)
106+
* [Authentication Issues](#authentication-issues)
107+
* [Workspace has an external Hive Metastore (HMS)](#workspace-has-an-external-hive-metastore-hms)
108+
* [Verify the Installation](#verify-the-installation)
101109
* [Star History](#star-history)
102110
* [Project Support](#project-support)
103111
<!-- TOC -->
@@ -1323,6 +1331,217 @@ By default, it will revert all the clusters present in the backup folder
13231331

13241332
[[back to top](#databricks-labs-ucx)]
13251333

1334+
# Common Challenges and the Solutions
1335+
Users might encounter some challenges while installing and executing UCX. Please find the listing of some common challenges and the solutions below.
1336+
1337+
[[back to top](#databricks-labs-ucx)]
1338+
1339+
### Network Connectivity Issues
1340+
1341+
**From local machine to the Databricks Account and Workspace:** UCX
1342+
installation process has to be run from the local laptop using
1343+
Databricks CLI and it will deploy the latest version of UCX into the
1344+
Databricks workspace. For this reason, the Databricks account and
1345+
workspace needs to be accessible from the laptop. Sometimes, the
1346+
workspace might have a network isolation, like it can only be reached
1347+
from a VPC, or from a specific IP range.
1348+
1349+
**Solution:** Please check that your laptop has network connectivity to
1350+
the Databricks account and workspace. If not, you might need to be
1351+
connected to a VPN to access your workspace.
1352+
1353+
**From local machine to GitHub:** UCX needs internet access to connect
1354+
to [<u>github.com</u>](https://github.com) (to download the tool) from
1355+
the machine running the installation. The installation will fail if
1356+
there is no internet connectivity.
1357+
1358+
**Solution:** Ensure that GitHub is reachable from the local machine. If
1359+
not, make necessary changes to the network/firewall settings.
1360+
1361+
**From Databricks workspace to PyPi:** There are some dependent
1362+
libraries which need to be installed from
1363+
[<u>pypi.org</u>](https://pypi.org/) to run the UCX workflows from the
1364+
Databricks workspace. If the workspace doesn’t have network
1365+
connectivity, then the job might fail with
1366+
NO_MATCHING_DISTRIBUTION_ERROR.
1367+
1368+
**Solution:** Version 0.24.0 of UCX supports workspace with no internet
1369+
access. Please upgrade UCX and rerun the installation. Reply *yes* to
1370+
the question “Does the given workspace block Internet access?” asked
1371+
during installation. It will then upload all necessary dependencies to
1372+
the workspace. Also, please note that UCX uses both UC and non-UC
1373+
enabled clusters. If you have different proxy settings for each, then
1374+
please update the necessary proxies (eg. with init scripts) for each
1375+
cluster type.
1376+
1377+
[[back to top](#databricks-labs-ucx)]
1378+
1379+
### Insufficient Privileges
1380+
1381+
**User is not a Databricks workspace administrator:** User running the
1382+
installation needs to be a workspace administrator as the CLI will
1383+
deploy the UCX tool into the workspace, create jobs, and dashboards.
1384+
1385+
**Solution:** Identify a workspace admin from your team and ask them to
1386+
install UCX with their authentication, or request a workspace
1387+
administrator to grant you temporary administrator privileges to run the
1388+
installation. More details on the issues that you can run into if
1389+
you are not an admin (and some possible solutions) can be found
1390+
[here](docs/troubleshooting.md#resolving-common-errors-on-ucx-install).
1391+
1392+
**User is not a Cloud IAM Administrator:** Cloud CLI needs to be
1393+
installed in the local machine for certain cloud related activities,
1394+
like creating an [<u>uber
1395+
principal</u>](#create-uber-principal-command).
1396+
For this, the user needs Cloud IAM Administrator privileges.
1397+
1398+
**Solution:** Work with a cloud administrator in your organization to
1399+
run the commands that need cloud administrator rights.
1400+
1401+
Admin privileges required for commands:
1402+
1403+
| **CLI command** | **Admin privileges** |
1404+
|----|----|
1405+
| [<u>install</u>](#install-ucx) | Workspace Admin |
1406+
| [<u>account install</u>](#advanced-installing-ucx-on-all-workspaces-within-a-databricks-account) | Account Admin |
1407+
| [<u>create-account-groups</u>](#create-account-groups-command) | Account Admin |
1408+
| [<u>validate-groups-membership</u>](#validate-groups-membership-command) | Account Admin |
1409+
| [<u>create-uber-principal</u>](#create-uber-principal-command) | Cloud Admin |
1410+
| [<u>principal-prefix-access</u>](#principal-prefix-access-command) | Cloud Admin |
1411+
| [<u>create-missing-principals</u>](#create-missing-pricipals-command-aws-only) | Cloud Admin |
1412+
| [<u>migrate-credentials</u>](#migrate-credentials-command) | Cloud Admin, Account Admin / Metastore Admin / CREATE STORAGE CREDENTIAL privilege |
1413+
| [<u>migrate-location</u>](#migrate-locations-command) | Metastore Admin / CREATE EXTERNAL LOCATION privilege |
1414+
| [<u>create-catalogs-schemas</u>](#create-catalogs-schemas-command) | Metastore Admin / CREATE CATALOG privilege |
1415+
| [<u>sync-workspace-info</u>](#sync-workspace-info-command) | Account Admin |
1416+
| [<u>manual-workspace-info</u>](#manual-workspace-info-command) | Workspace Admin |
1417+
1418+
[[back to top](#databricks-labs-ucx)]
1419+
1420+
### Version Issues
1421+
1422+
**Python:** UCX needs Python version 3.10 or later.
1423+
1424+
**Solution:** Check the current version using “python --version”. If the
1425+
version is lower than 3.10, upgrade the local Python version to 3.10 or
1426+
higher.
1427+
1428+
**Databricks CLI:** Databricks CLI v0.213 or higher is needed.
1429+
1430+
**Solution:** Check the current version with “databricks --version”. For
1431+
lower versions of CLI,
1432+
[<u>update</u>](https://docs.databricks.com/en/dev-tools/cli/install.html#update)
1433+
the Databricks CLI on the local machine.
1434+
1435+
**UCX:** When you install UCX, you get the latest version. But since UCX
1436+
is being actively developed, new versions are released frequently. There
1437+
might be issues if you have run the assessment with a much earlier
1438+
version, and then trying to run the migration workflows with the latest
1439+
UCX version.
1440+
1441+
**Solution:** Upgrade UCX, and rerun the assessment job before running
1442+
the migration workflows. For some reason, if you want to install a
1443+
specific version of UCX, you can do it using the command
1444+
“databricks labs install ucx@\<version\>”, for example,
1445+
“databricks labs install [email protected]”.
1446+
1447+
[[back to top](#databricks-labs-ucx)]
1448+
1449+
### Authentication Issues
1450+
1451+
**Workspace Level:** If you are facing authentication issues while
1452+
setting up Databricks CLI, please refer to the
1453+
[Cryptic errors on authentication](docs/troubleshooting.md#cryptic-errors-on-authentication)
1454+
section to resolve the common errors related to authentication,
1455+
profiles, and tokens.
1456+
1457+
**Account Level:** Not only workspace, but account level authentication
1458+
is also needed for installing UCX. If you do not have an account
1459+
configured in .databrickscfg, you will get an error message
1460+
“.databrickscfg does not contain account profiles; please create one
1461+
first”.
1462+
1463+
**Solution:** To authenticate with a Databricks account, consider using
1464+
one of the following authentication types: [<u>OAuth machine-to-machine
1465+
(M2M)
1466+
authentication</u>](https://docs.databricks.com/en/dev-tools/cli/authentication.html#m2m-auth),
1467+
[<u>OAuth user-to-machine (U2M)
1468+
authentication</u>](https://docs.databricks.com/en/dev-tools/cli/authentication.html#u2m-auth),
1469+
[<u>Basic authentication
1470+
(legacy)</u>](https://docs.databricks.com/en/dev-tools/cli/authentication.html#basic-auth).
1471+
1472+
[[back to top](#databricks-labs-ucx)]
1473+
1474+
### Multiple Profiles in Databricks CLI
1475+
1476+
**Workspace Level:** More than one workspace profile can be configured
1477+
in the .databrickscfg file. For example, you can have profiles set for
1478+
Dev and Prod workspaces. You want to install UCX only for the Prod
1479+
workspace.
1480+
1481+
**Solution:** The Databricks CLI provides an option to select the
1482+
[<u>profile</u>](https://docs.databricks.com/en/dev-tools/cli/profiles.html)
1483+
using “*--profile \<profile_name\>*” or “*-p \<profile_name\>*”. You can
1484+
test that the correct workspace is getting selected by running any
1485+
Databricks CLI command. For example, you can run “*databricks clusters
1486+
list -p prod*” and check that the Prod clusters are being returned. Once
1487+
the profile is verified, you can run UCX install for that specific
1488+
profile: “*databricks labs install ucx -p prod*”.
1489+
1490+
**Account Level:** Multiple account level profiles are set in the
1491+
.databrickscfg file.
1492+
1493+
**Solution:** The installation command “*databricks labs install ucx*
1494+
will provide an option to select one account profile.
1495+
1496+
[[back to top](#databricks-labs-ucx)]
1497+
1498+
### Workspace has an external Hive Metastore (HMS)
1499+
1500+
**External HMS connectivity from UCX clusters:** If the workspace has an
1501+
external HMS, the clusters running the UCX jobs need to have specific
1502+
configurations to connect to the external HMS. Otherwise, UCX assessment
1503+
will not be able to assess the tables on HMS.
1504+
1505+
**Solution:** Use a cluster policy before installation to set the
1506+
required Spark config for connecting to the external HMS, or manually
1507+
edit the cluster post-installation to have the correct configurations.
1508+
Detailed steps can be found
1509+
[<u>here</u>](docs/external_hms_glue.md).
1510+
1511+
**External HMS connectivity from UCX SQL warehouse:** UCX requires a SQL
1512+
warehouse to create tables, run queries, create and refresh dashboards.
1513+
If you already have a Pro or Serverless warehouse connected to the
1514+
external HMS, you can select the same warehouse for UCX. You will also
1515+
be given an option (during installation) to create a new warehouse for
1516+
UCX. If you have never used a warehouse before, the new warehouse
1517+
created might not have proper configuration set to connect to the
1518+
external HMS.
1519+
1520+
**Solution:** Set Spark configuration for connecting to external HMS in
1521+
the Admin Settings of SQL warehouse. This will only be needed if the
1522+
admin settings do not have the configurations already set. For example,
1523+
add *spark.hadoop.javax.jdo.option.ConnectionURL \<connectionstring\>*
1524+
under Data Access Configuration of SQL Warehouse Admin Settings.
1525+
1526+
[[back to top](#databricks-labs-ucx)]
1527+
1528+
### Verify the Installation
1529+
1530+
Once the UCX command “*databricks labs install ucx*” has completed
1531+
successfully, the installation can be verified with the following steps:
1532+
1533+
1. Go to the Databricks Catalog Explorer and check if a new schema for
1534+
ucx is available in Hive Metastore with all empty tables.
1535+
1536+
2. Check that the UCX jobs are visible under Workflows.
1537+
1538+
3. Run the assessment. This will start the UCX clusters, crawl through
1539+
the workspace, and display results in the UCX dashboards. In case of
1540+
external HMS, verify from the results that the assessment has
1541+
analyzed the external HMS tables.
1542+
1543+
[[back to top](#databricks-labs-ucx)]
1544+
13261545
# Star History
13271546

13281547
[![Star History Chart](https://api.star-history.com/svg?repos=databrickslabs/ucx&type=Date)](https://star-history.com/#databrickslabs/ucx)

0 commit comments

Comments
 (0)