-logger.verbose("Cgroups: Initializing watchers...")
-wm = pyinotify.WatchManager()
-notifier = pyinotify.ThreadedNotifier(wm, CgroupWatch())
-for virt in VIRT_TECHS:
- wdd = wm.add_watch(os.path.join(BASE_DIR, virt),
- pyinotify.IN_DELETE | pyinotify.IN_CREATE,
- rec=False)
-notifier.daemon = True
-notifier.start()
+#logger.verbose("Cgroups: Initializing watchers...")
+#wm = pyinotify.WatchManager()
+#notifier = pyinotify.ThreadedNotifier(wm, CgroupWatch())
+#for virt in VIRT_TECHS:
+# wdd = wm.add_watch(os.path.join(BASE_DIR, virt),
+# pyinotify.IN_DELETE | pyinotify.IN_CREATE,
+# rec=False)
+#notifier.daemon = True
+#notifier.start()
+
+def get_cgroup_paths():
+ cpusetBase = os.path.join(BASE_DIR, 'cpuset', 'libvirt', 'lxc')
+ return filter(os.path.isdir,
+ map(lambda f: os.path.join(cpusetBase, f),
+ os.listdir(cpusetBase)))