Skip to content

Commit

Permalink
Merge pull request liske#234 from lazyfrosch/fix/docker-scopes
Browse files Browse the repository at this point in the history
container: fix docker detection with cgroups v2
  • Loading branch information
liske authored Feb 13, 2022
2 parents fda1a0c + c250c90 commit a91d3d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions perl/lib/NeedRestart/CONT/docker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ sub check {
}

# look for docker cgroups
return 0 unless($cg =~ /^\d+:[^:]+:\/system.slice\/docker-(.+)\.scope$/m ||
$cg =~ /^\d+:[^:]+:\/system.slice\/docker\.service$/m ||
$cg =~ /^\d+:[^:]+:\/docker\/([\da-f]+)$/m);
return 0 unless($cg =~ /^\d+:[^:]*:\/system.slice\/docker-(.+)\.scope$/m ||
$cg =~ /^\d+:[^:]*:\/system.slice\/docker\.service$/m ||
$cg =~ /^\d+:[^:]*:\/docker\/([\da-f]+)$/m);

print STDERR "$LOGPREF #$pid is part of docker container '$1' and will be ignored\n" if($self->{debug});

Expand Down

0 comments on commit a91d3d4

Please sign in to comment.