【问题标题】:PODMAN: Unable to assign IP to a containerPODMAN:无法为容器分配 IP
【发布时间】:2021-01-10 04:01:22
【问题描述】:

我正在测试一个应用程序并尝试将一个 IP 分配给一个容器,但它保留了 失败并显示以下消息:

# podman create \
   --hostname test1 \
   --name test1 \
   --net test_nw \
   --ip 172.16.1.90 \
   oraclelinux:7
Error: error running container create option: cannot set a static IP if
joining additional CNI networks: invalid argument

以下是网络配置:

# cat /etc/cni/net.d/88-racpub-bridge.conflist
{
    "cniVersion": "0.3.0",
    "name": "test_nw",
    "plugins": [
      {
        "type": "bridge",
        "bridge": "cni0",
        "isGateway": true,
        "ipMasq": true,
        "ipam": {
            "type": "host-local",
            "subnet": "172.16.1.0/24",
            "routes": [
                { "dst": "0.0.0.0/0" }
            ]
        }
      },
      {
        "type": "portmap",
        "capabilities": {
          "portMappings": true
        }
      }
    ]
}

【问题讨论】:

  • 我正在与类似的事情作斗争。 github 上有大量关于 podman 和/或 CNI 不尊重 ip 和 mac 选项的错误。您是否尝试过此处提供的示例:blog.carroarmato0.be/2020/05/08/…

标签: podman


【解决方案1】:

这是 RHEL 7 上 Podman 的一个已知问题:https://access.redhat.com/solutions/5369511

您使用的是哪个 RHEL 版本?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-15
    • 2015-03-12
    • 2020-04-30
    • 2022-11-11
    • 2019-07-28
    • 2021-10-26
    • 2023-02-03
    • 1970-01-01
    相关资源
    最近更新 更多