相关文章推荐
风流的凳子  ·  检韵映盛世 ...·  11 月前    · 
忐忑的爆米花  ·  杭州市锦绣中学·  1 年前    · 
痴情的墨镜  ·  要打开ACG游戏要下载什么什么运行库 - ...·  1 年前    · 
帅气的黑框眼镜  ·  甘谷苹果再获国家金奖-天水市人民政府 科学技术局·  1 年前    · 
开朗的毛衣  ·  微软新版本支持 Surface ...·  2 年前    · 
Code  ›  Job won’t complete: containers with unready status (#38035) · Issues · GitLab.org / gitlab-runner ·
affinity
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/38035
道上混的饭盒
6 月前
Summary

Since upgrading the runner to v17.4.0 , some jobs with extra service(s) will not complete if one of the service container is not running.

In our specific case, a docker service is defined in the runner's Helm configuration and also in the job's definition. One of them will stop because of duplicated ports. In a different scenario, a job has a docker service configured but is attempting to run on a non-privileged runner. The service container is started but immediately stopped.

Steps to reproduce
  • Start a job with a service
  • Ensure that the service is stopped before the end of the job
  • Let the job complete successfully
  • Actual behavior

    The job will wait for the stopped container to be in a "running" state before ending

    Expected behavior

    The job will stop with the "success" status

    Relevant logs and/or screenshots Environment description

    We are using our own runners, deployed using Helm on an AKS cluster.

    config.toml contents
    [[runners]]
        pre_build_script = REDACTED
        environment = [
          "DOCKER_HOST=REDACTED",
          "DOCKER_TLS_CERTDIR=REDACTED",
        [runners.kubernetes]
          namespace = "{{.Release.Namespace}}"
          pull_policy = ["if-not-present"]
          image_pull_secrets = ["dockerhub"]
          image = "ubuntu:20.10.17"
          privileged = true
          poll_timeout = 500
          # The affinity definition below define a scheduling preference for job so they avoid running on system nodes.
          # This block must be copied in every configuration as it is not currently possible to extract it for easier reuse.
          [runners.kubernetes.affinity]
            [runners.kubernetes.affinity.node_affinity]
              [[runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution]]
                weight = 100
                [runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.label_selector]
                  [[runners.kubernetes.affinity.node_affinity.preferred_during_scheduling_ignored_during_execution.label_selector.match_expressions]]
                    key = "kubernetes.azure.com/mode"
                    operator = "In"
                    values = ["user"]
          [[runners.kubernetes.services]]
            name = "docker:dind"
            command = ["--insecure-registry=REDACTED", "--registry-mirror=REDACTED"]
          [runners.kubernetes.volumes]
            [[runners.kubernetes.volumes.config_map]]
              name = "runner-scripts"
              mount_path = "REDACTED"
          [runners.kubernetes.pod_labels]
            axceta_job_id = "$CI_JOB_ID"
            axceta_job_name = "$CI_JOB_NAME"
            axceta_job_stage = "$CI_JOB_STAGE"
            axceta_project_name = "$CI_PROJECT_NAME"
            axceta_project_id = "$CI_PROJECT_ID"
            axceta_pipeline_id = "$CI_PIPELINE_ID"
        [[runners.kubernetes.volumes.empty_dir]]
          name = "docker-certs"
          REDACTED
        [[runners.kubernetes.volumes.secret]]
          name = "dockerhub"
          REDACTED
      [runners.cache]
        Type = "azure"
        Shared = true
        [runners.cache.azure]
          REDACTED
     
    推荐文章
    风流的凳子  ·  检韵映盛世 欢歌庆华章!渭南市人民检察院2025年元旦文艺汇演成功举办_渭南市人民检察院
    11 月前
    忐忑的爆米花  ·  杭州市锦绣中学
    1 年前
    痴情的墨镜  ·  要打开ACG游戏要下载什么什么运行库 - CSDN文库
    1 年前
    帅气的黑框眼镜  ·  甘谷苹果再获国家金奖-天水市人民政府 科学技术局
    1 年前
    开朗的毛衣  ·  微软新版本支持 Surface Pen,OneNote 快速笔记功能安排了_用户_消息_显示
    2 年前
    今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
    删除内容请联系邮箱 2879853325@qq.com
    Code - 代码工具平台
    © 2024 ~ 沪ICP备11025650号