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

[Bug]: Neputne_cluster. Fix Major Version Upgrade from 1.1.1.0 to 1.2.0.0 #29785

Closed
kastlbo opened this issue Mar 3, 2023 · 6 comments · Fixed by #33487
Closed

[Bug]: Neputne_cluster. Fix Major Version Upgrade from 1.1.1.0 to 1.2.0.0 #29785

kastlbo opened this issue Mar 3, 2023 · 6 comments · Fixed by #33487
Labels
bug Addresses a defect in current functionality. service/neptune Issues and PRs that pertain to the neptune service.
Milestone

Comments

@kastlbo
Copy link

kastlbo commented Mar 3, 2023

Terraform Core Version

1.3.8

AWS Provider Version

4.55.0

Affected Resource(s)

aws_neptune_cluster

Expected Behavior

I am trying to upgrade the neptune cluster version from 1.1.1.0 to 1.2.0.0.

I am expecting it to remove the instances and upgrade the cluster to the newer version and then recreate the instances.

Actual Behavior

It is removing the instances but not upgrading the cluster.
I get the following error.

InvalidDBClusterStateFault: Cannot modify engine version without a healthy primary instance in DB cluster:

I previously had the same problem when upgrading from 1.0.4.1 to 1.1.1.0.
You fixed this with provider 4.55.0
The previous issue was r/neptune_cluster - fix major version upgrade #28051
Looks like the same thing is happening when you try to upgrade from 1.1.1.0 to 1.2.0.0

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

n/a

Steps to Reproduce

n/a

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@kastlbo kastlbo added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk justinretzolk added service/neptune Issues and PRs that pertain to the neptune service. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 6, 2023
@hanlong-chen-1047
Copy link

hanlong-chen-1047 commented Aug 22, 2023

Is there any update on this issue? It is still happening for newer engine version updates

@kastlbo
Copy link
Author

kastlbo commented Aug 23, 2023

There seems to be a glich when upgrading you clusters with terraform. I found that if you have an instance declartion in your terraform you must leave that version as the previous version and only update the main cluster resource. It needs to have the instances available to upgrade the cluster. So if you leave the instances as the old version number it will work. Once upgraded it will automatically update the instances. Also, will upgrading to newer versions of neptune the parameter groups change as well. It wasn't fun trying to upgrade to 1.2 from 1.04.1. You have to step up to 1.1.0 and then when you go to 1.2 the parameter group changes. I also found an issue with the size of cluster some sizes where removed in never versions. Enjoy

@triggan
Copy link
Contributor

triggan commented Sep 14, 2023

I actually see what the issue here is. Neptune engine versions are applied at a cluster level and all instances within the cluster get upgraded at the same time. The logic in the Terraform AWS Provider is attempting to replace instances if an engine_version is specified per aws_neptune_cluster_instance resource. Ultimately, the engine_version parameter should be ignored when applied to an instance, as you cannot have a Neptune cluster with instances on different engine versions. If you comment out the engine_version parameter on the aws_neptune_cluster_instance resources, the engine upgrade gets applied without replacing the instances and the instances are restarted with the specified engine_version applied at the aws_neptune_cluster resource, as expected.

@github-actions
Copy link

This functionality has been released in v5.22.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/neptune Issues and PRs that pertain to the neptune service.
Projects
None yet
4 participants