Introduction
This article addresses an issue where Terraform Enterprise startup appears to hang after an upgrade.
Problem
After upgrading Terraform Enterprise to version v202309-1 or later, the application startup process hangs and continuously displays the following log line:
Running as builtin tfe user, ensuring ownership of scratch directories...
Prerequisites
- Terraform Enterprise version
v202309-1or later (Replicated deployment) - Mounted Disk operational mode
Cause
In Terraform Enterprise v202309-1 and later, services are consolidated into a single container. During startup, the application attempts to change the group ownership of all files and subdirectories in the disk path to the root group. It also recursively copies user permissions to the group.
For installations with a large data directory, this ownership and permission change can take several minutes to complete, causing the startup process to appear unresponsive.
Solution
Allow the startup process to complete. This step is a one-time operation that occurs after the initial upgrade.
If the Replicated UI reports an error such as Ready state command canceled: context deadline exceeded, it indicates that Terraform Enterprise did not report a healthy status within the expected timeout period. In this case, wait for the terraform-enterprise container to finish its startup process. Once it is fully running, restart Terraform Enterprise from the Replicated console to clear the error status.
Additional Information
- For more details on this architecture change, please see the Terraform Enterprise Consolidated Services Architecture documentation.