How to remove libraries from Azure Databricks Cluster - terraform

I am using terraform to configure databricks cluster. I was defining libraries to install and made a mistake in the terraform script by giving comma separated libraries.
in main.tf
library {
pypi {
package = "fbprophet==0.6,pandas"
}
}
the installation faild, but there is no way to remove the faild installation from the library list.
when I try to do anything with terraform (apply/destroy) i get the following error:
$ terraform apply
module.azurerm-databricks-instancecluster.databricks_cluster.cluster: Refreshing state... [id=0517-053850-sniff405]
╷
│ Error: library_pypi[fbprophet==0.6,pandas] failed: java.lang.RuntimeException: ManagedLibraryInstallFailed: org.apache.spark.SparkException: Process List(/databricks/python/bin/pip, install, fbprophet==0.6,pandas, --disable-pip-version-check) exited with code 1. ERROR: Invalid requiremrocess List(/databricent: 'fbprophet==0.6,pandas' pandas'
│ for library:PythonPyPiPkgId(fbprophet,Some(0.6,pandas),None,List()),isSharedLibrary=false
any idea on how to resolve this issue?

Steps to remove libraries from Azure Databricks Cluster:
Step1: Select the libraries which you want to remove.
Step2: Click on Uninstall and confirm
Step3: Restart the cluster to remove the libraries
When you uninstall a library from a cluster, the library is removed only when you restart the cluster. Until you restart the cluster, the status of the uninstalled library appears as Uninstall pending restart.

Related

issue when upgrading agic to 1.5.2

As our aks relate to two different agw, when upgrading AGIC by helm, we got this error:
helm upgrade agic-ass application-gateway-kubernetes-ingress/ingress-azure --version 1.5.1
Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: IngressClass "azure-application-gateway" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "agic-ass"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "default"
how to fix it and upgrade AGIC to 1.5.1 by helm?
I hit the same issue, and the fix for me was to add --reuse-values to the Helm upgrade command.
I have tried to reinstall instead of upgrading by adding new config as "ingressClassResource" into the helm-config.yaml , it works anyway.

Terraform: Failed to query available Provider package on M1 Pro

I am using the new apple M1 pro and when I run terraform init I am getting failed to query available Provider package error
The error
Reusing previous version of newrelic/newrelic from the dependency lock file
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 2.70.0 does not match configured version constraint ~>
│ 3.53.0; must use terraform init -upgrade to allow selection of new versions
╵
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider ns1-terraform/ns1: could not connect to registry.terraform.io: Failed to request discovery document: Get
│ "https://registry.terraform.io/.well-known/terraform.json": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
╵
╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other versions of this provider may have different platforms supported.
╵
╷
│ Error: Failed to install provider
│
│ Error while installing newrelic/newrelic v2.25.0: could not query provider registry for registry.terraform.io/newrelic/newrelic: failed to retrieve authentication checksums for provider: the
│ request failed after 2 attempts, please try again later: Get
│ "https://objects.githubusercontent.com/github-production-release-asset-2e65be/93446098/7aca5d90-9fc0-43cd-946b-46f556c2bbfa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211215T180026Z&X-Amz-Expires=300&X-Amz-Signature=01f9b195e6e9355253a588d09c73a78f499e6d1b1f2014f921e749b0da9c4c4e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=93446098&response-content-disposition=attachment%3B%20filename%3Dterraform-provider-newrelic_2.25.0_SHA256SUMS&response-content-type=application%2Foctet-stream":
│ net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
This set of errors seems to be describing three separate problems at once:
Your Terraform configuration declares that it needs a version of the hashicorp/aws provider which matches the version constraint ~> 3.53.0, which is the same as >= 3.53.0, < 3.34.0, that doesn't match the version 2.70.0 that was selected on a previous Terraform run.
If you have intentionally changed the version constraint in order to upgrade the provider, you can follow the advice in that particular error and run terraform init -upgrade to select the newest version of each provider which matches the version constraints. Alternatively, you can revert the change to the version constraints so that the configuration will accept 2.70.0 as a suitable version and then keep using that version.
Your configuration depends on the legacy provider hashicorp/template, which unfortunately reached end-of-life before Apple introduced Apple Silicon-based products, and so that particular provider does not have any packages available which can run on your M1 Mac.
You may be able to work around this by running the darwin_amd64 build of Terraform CLI under Rosetta 2 emulation, which will then in turn cause Terraform to install and run the darwin_amd64 versions of the providers also in Rosetta 2 emulation.
For modern Terraform you should typically use the templatefile function instead of the deprecated template_file data source, as recommended in the documentation, but I would suggest making sure that you're able to work with your current configuration using Rosetta 2 emulation first, before modifying it to remove the deprecated provider, because that will allow you to compare the behavior before and after the change and thus make sure you've not inadvertently changed configuration behavior.
However, once you've moved away from using the deprecated provider, you should be able to use the native Apple Silicon build of Terraform (the darwin_arm64 version you are already using) for future work on this configuration, because this provider is the only one generating that particular error message here.
Finally, Terraform seems to have encountered some network connectivity problems when attempting automatic provider installation. It seems that this isn't a total failure to reach the Terraform Registry and the provider packages hosted on GitHub, because Terraform was clearly able to query registry.terraform.io in order to learn what versions of hashicorp/template are available, but some requests are not succeeding and so perhaps you are accessing the internet through a corporate firewall or similar filtering which is making a subset of the requests fail, for some reason.
Since this has ended up being at least three questions at once, if you have any further questions about any one of these answers then I'd suggest starting a new Stack Overflow question about it, including any additoinal context as necessary, because that will hopefully then allow folks who want to answer to have more context and thus give you a more actionable solution.
I am using a Macbook with an M1 chip as well I kept facing the same error. To fix, I had to uninstall terraform "brew uninstall terraform", follow these instructions https://benobi.one/posts/running_brew_on_m1_for_x86/, run "ibrew install hashicorp/tap/terraform".
Although "terraform version" will provide the same output as before, it now works. For me at least. Hope this helps someone!

Conflicting provider version contraints in Terraform tutorial

I’m following the Target Resources tutorial and I get the following failure when I run the terraform init setup step:
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 3.39.0 does not match configured version
│ constraint ~> 3.39.0, >= 3.50.0; must use terraform init -upgrade to allow selection of new versions
Running terraform init -upgrade results in this similar error message:
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints ~> 3.39.0, >= 3.50.0
It looks like the ~>3.39.0 version specified in ./main.tf conflicts with the >=3.5.0 contraint from the s3_bucket module (.terraform/modules/s3_bucket/versions.tf).
I’ve tried cloning a clean version of the tutorial repository and keep running into this error. Is this a problem with my local configuration or with the tutorial code? If the latter, what’s the best way to move past this? Should I adjust one of the constraints manually to resolve the conflict?
I am using a much newer version of the Terraform CLI (v1.0.7) where the tutorial text requires v0.14 and up. I haven't gotten a chance to downgrade and test again, but that would be interesting to see.
thanks!
There is a bug in the main.tf located in the root module config in the repository for that tutorial. The bug is located here. The line should be modified and the resulting argument object appear like:
aws = {
source = "hashicorp/aws"
version = "~> 3.39"
}
That will lock the version to the range >= 3.39.0 < 4.0.0, which is almost certainly the config's original intent. You can read more about the syntax behind the provider version specifications in the documentation.

Seeing "The filename or extension is too long" when "terragrunt plan" is executed in Windows

Executing "terragrunt plan" from Visual Studio code gives the below error in Windows 10:
Running command: terraform init -backend-config=region=eu-west-2 -backend-config=bucket=bucket-name" -backend-config=dynamodb_table=lock-table -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
Finding hashicorp/aws versions matching "~> 3.36.0"...
Installing hashicorp/aws v3.36.0...
Error: Failed to install provider
Error while installing hashicorp/aws v3.36.0: mkdir
.terraform/plugins/registry.terraform.io/hashicorp/aws/3.36.0/windows_amd64:
The filename or extension is too long.
[terragrunt] 2021/05/19 15:39:20 Hit multiple errors:
exit status 1
Thanks Rubens for suggesting using TERRAGRUNT_DOWNLOAD environment variable. I'm able to work around this problem.
Here are the complete steps in terragrunt:
from cmd, set TERRAGRUNT_DOWNLOAD and call init:
set TERRAGRUNT_DOWNLOAD=C:\\.terragrunt-cache
terragrunt init
Then copy or move C:\\.terragrunt-cache content to the .terragrunt-cache in my project (better clean up the folder first)
from cmd, unset TERRAGRUNT_DOWNLOAD and call apply
set TERRAGRUNT_DOWNLOAD=
terragrunt apply
Had this problem today and I solved by creating a TERRAGRUNT_DOWNLOAD environment variable.
I set the value to TERRAGRUNT_DOWNLOAD=C:\.terragrunt-cache.
Got this solution from this issue
https://github.com/gruntwork-io/terragrunt/issues/581#issuecomment-460051767
The proper fix is here:
Start Git Bash as Administrator
Run command git config --system core.longpaths true
How to fix "Filename too long error" during git clone
I had faced similar issue on terraform init. I installed latest version of terraform and it got resolved.

Broadleaf Commerce: Getting started MVN install errors

Non-resolvable parent POM for com.mycompany-community:boot-community-demo:1.0.0-SNAPSHOT: Could not transfer artifact org.broadleafcommerce:broadleaf-boot-starter-parent:pom:5.2.1-SNAPSHOT from/to public snapshots (http://nexus.broadleafcommerce.org/nexus/content/groups/community-snapshots/): Connect to nexus.broadleafcommerce.org:80 [nexus.broadleafcommerce.org/104.130.140.202] failed: Connection timed out: connect and 'parent.relativePath' points at no local POM # line 5, column 13
I am new to Broadleaf & am a UI Developer. I am trying to setup 'Heat Clinic Demo' in my local but unable to do so. Am getting the above errors and unable to proceed further, can someone please help me out in running the project. Thanks in advance
I am not sure how you got that version for your parent but it should be version 5.2.2.1-GA. That is our latest release version. I recommend changing the root pom.xml to use that version instead (in the element).
The Maven error indicates that it could not connect to the Broadleaf nexus. On my end it looks like it is up, verify that you can ping it and try again with -U, e.g. mvn clean install -U to force metadata to be refreshed from the nexus.

Resources