apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
308 stars 126 forks source link

when cgroupdriver use systemd,the controller can't start #229

Open usernameisnull opened 1 month ago

usernameisnull commented 1 month ago

The issue tracker is ONLY used for the bug report(feature request need to follow RIP process). Keep in mind, please check whether there is an existing same report before you raise a new one.

Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration and other improvements.

Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:

BUG REPORT

  1. Please describe the issue you observed:
  1. Please tell us about your environment: node:

        root@master01:~# cat /etc/os-release
        PRETTY_NAME="Ubuntu 22.04.1 LTS"
        NAME="Ubuntu"
        VERSION_ID="22.04"
        VERSION="22.04.1 LTS (Jammy Jellyfish)"
        VERSION_CODENAME=jammy
        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=jammy
    

    docker version

    root@master01:~# docker version
    Client: Docker Engine - Community
     Version:           20.10.21
     API version:       1.41
     Go version:        go1.18.7
     Git commit:        baeda1f
     Built:             Tue Oct 25 18:01:58 2022
     OS/Arch:           linux/amd64
     Context:           default
     Experimental:      true
    
    Server: Docker Engine - Community
     Engine:
      Version:          20.10.21
      API version:      1.41 (minimum version 1.12)
      Go version:       go1.18.7
      Git commit:       3056208
      Built:            Tue Oct 25 17:59:49 2022
      OS/Arch:          linux/amd64
      Experimental:     false
     containerd:
      Version:          1.6.9
      GitCommit:        1c90a442489720eec95342e1789ee8a5e1b9536f
     runc:
      Version:          1.1.4
      GitCommit:        v1.1.4-0-g5fd4c4d
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    

    /etc/docker/daemon.json

    root@master01:~# cat  /etc/docker/daemon.json
    {
      "registry-mirrors": ["https://xxxx.aliyuncs.com"],
      "exec-opts": ["native.cgroupdriver=systemd"],
      "insecure-registries" : [ "0.0.0.0/0" ],
      "dns": ["8.8.8.8","114.114.114.114"]
    }
    

    docker info

    docker info | grep Cgroup
    Cgroup Driver: systemd
    Cgroup Version: 2

    systemctl status docker

    root@worker01:~# systemctl status docker
    ● docker.service - Docker Application Container Engine
         Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
         Active: active (running) since Tue 2024-05-07 16:25:48 CST; 6 days ago
    TriggeredBy: ● docker.socket
           Docs: https://docs.docker.com
       Main PID: 1039 (dockerd)
          Tasks: 35
         Memory: 514.5M
            CPU: 7h 33min 19.623s
         CGroup: /system.slice/docker.service
                 └─1039 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
    

    kubelet info

    root@master01:~# systemctl status kubelet
    ● kubelet.service - kubelet: The Kubernetes Node Agent
         Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
        Drop-In: /etc/systemd/system/kubelet.service.d
                 └─10-kubeadm.conf
         Active: active (running) since Tue 2024-04-16 23:38:54 CST; 3 weeks 6 days ago
           Docs: https://kubernetes.io/docs/
       Main PID: 2398 (kubelet)
          Tasks: 31 (limit: 21440)
         Memory: 135.5M
            CPU: 1d 20h 16min 49.986s
         CGroup: /system.slice/kubelet.service
                 └─2398 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.9
    
    root@master01:~# cat /var/lib/kubelet/config.yaml|grep cgroupDriver
    cgroupDriver: systemd
    
  2. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc): the logs of pod

    kubectl  logs controller-0
    cat: can't open '/sys/fs/cgroup/memory/memory.limit_in_bytes': No such file or directory
    /root/rocketmq/controller/bin/runserver.sh: line 58: arithmetic syntax error
    

    FEATURE REQUEST

  3. Please describe the feature you are requesting.

  4. Provide any additional detail on your proposed use case for this feature.

  5. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

  6. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task: