Skip to content
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

Application upgrade when integration removal is required fails with Client Error #566

Open
dariofaccin opened this issue Sep 6, 2024 · 3 comments
Labels

Comments

@dariofaccin
Copy link

Description

The upgrade of some of our charms (sdcore-amf-k8s, sdcore-ms-k8s, sdcore-pcf-k8s) requires a relation to be removed before refreshing the charm.
The provider correctly tries to remove it before trying the refresh, however it does not wait for the relation to be completely removed, causing the following error:

╷
│ Error: Client Error
│ 
│   with module.amf.juju_application.amf,
│   on .terraform/modules/amf/terraform/main.tf line 4, in resource "juju_application" "amf":
│    4: resource "juju_application" "amf" {
│ 
│ Unable to update application resource, got error: updating charm config: cannot upgrade application "amf" to
│ charm "ch:amd64/jammy/sdcore-amf-k8s-669": would break relation "amf:database mongodb:database"
╵
╷
│ Error: Client Error
│ 
│   with module.nms.juju_application.sdcore-nms-k8s,
│   on .terraform/modules/nms/terraform/main.tf line 4, in resource "juju_application" "sdcore-nms-k8s":
│    4: resource "juju_application" "sdcore-nms-k8s" {
│ 
│ Unable to update application resource, got error: updating charm config: cannot upgrade application "nms" to
│ charm "ch:amd64/jammy/sdcore-nms-k8s-548": would break relation "nms:sdcore-management
│ webui:sdcore-management"
╵
╷
│ Error: Client Error
│ 
│   with module.pcf.juju_application.pcf,
│   on .terraform/modules/pcf/terraform/main.tf line 4, in resource "juju_application" "pcf":
│    4: resource "juju_application" "pcf" {
│ 
│ Unable to update application resource, got error: updating charm config: cannot upgrade application "pcf" to
│ charm "ch:amd64/jammy/sdcore-pcf-k8s-485": would break relation "pcf:database mongodb:database"
╵

Urgency

Blocker for our release

Terraform Juju Provider version

0.12.0

Terraform version

v1.9.5

Juju version

3.5.1

Terraform Configuration(s)

No response

Reproduce / Test

1. git clone [email protected]:canonical/terraform-juju-sdcore-k8s.git
2. cd terraform-juju-sdcore-k8s/modules/sdcore-k8s
3. git checkout v1.4
4. terraform init && terraform apply
5. git checkout main
5. terraform init && terraform apply

Debug/Panic Output

No response

Notes & References

No response

@Aflynn50
Copy link
Contributor

Hey @dariofaccin, could you please add a terraform plan to this report with a minimal reproducer?

@dariofaccin
Copy link
Author

@Aflynn50 the steps to reproduce the issue involve first deploying a plan (using a version X of the charms) and then refreshing the plan with a new version Y of the charms. This particular deployment involves different modules across multiple repositories. I could create a custom plan with the bare minimum if needed. Let me know, thanks.

@hmlanigan
Copy link
Member

@dariofaccin please update with the bare minimum plan which does not include any GitHub links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants