-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porter: "Installation not found" when preceeding pipeline step fails #4281
Comments
(Manual workaround: update the resource's deploymentStatus in cosmos to deleted and deploy a new resource) |
Yes, I've started seeing this, I am sure porter used to create a new installation. Wonder if linked to a porter upgrade. Suggest we try catch it and install instead? |
Yep could do, or could check for the presence of an install with |
Seeing this more frequently when trying to update after a resource installation fails during the terraform phase. I'm sure it used to be possible to run an update after a broken installation. Noticed porter have recently introduced a |
Agree, I am sure it used to work. Don't think its that PR though, as the error "could not find installation" is issued adn the code returns before
|
Ideally if this line fails with a "could not find installation" error, https://github.com/getporter/porter/blob/fe65874aa3a17d647f47a3163431257d7162911b/cmd/porter/installations.go#L297 would have a Alternatively we need to check for the install first on the RP, and if doesn't exist, install. This is one of the times I think it would be easier without porter! |
Ah I think it's this change introduced in Porter 1.2.0: Upgrade should not be allowed if installation is not installed #3213 The RP was using Porter 1.1.1 until recently, hence why we're only seeing this now. |
@marrobi Suggest we just pass the RP was running 1.1.1, now running 1.2.1
|
That error is cannot be upgraded rather than cannot be found. Not sure it gets that far in the code before failing. |
Oh dear yes you're right, thought that was too easy. I'll take another look |
Ah so... I am also seeing the other error (this just occured earlier today - deployment failed on an Azure SQL installation, then tried to Update to recover it). I think I may have conflated the two together, hence my confusion above.
|
Created a separate issue for "The installation cannot be upgraded, because it is not installed" #4291 |
Ah, yes, it's this one that's caused the issue: getporter/porter#3213 Ideally an upstream change to do #4281 (comment) would help - as in install if does not exist, and add the force-upgrade to resolve the other one. Or we can check the for the installation in the RP code and try to install if it does not exist. |
If a resource install fails in a pipeline step before porter has had chance to run, when you attempt to Update the resource to fix the issue, Porter will fail with an "Installation not found" error, as it didn't create any state on install.
E.g. the first step of this pipeline failed.
When I attempted to recover the issue by updating the resource (which if I understand calls
porter upgrade
, I got the following error:1ac69287-2099-40aa-a807-3620e5cadeda: Porter action failed with error = Error message: could not find installation /1ac69287-2099-40aa-a807-3620e5cadeda: Installation not found could not find installation /1ac69287-2099-40aa-a807-3620e5cadeda: Installation not found ; Command executed: porter upgrade "1ac69287-2099-40aa-a807-3620e5cadeda" --reference mytre.azurecr.io/tre-service-databricks:v1.0.10 --param address_space="10.1.6.0/24" --param arm_environment="public" --param arm_use_msi="true" --param id="1ac69287-2099-40aa-a807-3620e5cadeda" --param is_exposed_externally="False" --param tfstate_container_name="tfstate" --param tfstate_resource_group_name="rg-mytre-mgmt" --param tfstate_storage_account_name="mytremgmtstore" --param tre_id="mytre" --param workspace_id="e01fa8c3-83c7-4a13-9710-0ad3082e9523" --force --credential-set arm_auth --credential-set aad_auth Installation not found
As expected there was no state in the cosmos mongo DB, as
porter install
never ran in the first place.The text was updated successfully, but these errors were encountered: