Skip to content

Issues with parsing the version number of AppArmor in Ubuntu 23.10. #9464

Closed as not planned

Description

@ThisIsBenny

Description

I have installed Ubuntu 23.10 on my new Raspberry Pi 5 and added the Pi to my K3S Cluster.

Problem is that i can't succsfull start any container on the Pi 5 and i see this error:

Error: failed to create containerd container: get apparmor_parser version: strconv.Atoi: parsing "0~alpha2": invalid syntax

The parsing failed because the Version number of AppArmor includes "~alpha2", which is unexpected: 4.0.0~alpha2

There was a similar issue in Podman: podman-container-tools/podman#20278

Steps to reproduce the issue

  1. Try to start a container via k3s

Describe the results you received and expected

Error: failed to create containerd container: get apparmor_parser version: strconv.Atoi: parsing "0~alpha2": invalid syntax

What version of containerd are you using?

1.7.2

Any other relevant information

runc version 1.1.7-0ubuntu2
spec: 1.0.2-dev
go: go1.21.0
libseccomp: 2.5.4

{
"status": {
"conditions": [
{
"type": "RuntimeReady",
"status": true,
"reason": "",
"message": ""
},
{
"type": "NetworkReady",
"status": true,
"reason": "",
"message": ""
}
]
},
"cniconfig": {
"PluginDirs": [
"/var/lib/rancher/k3s/data/8ba10e6674ad2dd3b3ac1d08a029eecd6609e2c058d8e7dc7c6d7b959d1da765/bin"
],
"PluginConfDir": "/var/lib/rancher/k3s/agent/etc/cni/net.d",
"PluginMaxConfNum": 1,
"Prefix": "eth",
"Networks": [
{
"Config": {
"Name": "cni-loopback",
"CNIVersion": "0.3.1",
"Plugins": [
{
"Network": {
"type": "loopback",
"ipam": {},
"dns": {}
},
"Source": "{"type":"loopback"}"
}
],
"Source": "{\n"cniVersion": "0.3.1",\n"name": "cni-loopback",\n"plugins": [{\n "type": "loopback"\n}]\n}"
},
"IFName": "lo"
},
{
"Config": {
"Name": "cbr0",
"CNIVersion": "0.3.1",
"Plugins": [
{
"Network": {
"type": "flannel",
"ipam": {},
"dns": {}
},
"Source": "{"delegate":{"forceAddress":true,"hairpinMode":true,"isDefaultGateway":true},"type":"flannel"}"
},
{
"Network": {
"type": "portmap",
"capabilities": {
"portMappings": true
},
"ipam": {},
"dns": {}
},
"Source": "{"capabilities":{"portMappings":true},"type":"portmap"}"
}
],
"Source": "{\n "name":"cbr0",\n "cniVersion":"0.3.1",\n "plugins":[\n {\n "type":"flannel",\n "delegate":{\n "hairpinMode":true,\n "forceAddress":true,\n "isDefaultGateway":true\n }\n },\n {\n "type":"portmap",\n "capabilities":{\n "portMappings":true\n }\n }\n ]\n}\n"
},
"IFName": "eth0"
}
]
},
"config": {
"containerd": {
"snapshotter": "overlayfs",
"defaultRuntimeName": "runc",
"defaultRuntime": {
"runtimeType": "",
"runtimeEngine": "",
"PodAnnotations": null,
"ContainerAnnotations": null,
"runtimeRoot": "",
"options": null,
"privileged_without_host_devices": false,
"baseRuntimeSpec": ""
},
"untrustedWorkloadRuntime": {
"runtimeType": "",
"runtimeEngine": "",
"PodAnnotations": null,
"ContainerAnnotations": null,
"runtimeRoot": "",
"options": null,
"privileged_without_host_devices": false,
"baseRuntimeSpec": ""
},
"runtimes": {
"runc": {
"runtimeType": "io.containerd.runc.v2",
"runtimeEngine": "",
"PodAnnotations": null,
"ContainerAnnotations": null,
"runtimeRoot": "",
"options": null,
"privileged_without_host_devices": false,
"baseRuntimeSpec": ""
}
},
"noPivot": false,
"disableSnapshotAnnotations": true,
"discardUnpackedLayers": false
},
"cni": {
"binDir": "/var/lib/rancher/k3s/data/8ba10e6674ad2dd3b3ac1d08a029eecd6609e2c058d8e7dc7c6d7b959d1da765/bin",
"confDir": "/var/lib/rancher/k3s/agent/etc/cni/net.d",
"maxConfNum": 1,
"confTemplate": ""
},
"registry": {
"mirrors": {
"docker.io": {
"endpoint": [
"https://registry-1.docker.io"
],
"rewrite": null
}
},
"configs": null,
"auths": null,
"headers": null
},
"imageDecryption": {
"keyModel": ""
},
"disableTCPService": true,
"streamServerAddress": "127.0.0.1",
"streamServerPort": "10010",
"streamIdleTimeout": "4h0m0s",
"enableSelinux": false,
"selinuxCategoryRange": 1024,
"sandboxImage": "rancher/pause:3.1",
"statsCollectPeriod": 10,
"systemdCgroup": false,
"enableTLSStreaming": false,
"x509KeyPairStreaming": {
"tlsCertFile": "",
"tlsKeyFile": ""
},
"maxContainerLogSize": 16384,
"disableCgroup": false,
"disableApparmor": false,
"restrictOOMScoreAdj": false,
"maxConcurrentDownloads": 3,
"disableProcMount": false,
"unsetSeccompProfile": "",
"tolerateMissingHugetlbController": true,
"disableHugetlbController": true,
"ignoreImageDefinedVolumes": false,
"containerdRootDir": "/var/lib/rancher/k3s/agent/containerd",
"containerdEndpoint": "/run/k3s/containerd/containerd.sock",
"rootDir": "/var/lib/rancher/k3s/agent/containerd/io.containerd.grpc.v1.cri",
"stateDir": "/run/k3s/containerd/io.containerd.grpc.v1.cri"
},
"golang": "go1.16.10",
"lastCNILoadStatus": "OK"
}

Linux pi-04 6.5.0-1007-raspi #9-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 7 18:36:01 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Show configuration if it is related to CRI plugin.

disabled_plugins = ["cri"]

#root = "/var/lib/containerd"
#state = "/run/containerd"
#subreaper = true
#oom_score = 0

#[grpc]

address = "/run/containerd/containerd.sock"

uid = 0

gid = 0

#[debug]

address = "/run/containerd/debug.sock"

uid = 0

gid = 0

level = "info"

Activity

  1. lengrongfu commented on Dec 8, 2023

    @lengrongfu
    Contributor

    /assign

  2. lengrongfu commented on Dec 9, 2023

    @lengrongfu
    Contributor

    @ThisIsBenny I can't reproduce this problem.

    • uname
    $ uname -r
    6.5.10-orbstack-00110-gbcfe04c86d2f
    
    • apparmor_parser
    $ apparmor_parser --version
    AppArmor parser version 4.0.0~alpha2
    Copyright (C) 1999-2008 Novell Inc.
    Copyright 2009-2018 Canonical Ltd.
    
    • runc
    $ runc --version
    runc version 1.1.7
    commit: v1.1.7-0-g860f061b
    spec: 1.0.2-dev
    go: go1.20.3
    libseccomp: 2.5.4
    
    • containerd
    $ containerd --version
    containerd github.com/containerd/containerd v1.7.2 0cae528dd6cb557f7201036e9f43420650207b58
    
    • os-release
    $ cat /etc/os-release
    PRETTY_NAME="Ubuntu 23.10"
    NAME="Ubuntu"
    VERSION_ID="23.10"
    VERSION="23.10 (Mantic Minotaur)"
    VERSION_CODENAME=mantic
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=mantic
    LOGO=ubuntu-logo
    
    • create container and resoult
    $ ctr c create docker.io/library/redis:alpine redis-container
    $ ctr c ls
    CONTAINER          IMAGE                             RUNTIME
    redis-container    docker.io/library/redis:alpine    io.containerd.runc.v2
    
  3. ThisIsBenny commented on Dec 9, 2023

    @ThisIsBenny
    Author

    I have downgraded the Apparmor Version to 3.0.8 on my Raspberry PI to unblock my setup, so I have now a different situation. What I have notice is that the apparmor_parser is still 4.0.0~alpha2.

  4. thaJeztah commented on Dec 9, 2023

    @thaJeztah
    Member

    The version parsing was removed in containerd 1.7 (probably could be removed from 1.6 as well, as it was not really used);

  5. lengrongfu commented on Dec 9, 2023

    @lengrongfu
    Contributor

    Then it is abnormal for contained version 1.7.2 in the issue to report this error.

  6. removed their assignment
    on Dec 9, 2023
  7. lengrongfu commented on Dec 9, 2023

    @lengrongfu
    Contributor

    looking this is not bug for containerd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions