Skip to content

Invalid network names on podman #2685

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

Open
rhbvkleef opened this issue Feb 27, 2025 · 1 comment
Open

Invalid network names on podman #2685

rhbvkleef opened this issue Feb 27, 2025 · 1 comment

Comments

@rhbvkleef
Copy link

I am running a Forgejo runner (which uses act under the hood) in conjunction with Podman. In general this works fine, but there's an issue with creating network names if the job-id's have spaces in them. The issue appears to occur here. Specifically, Podman requires network names to conform to the regex [a-zA-Z0-9][a-zA-Z0-9_.-]*, but obviously, if the job-id contains one or more spaces, this will not be the case.

I've already submitted a bug report for Forgejo Runner, and that contains more information on how exactly I am running it.

I'm sorry for this slightly unconventional bug report, but I couldn't really fit it in the common bug template, as I'm not running act directly.

Software versions

I am running:

  • Forgejo Runner 6.2.2
    • Act 0.2.49
    • Go 1.23
  • Host:
    • Bazzite 41.20250216.0 (Silverblue)
    • Kernel 6.12.12-207.bazzite.fc41.x86_64
  • Container:
    • Alpine Linux 3.20.5
    • Image: code.forgejo.org/forgejo/runner:6.2.2

Podman

host:
  arch: amd64
  buildahVersion: 1.38.1
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - misc
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-3.fc41.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 95.9
    systemPercent: 1.03
    userPercent: 3.07
  cpus: 8
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: container
    version: "41"
  eventLogger: file
  freeLocks: 2048
  hostname: systemd-forgejo
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 1
      size: 999
    - container_id: 1000
      host_id: 1001
      size: 64535
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 1
      size: 999
    - container_id: 1000
      host_id: 1001
      size: 64535
  kernel: 6.12.12-207.bazzite.fc41.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 3237052416
  memTotal: 25056137216
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.14.0-1.fc41.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.14.0
    package: netavark-1.14.0-1.fc41.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.14.0
  ociRuntime:
    name: crun
    package: crun-1.20-2.fc41.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.20
      commit: 9c9a76ac11994701dd666c4f0b869ceffb599a66
      rundir: /tmp/storage-run-1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20250217.ga1e48a0-2.fc41.x86_64
    version: ""
  remoteSocket:
    exists: true
    path: /tmp/storage-run-1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 4286312448
  swapTotal: 4294963200
  uptime: 141h 12m 35.00s (Approximately 5.88 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  configFile: /home/podman/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/podman/.local/share/containers/storage
  graphRootAllocated: 248355225600
  graphRootUsed: 26972405760
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /tmp/storage-run-1000/containers
  transientStore: false
  volumePath: /home/podman/.local/share/containers/storage/volumes
version:
  APIVersion: 5.3.2
  Built: 17375040

Workflow Content

on:
  - push
env:
  ENV_TYPE: 'TEST'
jobs:
  Django Check:
    runs-on: oci
    container:
      image: nikolaik/python-nodejs:python3.11-nodejs23-bullseye
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: ./.forgejo/actions/prepare
      - working-directory: ./dzeuros
        run: ../env/bin/python3 manage.py check

Relevant Log Output

2025-02-22T14:10:23.8241195Z titan.vankleef.me(version:v6.2.2) received task 455662 of job 740043, be triggered by event: push
2025-02-22T14:10:23.8246073Z workflow prepared
2025-02-22T14:10:23.8249373Z 🚀  Start image=nikolaik/python-nodejs:python3.11-nodejs23-bullseye
2025-02-22T14:10:23.8897943Z   🐳  docker pull image=nikolaik/python-nodejs:python3.11-nodejs23-bullseye platform= username= forcePull=false
2025-02-22T14:10:23.9092523Z Error response from daemon: network name FORGEJO-ACTIONS-TASK-455662_WORKFLOW_JOB-Django-Check-Django Check-network invalid: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument
@ChristopherHX
Copy link
Contributor

This is an invalid workflow file per GitHub Actions Docs: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_id

I would turn this issue more towards, missing job-id validation of forgejo.

Please verify that issues you open here can be reproduced on our side.

jobs like this are early failed

on: push
jobs:
  hello world:
    runs-on: ubuntu-latest
    steps:
    - name: Hello world
      run: echo Hello world
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' 
Error: workflow is not valid. 'x.yml': Job name 'hello world' is invalid. Names must start with a letter or '_' and contain only alphanumeric characters, '-', or '_'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants