diff --git a/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/UniverseTaskBase.java b/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/UniverseTaskBase.java index 736e5c4e2988..cf3a7615bb47 100644 --- a/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/UniverseTaskBase.java +++ b/managed/src/main/java/com/yugabyte/yw/commissioner/tasks/UniverseTaskBase.java @@ -1761,9 +1761,15 @@ protected void deleteNodeAgent(NodeDetails nodeDetails) { Cluster cluster = getUniverse().getCluster(nodeDetails.placementUuid); Provider provider = Provider.getOrBadRequest(UUID.fromString(cluster.userIntent.provider)); if (provider.getCloudCode() == CloudType.onprem) { - AccessKey accessKey = - AccessKey.getOrBadRequest(provider.getUuid(), cluster.userIntent.accessKeyCode); - if (accessKey.getKeyInfo().skipProvisioning) { + try { + AccessKey accessKey = + AccessKey.getOrBadRequest(provider.getUuid(), cluster.userIntent.accessKeyCode); + if (accessKey.getKeyInfo().skipProvisioning) { + return; + } + } catch (Exception e) { + // Access Key are optional for onprem providers. We can return in case it is not + // present as the nodes will be manually provisioned. return; } }