You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "cqmmm (via GitHub)" <gi...@apache.org> on 2024/08/12 01:49:59 UTC

[I] Adapt to cgroup v2 version [rocketmq-operator]

cqmmm opened a new issue, #232:
URL: https://github.com/apache/rocketmq-operator/issues/232

   When we created a RocketMQ cluster on an Ubuntu 22.04 cluster, the controller encountered this error. We found that starting from Ubuntu 21.10, cgroup v2 is used by default, and many Java applications need to be adapted. I believe it's necessary to make this adaptation. Currently, we resolved it by downgrading the cgroup version to v1.
   <img width="639" alt="WeChatWorkScreenshot_1b979dd4-76ac-4e85-90fc-135aafc8c89b" src="https://github.com/user-attachments/assets/047833a2-a81b-4f23-8751-00c55b3998c5">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5655098416

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The operator's cgroup v1 dependency breaks on Ubuntu 22.04+ and other modern Linux distributions that use cgroup v2 by default. The controller's resource limit parsing needs to be updated to support cgroup v2's unified hierarchy.
   
   ---
   *Automated evaluation by github-manager*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5370440169

   Hi @cqmmm! 👋
   
   Thanks for your contribution. This issue has been noted and flagged for maintainer triage.
   
   ---
   🤖 *Automated issue analysis by github-manager*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "warnerchen (via GitHub)" <gi...@apache.org>.
warnerchen commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-2296918070

   I have the same problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5487023139

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   Adapting to cgroup v2 is a valid and increasingly important enhancement. Ubuntu 22.04+ and newer Kubernetes distributions use cgroup v2 by default, and Java applications need proper cgroup awareness for correct resource limits.
   
   **Feasibility:** Feasible — Java 11+ has cgroup v2 support via `-XX:+UseContainerSupport`, but the operator scripts and Docker images may need updates.
   **Scope:** Docker images, startup scripts, and JVM options in the operator.
   **Compatibility:** Should be backward compatible with cgroup v1 systems.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "asjfoajs (via GitHub)" <gi...@apache.org>.
asjfoajs commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-2343047937

   可以看一下#198


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5292651507

   **Issue Evaluation**
   
   Category: `type/enhancement` | Status: **Evaluated**
   
   Adapting RocketMQ to cgroup v2 is a valid and timely enhancement. As Kubernetes distributions increasingly default to cgroup v2 (K8s 1.25+), the JVM and native processes inside RocketMQ containers need to correctly read resource limits from the cgroup v2 hierarchy.
   
   **Feasibility:** feasible — primarily involves updating JVM flags (`-XX:+UseContainerSupport` is default in JDK 10+) and verifying that broker/store memory calculations respect cgroup v2 limits.
   **Scope:** Dockerfile, JVM startup scripts, operator resource limit handling
   **Compatibility:** Should be backward-compatible with cgroup v1 environments.
   
   This is a valuable improvement for modern Kubernetes deployments.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "zhihui921016 (via GitHub)" <gi...@apache.org>.
zhihui921016 commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-2343049343

   您好,您的邮件我已经收到。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5537667916

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   Adapting to cgroup v2 is a forward-looking enhancement as Linux distributions increasingly adopt cgroup v2 as the default. This ensures RocketMQ operator compatibility with modern Kubernetes clusters.
   
   **Feasibility:** Feasible, requires testing on cgroup v2 clusters
   **Scope:** Resource management and monitoring components
   **Compatibility:** Should maintain backward compatibility with cgroup v1
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5364748558

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   **Feasibility:** feasible
   **Scope:** Broker container image and resource configuration
   **Compatibility:** Needs to handle both cgroup v1 and v2 environments.
   
   With the Linux kernel moving to cgroup v2 as the default (Ubuntu 22.04+, RHEL 9+), the RocketMQ Operator and Broker images need to support cgroup v2 for correct resource limit detection.
   
   The JVM inside the Broker container reads cgroup v1 paths (`/sys/fs/cgroup/memory/...`) for memory limits. On cgroup v2 systems, these paths don't exist, causing the JVM to fall back to host-level resource detection.
   
   This requires:
   - Updating the JVM flags to use `-XX:+UseContainerSupport` (Java 11+)
   - Ensuring the Broker startup script detects cgroup version
   - Testing on both cgroup v1 and v2 nodes
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5395024482

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** Docker image / JVM startup scripts
   **Compatibility:** Non-breaking — JVM arguments for cgroup v2 are backward compatible with newer JDK versions.
   
   Valid enhancement. Ubuntu 22.04+ and other modern distros use cgroup v2 by default. Java applications (especially older JDK versions) need explicit cgroup v2 support via JVM flags (`-XX:+UseContainerSupport` in JDK 11+).
   
   **Suggested fix:** Update the Docker image entrypoint to detect cgroup v2 and add appropriate JVM flags. Consider upgrading the base JDK to 11+ which has better cgroup v2 support.
   
   ---
   *Automated evaluation by github-manager*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-5533793059

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   **Feasibility:** feasible
   **Scope:** Resource limit configuration in CRDs, container runtime detection
   **Compatibility:** Needs to maintain backward compatibility with cgroup v1
   
   Adapting to cgroup v2 is a valid enhancement as more Kubernetes distributions move to cgroup v2 by default. The operator should detect the cgroup version and set appropriate resource limits.
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Adapt to cgroup v2 version [rocketmq-operator]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #232:
URL: https://github.com/apache/rocketmq-operator/issues/232#issuecomment-4689045510

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Needs Verification**
   
   Thank you for reporting this issue. To proceed with verification, please provide:
   - [ ] Version/tag or commit hash where this occurs
   - [ ] Steps to reproduce
   - [ ] Expected vs actual behavior
   - [ ] Relevant logs or stack traces
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org