Line 63... |
Line 63... |
63 |
push @return, "\tUpdates capabilities on one or more nodes, default is all nodes";
|
63 |
push @return, "\tUpdates capabilities on one or more nodes, default is all nodes";
|
64 |
push @return, "node list [--format|-f screen|tsv]";
|
64 |
push @return, "node list [--format|-f screen|tsv]";
|
65 |
push @return, "\tLists all nodes with some statistics about them as screen or tsv (default screen)";
|
65 |
push @return, "\tLists all nodes with some statistics about them as screen or tsv (default screen)";
|
66 |
push @return, "node scan [nodename|-t nodename]";
|
66 |
push @return, "node scan [nodename|-t nodename]";
|
67 |
push @return, "\tUpdates list of domains on one or more existing nodes, default is all nodes";
|
67 |
push @return, "\tUpdates list of domains on one or more existing nodes, default is all nodes";
|
- |
|
68 |
push @return, "node maintenance nodename [on|off]";
|
- |
|
69 |
push @return, "\ton - set maintenance flag; no domains can be started/migrated to node";
|
- |
|
70 |
push @return, "\toff - Allows domains to be migrated/started on node";
|
- |
|
71 |
push @return, "\tnothing - displays current maintenance flag";
|
- |
|
72 |
push @return, "\tNote: a node with any domains running can not have maintenance mode turned on";
|
68 |
return join( "\n", @return ) . "\n";
|
73 |
return join( "\n", @return ) . "\n";
|
69 |
}
|
74 |
}
|
70 |
|
75 |
|
71 |
|
76 |
|
72 |
# lists hardware capabilities of all nodes (virsh nodeinfo)
|
77 |
# lists hardware capabilities of all nodes (virsh nodeinfo)
|
Line 139... |
Line 144... |
139 |
# $main::statusDB->{'node'}->{$main::targetNode} = '';
|
144 |
# $main::statusDB->{'node'}->{$main::targetNode} = '';
|
140 |
# print "Calling update for new node\n" if $main::DEBUG;
|
145 |
# print "Calling update for new node\n" if $main::DEBUG;
|
141 |
&update( @_ );
|
146 |
&update( @_ );
|
142 |
}
|
147 |
}
|
143 |
|
148 |
|
- |
|
149 |
sub maintenance {
|
- |
|
150 |
my ( $node, $action ) = @_;
|
- |
|
151 |
&main::readDB(1);
|
- |
|
152 |
if ( $action ) {
|
- |
|
153 |
$main::statusDB->{'node'}->{$node}->{'maintenance'} = ( lc( $action ) eq 'on' ) ? 1 : 0;
|
- |
|
154 |
}
|
- |
|
155 |
&main::writeDB();
|
- |
|
156 |
return "Maintenance set to " . ( $main::statusDB->{'node'}->{$node}->{'maintenance'} ? 'On' : 'Off' ) . "\n";
|
- |
|
157 |
}
|
- |
|
158 |
|