Allow configurable hostname at runtime for cert selection #199

Closed
ralphbean opened this Issue Nov 8, 2013 · 2 comments

Projects

None yet

1 participant

Contributor

Currently, you can specify a cert_prefix to fedmsg.publish and it will use that to override the module name guesswork to find the cert to use.

You cannot, however, override the hostname. This has been fine up until now since all of our hosts have relatively stable hostnames.

It is not the case with the copr-be node. It lives in openstack and so gets a hostname like "copr-be-i-00000407" which is subject to change. For now, we have had to hardcode that string in /etc/fedmsg.d/ssl.py.

We should:

  • update fedmsg.publish(...) to accept a cert_hostname argument. It should default to None and in that case just use the guesswork it currently does.
  • update copr/backend/dispatcher.py to use that new argument.
  • update /etc/fedmsg.d/ssl.py in our ansible repo to use a new normal stable hostname string.
Contributor

This seems to be not as necessary anymore.. it looks like the hostname there got stabilized.

Contributor

Yeah, no need for this anymore.

>>> import socket
>>> socket.gethostname()
'copr-be.cloud.fedoraproject.org'
@ralphbean ralphbean closed this Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment