Merge pull request #30166 from LumiGuide/graphite-1.0.2

Fix graphite crash by upgrading from 0.9.15 -> 1.0.2
This commit is contained in:
Peter Simons
2017-10-18 12:58:55 +01:00
committed by GitHub
8 changed files with 144 additions and 27 deletions
+11
View File
@@ -372,6 +372,17 @@ sub getUnitInfo {
return $info;
}
# Fail if the given systemd unit is not in the "active" state.
sub requireActiveUnit {
my ($self, $unit) = @_;
$self->nest("checking if unit $unit has reached state 'active'", sub {
my $info = $self->getUnitInfo($unit);
my $state = $info->{ActiveState};
if ($state ne "active") {
die "Expected unit $unit to to be in state 'active' but it is in state $state\n";
};
});
}
# Wait for a systemd unit to reach the "active" state.
sub waitForUnit {