Centos 为什么《播客》要报道;命名空间中没有足够的可用ID“;用不同的UID?

Centos 为什么《播客》要报道;命名空间中没有足够的可用ID“;用不同的UID?,centos,containers,cgroups,linux-namespaces,podman,Centos,Containers,Cgroups,Linux Namespaces,Podman,事实: 无根podman非常适合uid1480 uid2088的无根播客失败 CentOS 7 内核3.10.0-1062.1.2.el7.x86_64 播客版本1.4.4 几乎整个环境都已在两者之间移除 /tmp的文件系统是xfs 两个用户的capsh输出是相同的,但uid/username的输出是相同的 两个UID在/etc/sub{u,g}id文件中有相同的条目 $HOME/.config/containers/storage.conf是默认值,除了UID之外,这两个文件之间是相同的。下面

事实:

  • 无根podman非常适合uid
    1480
  • uid
    2088的无根播客失败
  • CentOS 7
  • 内核
    3.10.0-1062.1.2.el7.x86_64
  • 播客版本
    1.4.4
  • 几乎整个环境都已在两者之间移除
  • /tmp
    的文件系统是
    xfs
  • 两个用户的
    capsh
    输出是相同的,但uid/username的输出是相同的
  • 两个UID在
    /etc/sub{u,g}id
    文件中有相同的条目
  • $HOME/.config/containers/storage.conf
    是默认值,除了UID之外,这两个文件之间是相同的。下面的
    storage.conf
    仅供参考
  • 我编写了以下shell脚本,以演示两者在一个多么相似的环境中运行:

    #/垃圾箱/垃圾箱
    一四八零二零八八年为我;做
    
    sudo chroot--userspec“$i”:10/env-i/bin/sh默认情况下CentOS 7.6不支持无根buildah-请参阅和

    podman系统是否迁移
    fix
    命名空间中可能没有足够的ID可供您使用

    这对我和其他人都有好处:
    用户之间的AFAICT、sub UID和GID范围不应重叠。以下是
    useradd
    手册页对此事的说明,以供参考:

       SUB_GID_MIN (number), SUB_GID_MAX (number), SUB_GID_COUNT
       (number)
           If /etc/subuid exists, the commands useradd and newusers
           (unless the user already have subordinate group IDs)
           allocate SUB_GID_COUNT unused group IDs from the range
           SUB_GID_MIN to SUB_GID_MAX for each new user.
    
           The default values for SUB_GID_MIN, SUB_GID_MAX,
           SUB_GID_COUNT are respectively 100000, 600100000 and 65536.
    
       SUB_UID_MIN (number), SUB_UID_MAX (number), SUB_UID_COUNT
       (number)
           If /etc/subuid exists, the commands useradd and newusers
           (unless the user already have subordinate user IDs) allocate
           SUB_UID_COUNT unused user IDs from the range SUB_UID_MIN to
           SUB_UID_MAX for each new user.
    
           The default values for SUB_UID_MIN, SUB_UID_MAX,
           SUB_UID_COUNT are respectively 100000, 600100000 and 65536.
    

    关键词未使用。

    似乎OP已经成功运行了无根播客(并且没有询问buildah)?在CentOS 8.1上从我这里开始工作。这在Arch Linux上为我完成了这个技巧始终咨询主页,然后是StackOverflow,感谢您记住我。这篇红帽博客文章揭示了同样的情况:
    [storage]
      driver = "vfs"
      runroot = "/run/user/1480"
      graphroot = "/tmp/1480/.local/share/containers/storage"
      [storage.options]
        size = ""
        remap-uids = ""
        remap-gids = ""
        remap-user = ""
        remap-group = ""
        ostree_repo = ""
        skip_mount_home = ""
        mount_program = ""
        mountopt = ""
        [storage.options.thinpool]
          autoextend_percent = ""
          autoextend_threshold = ""
          basesize = ""
          blocksize = ""
          directlvm_device = ""
          directlvm_device_force = ""
          fs = ""
          log_level = ""
          min_free_space = ""
          mkfsarg = ""
          mountopt = ""
          use_deferred_deletion = ""
          use_deferred_removal = ""
          xfs_nospace_max_retries = ""
    
    $ diff -u /tmp/podman.1480 /tmp/podman.2088
    --- /tmp/podman.1480    2019-10-17 22:41:21.991573733 -0400
    +++ /tmp/podman.2088    2019-10-17 22:41:26.182584536 -0400
    @@ -7,7 +7,7 @@
       Distribution:
         distribution: '"centos"'
         version: "7"
    -  MemFree: 45654056960
    +  MemFree: 45652697088
       MemTotal: 67306323968
       OCIRuntime:
         package: containerd.io-1.2.6-3.3.el7.x86_64
    @@ -24,7 +24,7 @@
       kernel: 3.10.0-1062.1.2.el7.x86_64
       os: linux
       rootless: true
    -  uptime: 30h 17m 50.23s (Approximately 1.25 days)
    +  uptime: 30h 17m 54.42s (Approximately 1.25 days)
     registries:
       blocked: null
       insecure: null
    @@ -35,14 +35,14 @@
       - quay.io
       - registry.centos.org
     store:
    -  ConfigFile: /tmp/1480/.config/containers/storage.conf
    +  ConfigFile: /tmp/2088/.config/containers/storage.conf
       ContainerStore:
         number: 0
       GraphDriverName: vfs
       GraphOptions: null
    -  GraphRoot: /tmp/1480
    +  GraphRoot: /tmp/2088
       GraphStatus: {}
       ImageStore:
         number: 0
    -  RunRoot: /run/user/1480
    -  VolumePath: /tmp/1480/volumes
    +  RunRoot: /run/user/2088
    +  VolumePath: /tmp/2088/volumes
    
       SUB_GID_MIN (number), SUB_GID_MAX (number), SUB_GID_COUNT
       (number)
           If /etc/subuid exists, the commands useradd and newusers
           (unless the user already have subordinate group IDs)
           allocate SUB_GID_COUNT unused group IDs from the range
           SUB_GID_MIN to SUB_GID_MAX for each new user.
    
           The default values for SUB_GID_MIN, SUB_GID_MAX,
           SUB_GID_COUNT are respectively 100000, 600100000 and 65536.
    
       SUB_UID_MIN (number), SUB_UID_MAX (number), SUB_UID_COUNT
       (number)
           If /etc/subuid exists, the commands useradd and newusers
           (unless the user already have subordinate user IDs) allocate
           SUB_UID_COUNT unused user IDs from the range SUB_UID_MIN to
           SUB_UID_MAX for each new user.
    
           The default values for SUB_UID_MIN, SUB_UID_MAX,
           SUB_UID_COUNT are respectively 100000, 600100000 and 65536.