worker: drop default port

We require passing the address from the unit file. Do the same for the
socket, using host:port syntax.

Overriding the port was broken before, because we unconditionally
appended ":8700" to every address.
This commit is contained in:
Lars Karlitski 2020-03-25 08:49:58 +01:00 committed by Tom Gundersen
parent f8982f4a1a
commit 3b5d5a73d3

View file

@ -14,8 +14,6 @@ import (
"github.com/osbuild/osbuild-composer/internal/jobqueue"
)
const RemoteWorkerPort = 8700
type connectionConfig struct {
CACertFile string
ClientKeyFile string
@ -88,8 +86,6 @@ func main() {
if unix {
client = jobqueue.NewClientUnix(address)
} else {
address = fmt.Sprintf("%s:%d", address, RemoteWorkerPort)
conf, err := createTLSConfig(&connectionConfig{
CACertFile: "/etc/osbuild-composer/ca-crt.pem",
ClientKeyFile: "/etc/osbuild-composer/worker-key.pem",