Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argocd admin dashboard trying to look at /app/config/ssh/ssh_known_hosts #7565

Closed
james-callahan opened this issue Oct 28, 2021 · 5 comments
Closed
Labels
bug Something isn't working component:git Interaction with GitHub, Gitlab etc type:usability Enhancement of an existing feature
Milestone

Comments

@james-callahan
Copy link
Contributor

james-callahan commented Oct 28, 2021

Describe the bug

This code

log.Errorf("Could not set-up SSH known hosts callback: %v", err)
seems to be hit by argocd admin dashboard, resulting in it trying to open the path /app/config/ssh/ssh_known_hosts.

Expected behavior

argocd admin dashboard shouldn't try to look in non-existant directories. I'm not sure why it was trying to ssh anywhere anyway.... (shouldn't that only be inside of the repo server?)

Version

argocd: v2.1.5+unknown
  BuildDate: 2021-10-28T04:06:55Z
  GitCommit: 
  GitTreeState: 
  GitTag: 2.1.5
  GoVersion: go1.17.1
  Compiler: gc
  Platform: linux/amd64
FATA[0000] Argo CD server address unspecified  

Logs

ERRO[0168] Could not set-up SSH known hosts callback: open /app/config/ssh/ssh_known_hosts: no such file or directory 
@james-callahan james-callahan added the bug Something isn't working label Oct 28, 2021
@jessesuen
Copy link
Member

argocd admin dashboard shouldn't try to look in non-existant directories. I'm not sure why it was trying to ssh anywhere anyway.... (shouldn't that only be inside of the repo server?)

Argo CD server still does some low-touch git interactions. Specifically, it needs to resolve ambiguous revisions to a concrete commit SHA, so that when it initiates a sync operation, it fills in the operation with an SHA and not the ambiguous revision.

That said, I agree with you that when dashboard is running locally, it shouldn't presume SSH environment from local setup. I think this is just a side-effect of us adapting the dashboard as a stand alone binary, vs. a hosted service.

@NotAFile
Copy link

NotAFile commented Nov 16, 2021

It appears argocd app sync suffers from this too, at least in core mode. Afaict this makes it impossible to use SSH repos with argocd core right now?

@jessesuen
Copy link
Member

Unfortunately, that is correct. To fix this, we need to change the model such that argocd-server assumes no git environment and relies entirely on the repo-server to answer any git questions like:

  • what is the SHA for this ambiguous revision?

This means adding a new gRPC method to the repo-server.

@jessesuen jessesuen added this to the v2.3 milestone Nov 17, 2021
@jessesuen jessesuen added type:usability Enhancement of an existing feature component:git Interaction with GitHub, Gitlab etc labels Nov 17, 2021
@alexmt
Copy link
Collaborator

alexmt commented Nov 17, 2021

There is an in-progress PR #5832 .

@alexmt
Copy link
Collaborator

alexmt commented Jan 18, 2022

Fixed by #7966

@alexmt alexmt closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:git Interaction with GitHub, Gitlab etc type:usability Enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants