Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container sharing network namespace with another container or host cannot be connected to any other network #24749

Closed
exfly opened this issue May 16, 2023 · 2 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/gitea-actions related to the actions of Gitea type/bug

Comments

@exfly
Copy link

exfly commented May 16, 2023

Description

gitea actions runner with follow config,run ci failed with error container sharing network namespace with another container or host cannot be connected to any other network. I want to add special /etc/hosts entry, but failed

# Example configuration file, it's safe to copy this as the default config file without any modification.

log:
  # The level of logging, can be trace, debug, info, warn, error, fatal
  level: info

runner:
  # Where to store the registration result.
  file: .runner
  # Execute how many tasks concurrently at the same time.
  capacity: 1
  # Extra environment variables to run jobs.
  envs:
    A_TEST_ENV_NAME_1: a_test_env_value_1
    A_TEST_ENV_NAME_2: a_test_env_value_2
  # Extra environment variables to run jobs from a file.
  # It will be ignored if it's empty or the file doesn't exist.
  env_file: .env
  # The timeout for a job to be finished.
  # Please note that the Gitea instance also has a timeout (3h by default) for the job.
  # So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
  timeout: 3h
  # Whether skip verifying the TLS certificate of the Gitea instance.
  insecure: true
  # The timeout for fetching the job from the Gitea instance.
  fetch_timeout: 5s
  # The interval for fetching the job from the Gitea instance.
  fetch_interval: 5s

cache:
  # Enable cache server to use actions/cache.
  enabled: true
  # The directory to store the cache data.
  # If it's empty, the cache data will be stored in $HOME/.cache/actcache.
  dir: ""
  # The host of the cache server.
  # It's not for the address to listen, but the address to connect from job containers.
  # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
  host: ""
  # The port of the cache server.
  # 0 means to use a random available port.
  port: 0

container:
  # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network.
  network_mode: bridge
  # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
  privileged: true
  # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
  options: '--add-host=git.in.exfly.top:192.168.33.10'
  # The parent directory of a job's working directory.
  # If it's empty, /workspace will be used.
  workdir_parent:

ci will failed

docker network connect GITEA-ACTIONS-TASK-21_WORKFLOW-Gitea-Actions-Demo_JOB-Explore-Gitea-Actions-network GITEA-ACTIONS-TASK-21_WORKFLOW-Gitea-Actions-Demo_JOB-Explore-Gitea-Actions
22
Error response from daemon: container sharing network namespace with another container or host cannot be connected to any other network

Gitea Version

itea version 1.19.3 built with GNU Make 4.3, go1.20.4 : bindata, timetzdata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

TODO

Screenshots

image

Git Version

git version 2.38.5

Operating System

Linux shared-gitea-0 5.4.0-124-generic #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022 x86_64 Linux

How are you running Gitea?

run in k8s with office charts

Database

PostgreSQL

@exfly exfly added the type/bug label May 16, 2023
@wolfogre wolfogre added the topic/gitea-actions related to the actions of Gitea label May 17, 2023
@wolfogre
Copy link
Member

wolfogre commented May 17, 2023

Could you please update your runner to latest version and try again?

There is some work that has been done on the runner network, but I'm not sure if they are related.

And I'm sure it’s unrelated to Gitea, so would you mind moving this issue to act_runner?

@lng2020 lng2020 added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Nov 6, 2023
@GiteaBot
Copy link
Contributor

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

No branches or pull requests

4 participants