You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "brumi1024 (via GitHub)" <gi...@apache.org> on 2025/01/09 10:31:09 UTC

Re: [PR] YARN-11743. Cgroup v2 support should fall back to v1 when there are no v2 controllers [hadoop]

brumi1024 commented on code in PR #7222:
URL: https://github.com/apache/hadoop/pull/7222#discussion_r1908515039


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/ResourceHandlerModule.java:
##########
@@ -76,10 +76,10 @@ public class ResourceHandlerModule {
   private static volatile CpuResourceHandler
       cGroupsCpuResourceHandler;
 
-  private static void initializeCGroupHandlers(Configuration conf)
-      throws ResourceHandlerException {
+  private static void initializeCGroupHandlers(Configuration conf,
+      CGroupsHandler.CGroupController controller) throws ResourceHandlerException {
     initializeCGroupV1Handler(conf);
-    if (cgroupsV2Enabled) {
+    if (cgroupsV2Enabled && !isMountedInCGroupsV1(controller)) {
       initializeCGroupV2Handler(conf);

Review Comment:
   Thanks, makes sense.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org