Skip to content

Variable not escaped properly on docker-compose template #521

@0xDones

Description

@0xDones

Describe the bug
After setting up a hoodi full-node, I got some errors when it tried to start the services.

To Reproduce
Steps to reproduce the behavior:

  1. Run sedge cli and do the setup (Nethermind EC, Teku CC, Teku VC)
  2. There will be an error
➜  dev sedge logs
2025-09-09 14:17:42 -- [INFO] [Logger Init] Log level: info
2025-09-09 14:17:42 -- [INFO] You are running the latest version of sedge. Version:  v1.9.1
2025-09-09 14:17:42 -- [WARN] The "response" variable is not set. Defaulting to a blank string.
2025-09-09 14:17:42 -- [INFO] Running command: docker compose -f /home/dones/dev/sedge-data/docker-compose.yml logs --follow time="2025-09-09T14:17:42-03:00" level=warning msg="The \"response\" variable is not set. Defaulting to a blank string." consensus execution mev-boost validator-blocker
WARN[0000] The "response" variable is not set. Defaulting to a blank string.
no such service: time="2025-09-09T14:17:42-03:00"
2025-09-09 14:17:42 -- [FATA] failed to get logs for services time="2025-09-09T14:17:42-03:00" level=warning msg="The \"response\" variable is not set. Defaulting to a blank string." consensus execution mev-boost validator-blocker. Error: Docker Compose Manager running 'docker compose logs': exit status 1. Output:

I think the issue is that the $response variable is not escaped ($$response) - adding the extra $ fixed it for me.

  validator-blocker:
    container_name: sedge-validator-blocker
    image: busybox
    networks:
    - sedge
    command: |-
      sh -c "
        echo 'Waiting 420 seconds of grace period before starting the validator';
        sleep 420;
        echo 'Done';
        while true; do
          response=$(wget -S ${CC_API_URL}/eth/v1/node/health -O /dev/null 2>&1 | grep -m 1 'HTTP/' | awk '{print $2}')
          if [ \"$response\" = \"200\" ]; then
            echo 'Endpoint is up!'
            break
          else
            echo 'Endpoint is down, waiting 30 seconds before checking again...'
            sleep 30
          fi
        done
      "

Expected behavior
No errors when running the services.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22] v1.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions