This file is indexed.

/usr/lib/mysql-mmm/agent/set_active_master is in mysql-mmm-agent 2.2.1-1.1.

This file is owned by root:root, with mode 0o775.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env perl

# Use mandatory external modules
use strict;
use warnings FATAL => 'all';
use MMM::Common::Config;
use MMM::Agent::Helpers::Actions;

# Check arguments
if (scalar(@ARGV) != 2) {
	print "Usage: $0 <config_file> <new_master>\n\n";
	exit(1);
}

my $config_file = shift;
my $new_master = shift;

# Read config file
our $config = new MMM::Common::Config::;
$config->read($config_file);
$config->check('AGENT');

# Finally do the work
my $output = MMM::Agent::Helpers::Actions::set_active_master($new_master);

print $output, "\n";
exit(0);

__END__

=head1 NAME

set_active_master

=head1 DESCRIPTION

set_active_master is a helper binary for B<mmm_agentd>. It tries to catch up with the old master as far as possible and changes the master to the new host.
(Syncs to the master log if the old master is reachable. Otherwise syncs to the relay log.)

=head1 USAGE

set_active_master <new_master>

=head1 EXAMPLE

set_active_master db2