skip to Main Content

I just git clone from the reposirotyr, and config all environment, finally after I make install,my podman version printf this:

root@PS-03:/opt/go/src/github.com/containers/libpod# podman version
ERRO[0000] Error loading CNI config file /etc/cni/net.d/99-loopback.conf: error parsing configuration: missing 'type' 
Version:      3.2.0-dev
API Version:  3.2.0-dev
Go Version:   go1.16.3
Git Commit:   d6ec38f2eec6c9ac9e11db5cbf949a357fa13f28
Built:        Sat May  1 16:21:00 2021
OS/Arch:      linux/amd64

and my /etc/cni/net.d/99-loopback.conf content is:

root@PS-03:/opt/go/src/github.com/containers/libpod# more /etc/cni/net.d/99-loopback.conf 
{
  "cniVersion": "0.4.0",
  "name": "podman",
  "plugins": [
    {
      "type": "bridge",
      "bridge": "cni-podman0",
      "isGateway": true,
      "ipMasq": true,
      "hairpinMode": true,
      "ipam": {
        "type": "host-local",
        "routes": [{ "dst": "0.0.0.0/0" }],
        "ranges": [
          [
            {
              "subnet": "10.88.0.0/16",
              "gateway": "10.88.0.1"
            }
          ]
        ]
      }
    },
    {
      "type": "portmap",
      "capabilities": {
        "portMappings": true
      }
    },
    {
      "type": "firewall"
    },
    {
      "type": "tuning"
    }
  ]
}

can somebody help me? tks.

2

Answers


  1. Chosen as BEST ANSWER

    it's so hard guys, I delete the 99-loopback.conf file, and use the default configuration file named "87-podman-bridge.conflist".now, it looks right, hope it can work without issue.


  2. A bit late here, but the exact answer is that .conf (or .json) is treaten as a single plugin config, whereas .conflist can have multiple config. It’s not really clear in any documentation, but it’s here:

    LoadConfList

    func LoadConfList(dir, name string) (*NetworkConfigList, error) {
        files, err := ConfFiles(dir, []string{".conflist"})
    

    versus

    LoadConf

    func LoadConf(dir, name string) (*NetworkConfig, error) {
        files, err := ConfFiles(dir, []string{".conf", ".json"})
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search