mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Make Agent.username and .hostname optional so they can be loaded from a minimal agent file and updated at runtime.
This commit is contained in:
@@ -1247,14 +1247,18 @@ has 'uuid' => (
|
||||
has 'username' => (
|
||||
is => 'rw',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
required => 0,
|
||||
default => sub { return $ENV{USER} || $ENV{LOGNAME} },
|
||||
);
|
||||
|
||||
has 'hostname' => (
|
||||
is => 'rw',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
required => 0,
|
||||
default => sub {
|
||||
chomp(my $hostname = `hostname`);
|
||||
return $hostname;
|
||||
},
|
||||
);
|
||||
|
||||
has 'alias' => (
|
||||
|
@@ -31,14 +31,18 @@ has 'uuid' => (
|
||||
has 'username' => (
|
||||
is => 'rw',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
required => 0,
|
||||
default => sub { return $ENV{USER} || $ENV{LOGNAME} },
|
||||
);
|
||||
|
||||
has 'hostname' => (
|
||||
is => 'rw',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
required => 0,
|
||||
default => sub {
|
||||
chomp(my $hostname = `hostname`);
|
||||
return $hostname;
|
||||
},
|
||||
);
|
||||
|
||||
has 'alias' => (
|
||||
|
Reference in New Issue
Block a user