Problem
When upgrading Terraform Enterprise the installation of Replicated fails with:
/install.sh: line 2041: /usr/local/bin/replicated: Text file busy
If a support-bundle was generated as part of the troubleshooting process it is possible to confirm all components of Replicated were not successfully upgraded when finding entries similar to these in the replicated container logs:
WARN 2022-08-24T03:00:47+00:00 [operator] server.go:313 Operator API
version "2.46.1" does not meet minimum requirement of "2.53.6",
aborting announcement...
ERRO 2022-08-24T03:14:04+00:00 tasks/app_tasksteps.go:145 Failed to
start the app: Unmet start requirement: License requires at least
1 node to be connected, found 0.
Prerequisites
- Terraform Enterprise upgrades where Replicated will be upgraded as part of the process. (This applies to both airgap and online installations).
Cause
- This comes as a result of the usage of one or multiple security/antivirus agents in the Terraform Enterprise Instance which cannot be stopped/removed due to policy and are preventing the installer from replacing the following files:
/usr/local/bin/{replicated,replicatedctl}
Solution:
- Manually delete the files preventing the upgrade from completing successfully:
sudo rm -f /usr/local/bin/{replicated,replicatedctl}
- Execute the install.sh script. Add required flags as needed, ex:
sudo bash ./install.sh no-docker no-proxy
Outcome
Replicated will upgrade successfully and the install.sh
script will print a message with the URL to access the Replicated Console.