[katello] How to change hostname in consumer RPM


We have a Katello 2.0 installation, and I'm trying to get the
server/service naming correct.

The server must follow the company's server naming convention, which means
the name is not very memorable - let's call this server123.example.com.

So, a CNAME was created of the form katello.example.com, to make the
service hostname more memorable. When Katello was initially installed, the
generated CA did indeed have katello.example.com as the subject, but the
consumer certificate still used server123.example.com and the consumer
RPM was named katello-ca-consumer-server123.example.com-1.0-1.noarch.rpm.

I've just attempted re-running katello-installer, and specifying the extra
options to change the name of the "node FQDN" and this has re-created the
certificate with the subject of katello.example.com, as expected.

Unfortunately, the RPM is now called:


and this RPM still has the following in the postinstall scriptlet:


Is it possible to change the hostname of the Katello server/service to
something other than the server's FQDN? If so, how?



One further bit of information, I re-ran katello-installer on the running
system, which I expected to work, but I received the following errors
during the run, suggesting that my command-line was wrong, or the installer
doesn't fully work on a running system:

katello-installer --certs-ca-common-name katello.example.com --certs-city
London --certs-country GB --certs-node-fqdn katello.example.com --certs-org
"Example Org" --certs-org-unit IT --certs-regenerate --certs-regenerate-ca
–certs-state "London"
–port='5432' --owner='postgres' --template=template0 'candlepin']: Failed
to call refresh: /usr/bin/createdb --port='5432' --owner='postgres'
–template=template0 'candlepin' returned 1 instead of one of [0]
–port='5432' --owner='postgres' --template=template0 'candlepin']:
/usr/bin/createdb --port='5432' --owner='postgres' --template=template0
'candlepin' returned 1 instead of one of [0]
Failed to call refresh: certutil -A -d '/etc/pki/katello/nssdb' -n
'amqp-client' -t ',' -a -i '/etc/pki/katello/certs/java-client.crt'
returned 255 instead of one of [0]
certutil -A -d '/etc/pki/katello/nssdb' -n 'amqp-client' -t ',' -a -i
'/etc/pki/katello/certs/java-client.crt' returned 255 instead of one of [0]
Installing Done
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/katello-installer/katello-installer.log

Is there a more appropriate way to run katello-installer on a system which
is already configured?