Page MenuHomePhabricator

Allow cluster devices to SSH to one another without acting as a user
ClosedPublic

Authored by epriestley on Apr 19 2016, 1:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 11:02 PM
Unknown Object (File)
Fri, Dec 20, 10:23 PM
Unknown Object (File)
Fri, Dec 20, 4:01 AM
Unknown Object (File)
Thu, Dec 19, 7:32 AM
Unknown Object (File)
Tue, Dec 10, 8:49 PM
Unknown Object (File)
Fri, Dec 6, 4:26 AM
Unknown Object (File)
Wed, Dec 4, 7:18 AM
Unknown Object (File)
Sun, Dec 1, 7:31 PM
Subscribers
None

Details

Summary

Ref T4292. When you run git fetch and connect to, say, repo001.west.company.com, we'll look at the current version of the repository in other nodes in the cluster.

If repo002.east.company.com has a newer version of the repository, we'll fetch that version first, then respond to your request.

To do this, we need to run git fetch repo002.east.company.com ... and have that connect to the other host and be able to fetch data.

This change allows us to run PHABRICATOR_AS_DEVICE=1 git fetch ... to use device credentials to do this fetch. (Device credentials are already supported and used, they just always connect as a user right now, but these fetches should be doable without having a user. We will have a valid user when you run git fetch yourself, but we won't have one if the daemons notice that a repository is out of date and want to update it, so the update code should not depend on having a user.)

Test Plan
$ PHABRICATOR_AS_DEVICE=1 ./bin/ssh-connect local.phacility.com
Warning: Permanently added 'local.phacility.com' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
phabricator-ssh-exec: Welcome to Phabricator.

You are logged in as device/daemon.phacility.net.

You haven't specified a command to run. This means you're requesting an interactive shell, but Phabricator does not provide an interactive shell over SSH.

Usually, you should run a command like `git clone` or `hg push` rather than connecting directly with SSH.

Supported commands are: conduit, git-lfs-authenticate, git-receive-pack, git-upload-pack, hg, svnserve.
Connection to local.phacility.com closed.

Diff Detail

Repository
rP Phabricator
Branch
rlock5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11835
Build 14852: Run Core Tests
Build 14851: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow cluster devices to SSH to one another without acting as a user.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 19 2016, 5:57 PM
This revision was automatically updated to reflect the committed changes.