Open I-Would-Like-To-Report-A-Bug-Please opened 1 week ago
Hi, do you happen to run a 32 bit version of Terraform? If yes, could you try a 64bit version?
With the error message, i came across this issue here which contains an explanation of why this happens: https://github.com/hashicorp/terraform-provider-google/issues/6518
Hi!
Same problem for me.
I'm using the Docker image hashicorp/terraform:1.9
on an 64Bit machine:
Terraform v1.9.8
on linux_amd64
+ provider registry.terraform.io/datadrivers/nexus v2.5.0
Message is
panic: Error reading level state: strconv.ParseInt: parsing "9223372036854776000": value out of range
BTW: the integer IS larger then the maximum signed 64 bit Integer. Max 9,223,372,036,854,775,807
(inclusive)
Maybe an signed/unsigned mismatch
Maybe one more bit of information:
I've not seen this behavior until we moved last week to a new Nexus HA Installation with 3 servers serving requests.
@I-Would-Like-To-Report-A-Bug-Please Is your installation HA too?
For us it is single docker-compose one node installation.
Just checked Terraform:
❯ terraform -version
Terraform v1.0.11
on linux_amd64
❯ file /var/lib/tfenv/versions/1.0.11/terraform
/var/lib/tfenv/versions/1.0.11/terraform: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=oLZBNGHz70skNEAdhSHD/wzJydTaLhLbxOzYAwDlf/515RIPkbNiteahNWSa8i/XpyGuWV_TATduTbYzSf9, stripped
So definitely x64.
One more information:
If i recover the previous version of the terraform.tfstate
the last change is as expected not seen by terraform, but there is also no crash anymore.
After removing and re-importing the changed resources the state is still valid. No crash.
Seems that the resulting state after a change is somehow corrupted.
Hi!
I think i found the root cause of my problem:
We use a S3 Blobstore with this definition:
resource "nexus_blobstore_s3" "PersistentS3" {
name = "PersistentS3"
bucket_configuration {
bucket {
name = "nexus_bucket"
region = "DEFAULT"
expiration = 3
prefix = "persistent"
}
advanced_bucket_connection {
endpoint = "https://acme.de:9021"
}
bucket_security {
access_key_id = "top"
secret_access_key = "secret"
}
}
soft_quota {
limit = 2831155200000
type = "spaceUsedQuota"
}
lifecycle {
ignore_changes = all
}
}
and historically an Blobstore group
resource "nexus_blobstore_group" "LanBlobStore" {
name = "LanBlobStore"
fill_policy = "writeToFirst"
members = [
nexus_blobstore_s3.PersistentS3.name
]
}
The latter is imported into Terraform, as it was defined long ago and other - non terraform controlled - repositories are based on it.
This results in this part of the terraform state file
{
"mode": "managed",
"type": "nexus_blobstore_group",
"name": "LanBlobStore",
"provider": "provider[\"registry.terraform.io/datadrivers/nexus\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"available_space_in_bytes": 9223372036854775807,
"blob_count": 84445,
"fill_policy": "writeToFirst",
"id": "LanBlobStore",
"members": [
"PersistentS3"
],
"name": "LanBlobStore",
"soft_quota": [],
"total_size_in_bytes": 410556515216
},
"sensitive_attributes": [],
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ=="
}
]
},
with the offending value in available_space_in_bytes
.
So @I-Would-Like-To-Report-A-Bug-Please maybe you have a look at the statefile too and find the offending value there.
If it's available_space_in_bytes
we are one step further.
Best regards Sönke
Is there an existing issue for this?
Community Note
Terraform Version
1.0.11
Nexus Provider Version
2.5.0
Nexus Version
3.70.2-01
Affected Resource(s)/Data Source(s)
3.70.2-01
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform plan should work and not crash
Actual Behaviour
Plugin crashed
Steps to Reproduce
terraform plan
But I'm not sure what's specific about this blob store group that causes panic. Our repositories are quite huge, so maybe it's something related to size?
References
No response