Problem
Terraform runs are failing with Sentinel policies errored
after migrating Terraform Enterprise from Replicated to FDO (Flexible Deployment Options) on Docker.
Cause
This error usually caused by incorrect Docker networking configuration.
You can validate this by inspecting the errors in sidekiq.log
[ERROR] msg=Failed to enqueue Sentinel worker run_id=6599 policy_check_id=410 exception=Failed to open TCP connection to 127.0.0.1:8000 (Connection refused - connect(2) for "127.0.0.1" port 8000)
And task-worker.log
Error response from daemon: network tfe_terraform_isolation not found
Solutions
Check the Docker Compose file and look for the TFE_RUN_PIPELINE_DOCKER_NETWORK
parameter.
You can either:
-
Create the Docker network using
docker network create tfe_terraform_isolation
command
or -
Remove the line with
TFE_RUN_PIPELINE_DOCKER_NETWORK
to use the default Docker bridge
Then, re-deploy FDO container and trigger a new run to test.
Outcome
Terraform runs should be processed without any errors.
Additional Information
-
More information about the
TFE_RUN_PIPELINE_DOCKER_NETWORK
option can be found here