Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Odd state serial numbers #383

Closed
leg100 opened this issue Apr 13, 2023 · 1 comment
Closed

Odd state serial numbers #383

leg100 opened this issue Apr 13, 2023 · 1 comment

Comments

@leg100
Copy link
Owner

leg100 commented Apr 13, 2023

The serial numbers of state versions produced by OTF are, for some reason, following an odd series, i.e. 1, 3, 5, etc.

@leg100
Copy link
Owner Author

leg100 commented Apr 15, 2023

After 20 minutes or so of debugging it would appear this is the default behaviour of terraform, when using local state at least. It increments the serial twice at the end of an terraform apply:

$ TF_LOG=trace terraform apply -auto-approve
...
2023/04/15 08:45:29 [TRACE] EvalWriteState: recording 0 dependencies for null_resource.demo
2023/04/15 08:45:29 [TRACE] EvalWriteState: writing current state object for null_resource.demo
null_resource.demo: Creation complete after 0s [id=8025876488131615537]
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: creating backup snapshot at terraform.tfstate.backup
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 4
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2023/04/15 08:45:29 [TRACE] vertex "null_resource.demo": visit complete
2023/04/15 08:45:29 [TRACE] dag/walk: visiting "meta.count-boundary (EachMode fixup)"
2023/04/15 08:45:29 [TRACE] vertex "meta.count-boundary (EachMode fixup)": starting visit (*terraform.NodeCountBoundary)
2023/04/15 08:45:29 [TRACE] dag/walk: visiting "provider[\"registry.terraform.io/hashicorp/null\"] (close)"
2023/04/15 08:45:29 [TRACE] vertex "meta.count-boundary (EachMode fixup)": visit complete
2023/04/15 08:45:29 [TRACE] vertex "provider[\"registry.terraform.io/hashicorp/null\"] (close)": starting visit (*terraform.graphNodeCloseProvider)
2023/04/15 08:45:29 [TRACE] GRPCProvider: Close
2023-04-15T08:45:29.883+0100 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2023-04-15T08:45:29.884+0100 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/null/3.2.1/linux_amd64/terraform-provider-null_v3.2.1_x5 pid=1850193
2023-04-15T08:45:29.884+0100 [DEBUG] plugin: plugin exited
2023/04/15 08:45:29 [TRACE] vertex "provider[\"registry.terraform.io/hashicorp/null\"] (close)": visit complete
2023/04/15 08:45:29 [TRACE] dag/walk: visiting "root"
2023/04/15 08:45:29 [TRACE] vertex "root": starting visit (*terraform.nodeCloseModule)
2023/04/15 08:45:29 [TRACE] vertex "root": visit complete
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: have already backed up original terraform.tfstate to terraform.tfstate.backup on a previous write
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 5
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2023/04/15 08:45:29 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info

@leg100 leg100 closed this as completed Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant