_varnish_terminal_run() returns an array on success, where the array keys are the server ip and port of the terminal.
$result = _varnish_terminal_run('vcl.list');
print_r(array_keys($result));
Array
(
[0] => 127.0.0.1:6082
)
Successful results are added to this array keyed by the terminal and command:
$ret[$terminal][$command] = $status;
Unsuccessful results are logged to watchdog and added to the results array:
$ret[] = FALSE;
PHP assigns these array keys numerically:
$result = _varnish_terminal_run('vcl.list');
print_r(array_keys($result));
Array
(
[0] => 127.0.0.1:6082
[1] => 0
)
This makes it more complex to identify which servers failed.
Comments
Comment #1
manarth commentedThis patch simply provides the server ip and port in the results array (with the value set to FALSE to show the command failed).
Comment #2
fabsor commentedCommited. Thanks!
http://drupal.org/commitlog/commit/11214/d74a55eae3dfb2b8f6eda7287937bd0...
Comment #3
fabsor commentedSetting status.