Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
_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.
Comment | File | Size | Author |
---|---|---|---|
#1 | varnish-1360378-report-failing-terminals.patch | 460 bytes | manarth |
Comments
Comment #1
manarth CreditAttribution: 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 CreditAttribution: fabsor commentedCommited. Thanks!
http://drupal.org/commitlog/commit/11214/d74a55eae3dfb2b8f6eda7287937bd0...
Comment #3
fabsor CreditAttribution: fabsor commentedSetting status.