Page MenuHomePhabricator

Make Drydock resources create a known_hosts file for connecting to hosts
Closed, WontfixPublic

Description

Ref D10362.

We should create a TempFile that contains the appropriate known_hosts line when creating a host resource, and pass it's path into all SSH connection to that host. This ensure that we actually connect to the intended host, and we can also then remove LogLevel=quiet which means appropriate errors will display again.

Event Timeline

hach-que claimed this task.
hach-que raised the priority of this task from to Normal.
hach-que updated the task description. (Show Details)
hach-que added subscribers: hach-que, epriestley.

Actually we might have to do this per-lease or per-connection, given that if taskmaster daemons are running across multiple machines, then the path to a known_hosts file won't be valid across all of them.

The problem with doing it per-connection at the moment is that the interface returns an ExecFuture, which doesn't provide us any way of automatically cleaning up the known_hosts file when the future resolves.

Closing this because beyond diagnosing initial configuration, there isn't much value in making things this much more complicated.