Actions
Bug #11121
closedwebsockets_encrypt validation fails with settings.yaml on empty DB
Description
When running a db:migrate and db:seed (only the latter initialises settings) with websockets_* settings in settings.yaml, the initialisation order is such that websockets_encrypt is set to true before the key and certs are initialised. This causes its validation to fail.
- [ WARN 2015-07-15 07:39:19 verbose] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: Validation failed: Unable to turn on websockets_encrypt, either websockets_ssl_key or websockets_ssl_cert is missing
settings.yaml:
:websockets_encrypt: true
:websockets_ssl_key: /var/lib/puppet/ssl/private_keys/foreman.example.com.pem
:websockets_ssl_cert: /var/lib/puppet/ssl/certs/foreman.example.com.pem
It could probably be avoided by swapping the initialisation order in the Setting::Auth file.
Actions