@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Provide a richer error when an intracluster request can not be satisfied by the target node

Summary: See PHI1030. When installs hit this error, provide more details about which node we ended up on and what's going on.

Test Plan:
```
$ git pull
phabricator-ssh-exec: This repository request (for repository "spellbook") has been incorrectly routed to a cluster host (with device name "local.phacility.net", and hostname "orbital-3.local") which can not serve the request.

The Almanac device address for the correct device may improperly point at this host, or the "device.id" configuration file on this host may be incorrect.

Requests routed within the cluster by Phabricator are always expected to be sent to a node which can serve the request. To prevent loops, this request will not be proxied again.

(This is a read request.)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20002

+27 -2
+27 -2
src/applications/repository/storage/PhabricatorRepository.php
··· 2024 2024 } 2025 2025 2026 2026 if ($never_proxy) { 2027 + // See PHI1030. This error can arise from various device name/address 2028 + // mismatches which are hard to detect, so try to provide as much 2029 + // information as we can. 2030 + 2031 + if ($writable) { 2032 + $request_type = pht('(This is a write request.)'); 2033 + } else { 2034 + $request_type = pht('(This is a read request.)'); 2035 + } 2036 + 2027 2037 throw new Exception( 2028 2038 pht( 2029 - 'Refusing to proxy a repository request from a cluster host. '. 2030 - 'Cluster hosts must correctly route their intracluster requests.')); 2039 + 'This repository request (for repository "%s") has been '. 2040 + 'incorrectly routed to a cluster host (with device name "%s", '. 2041 + 'and hostname "%s") which can not serve the request.'. 2042 + "\n\n". 2043 + 'The Almanac device address for the correct device may improperly '. 2044 + 'point at this host, or the "device.id" configuration file on '. 2045 + 'this host may be incorrect.'. 2046 + "\n\n". 2047 + 'Requests routed within the cluster by Phabricator are always '. 2048 + 'expected to be sent to a node which can serve the request. To '. 2049 + 'prevent loops, this request will not be proxied again.'. 2050 + "\n\n". 2051 + "%s", 2052 + $this->getDisplayName(), 2053 + $local_device, 2054 + php_uname('n'), 2055 + $request_type)); 2031 2056 } 2032 2057 2033 2058 if (count($results) > 1) {