elastic / elastic-github-actions

This action spins up an Elasticsearch instance that can be accessed and used in your subsequent steps.
Apache License 2.0
53 stars 37 forks source link

Github Actions "network already exists" #28

Closed coladarci closed 2 months ago

coladarci commented 2 years ago

Hello all! Very excited about the work on this repo, thanks for that.

Following the instructions worked the first time but on subsequent runs, I'm getting a "Error response from daemon: network with name elastic already exists" error.

Here is the full output:

Run elastic/elastic-github-actions/elasticsearch@master
  with:
    stack-version: 7.6.0
    security-enabled: true
    nodes: 1
    port: 9200
    elasticsearch_password: changeme
  env:
    MIX_ENV: test
    OTP_VERSION_SPEC: 24.2.2
    ELIXIR_VERSION_SPEC: 1.13.4
    DEPS_CACHE_PREFIX: v5-
    BUILD_CACHE_PREFIX: v5-
    HOME: /home/ubuntu
    ImageOS: ubuntu20
    INSTALL_DIR_FOR_OTP: /home/ubuntu/actions-runner/_work/_temp/.setup-beam/otp
    INSTALL_DIR_FOR_ELIXIR: /home/ubuntu/actions-runner/_work/_temp/.setup-beam/elixir
/usr/bin/docker run --name a7b4daf3f66111a0643d4b5e09cd5f9db4060_a44a54 --label 6a7b4d --workdir /github/workspace --rm -e MIX_ENV -e OTP_VERSION_SPEC -e ELIXIR_VERSION_SPEC -e DEPS_CACHE_PREFIX -e BUILD_CACHE_PREFIX -e HOME -e ImageOS -e INSTALL_DIR_FOR_OTP -e INSTALL_DIR_FOR_ELIXIR -e INPUT_STACK-VERSION -e INPUT_SECURITY-ENABLED -e INPUT_NODES -e INPUT_PORT -e INPUT_ELASTICSEARCH_PASSWORD -e INPUT_PLUGINS -e STACK_VERSION -e NODES -e PORT -e PLUGINS -e SECURITY_ENABLED -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --network github_network_c702a59bb7524d9f91c92e6012e70529 -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/ubuntu/actions-runner/_work/_temp/_github_home":"/github/home" -v "/home/ubuntu/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/home/ubuntu/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/ubuntu/actions-runner/_work/noreaga/noreaga":"/github/workspace" 6a7b4d:af3f66111a0643d4b5e09cd5f9db4060
+ [[ -z 7.6.0 ]]
++ echo 7.6.0
++ cut -c 1
+ MAJOR_VERSION=7
+ docker network create elastic
Error response from daemon: network with name elastic already exists

Any ideas or things worth trying?

picandocodigo commented 2 months ago

This was addressed in: https://github.com/elastic/elastic-github-actions/commit/ff7c4f2284f5251f0b51d3eb48c13dcc8d44824f

Please don't hesitate to add a new issue if you encounter any problems. Thanks!