Update Geo docs: Git pull/push over SSH against a secondary site
Problem to solve
Update the docs to reflect the changes in &11026.
Proposal
Update at least the following docs:
doc/development/geo/proxying.md- ??
Here is the new Git pull over SSH flow when the secondary detects (during the authorized_keys internal API call) that its copy of the repo may not be up-to-date:
sequenceDiagram
participant C as Git on client
participant S as GitLab Shell
participant I as Workhorse & Rails
participant P as Workhorse & Rails
Note left of C: git pull/clone
Note over S,I: Secondary site
Note over P: Primary site
C->>+S: ssh git upload-pack request
S->>I: SSH key validation (api/v4/internal/authorized_keys?key=..)
I-->>S: HTTP/1.1 300 (custom action status) with {endpoint, msg, primary_repo, authorization headers}
S->>P: POST $PRIMARY/foo/bar.git/info/refs/?service=git-upload-pack
P-->>S: HTTP/1.1 200 OK
P-->>S: <response>
S-->>C: return Git response from primary
C-->>S: stream Git data to push
S->>P: POST $PRIMARY/foo/bar.git/git-upload-pack
P-->>S: HTTP/1.1 200 OK
P-->>S: <response>
S-->>-C: gitlab-shell upload-pack response
Here is the new Git push over SSH flow at a secondary:
sequenceDiagram
participant C as Git on client
participant S as GitLab Shell
participant I as Workhorse & Rails
participant P as Workhorse & Rails
Note left of C: git fetch
Note over S,I: Secondary site
Note over P: Primary site
C->>+S: ssh git receive-pack request
S->>I: SSH key validation (api/v4/internal/authorized_keys?key=..)
I-->>S: HTTP/1.1 300 (custom action status) with {endpoint, msg, primary_repo}
S->>I: POST /-/push_from_secondary/2/foo/bar.git/info/refs/?service=git-receive-pack
I->>P: Proxy to primary
P-->>I: HTTP/1.1 200 OK
I-->>S: <response>
S-->>C: return Git response from primary
C-->>S: stream Git data to push
S->>I: POST /-/push_from_secondary/2/foo/bar.git/git-receive-pack
I->>P: Proxy to primary
P-->>I: HTTP/1.1 200 OK
I-->>S: <response>
S-->>-C: gitlab-shell receive-pack response
Who can address the issue
Other links/references
Edited by Michael Kozono