Page MenuHomePhabricator

Allow "inactive" repositories to be read over SSH for cluster sync
ClosedPublic

Authored by epriestley on Jan 31 2019, 7:47 PM.
Tags
None
Referenced Files
F14415223: D20077.id47947.diff
Tue, Dec 24, 5:23 PM
F14407446: D20077.diff
Tue, Dec 24, 2:56 AM
Unknown Object (File)
Wed, Dec 18, 12:50 AM
Unknown Object (File)
Wed, Dec 18, 12:50 AM
Unknown Object (File)
Wed, Dec 18, 12:50 AM
Unknown Object (File)
Wed, Dec 18, 12:50 AM
Unknown Object (File)
Tue, Dec 17, 2:49 PM
Unknown Object (File)
Tue, Dec 17, 9:27 AM
Subscribers
None

Details

Summary

Fixes T13192. See PHI1015. When you deactivate a repository, we currently stop serving it.

This creates a problem for intracluster sync, since new nodes can't sync it. If nothing else, this means that if you "ship of theseus" your cluster and turn nodes over one at a time, you will eventually lose the entire repository. Since that's clearly a bad outcome, support sync.

Test Plan

Testing this requires a "real" cluster, so I mostly used secure.

I deactivated rGITTEST and ran this on secure002:

./bin/repository thaw --demote secure002.phacility.net --force GITTEST && ./bin/repository update GITTEST

Before the patch, this failed:

[2019-01-31 19:40:37] EXCEPTION: (CommandException) Command failed with error #128!
COMMAND
git fetch --prune -- 'ssh://172.30.0.64:22/diffusion/GITTEST/' '+refs/*:refs/*'

STDOUT
(empty)

STDERR
Warning: Permanently added '172.30.0.64' (RSA) to the list of known hosts.
phabricator-ssh-exec: This repository ("rGITTEST") is not available over SSH.
fatal: Could not read from remote repository.

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

After applying (a similar patch to) this patch to secure001, the sync worked.

I'll repeat this test with the actual patch once this deploys to secure.

Diff Detail

Repository
rP Phabricator
Branch
inactive1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21789
Build 29733: Run Core Tests
Build 29732: arc lint + arc unit