]> git.proxmox.com Git - mirror_lxc.git/commitdiff
cgfsng: improve loggin on monitor cgroup destroy
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Oct 2018 22:03:13 +0000 (00:03 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Oct 2018 22:03:13 +0000 (00:03 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index cc8bf8f2b212044b8bc8e7ed25b2b09ab1fec47d..4aa8fe160c7acb9b8322521eec506b0e0b43c19a 100644 (file)
@@ -1175,8 +1175,10 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
                        *chop = '\0';
 
                ret = mkdir_p(pivot_path, 0755);
-               if (ret < 0 && errno != EEXIST)
+               if (ret < 0 && errno != EEXIST) {
+                       SYSWARN("Failed to create cgroup \"%s\"\n", pivot_path);
                        goto next;
+               }
 
                if (chop)
                        *chop = '/';
@@ -1185,8 +1187,10 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
                 * cgroup.
                 */
                ret = lxc_write_to_file(pivot_path, pidstr, len, false, 0666);
-               if (ret != 0)
+               if (ret != 0) {
+                       SYSWARN("Failed to move monitor %s to \"%s\"\n", pidstr, pivot_path);
                        goto next;
+               }
 
                ret = recursive_destroy(h->monitor_full_path);
                if (ret < 0)