Created attachment 1021007 [details] Error Message After installing two 5.4.0.0.19 appliances, I configure one to use an internal DB. On the second appliance, I configure it to connect to the database on the first. After 1) fetching the key 2) selecting the external db 3) join existing region 4) enter IP or hostname 5) enter database name "vmdb_production" 6) username: root 7) then the password. Receive "Configuration activation failed!" See attached image Version-Release number of selected component (if applicable): 5.4.0.0.19.20150410165622_ad23806 How reproducible: Always Steps to Reproduce: 1. Install two 5.4.0.0.19 appliances, cfme-32-test1 and cfme-32-test2. 2. From the appliance console, configure cfme-32-test1 to use an Internal DB with Region 1. 3. From the appliance console, configure cfme-32-test2 to use the DB on cfme-32-test1 by providing the hostname and default username and pass: root/smartvm Actual results: The console fails to connect to the database and returns the ERROR message: "Configuration activation failed!" Expected results: cfme-32-test2 successfully connects to the DB on cfme-32-test1 and displays a success notification in the appliance console.
Thank you for the bug report. Can you please provide the /var/www/miq/vmdb/log/appliance_console.log?
Created attachment 1021213 [details] appliance_console.log
Something to note. I configure the static IP and hostname, then I went in to connect to the external database but the log never captures any errors for that. The only thing you can see is when it first boots and I access it where there is no database.yml file.
Hi, thanks for reporting this. Here are my notes. Ok, this is build 20150413_095004 ( 5.4.0.0.19) We used to have an issue loading the database.yml file, but this was resolved in [1], which should be in that build. If you see configuration activation failed, then don't go in and boot the database, that means it failed creating the database.yml file. What I am trying: Verify can connect to remote machine service evmserverd kill service postgresql92-postgresql stop vmdb export EXTERNAL=192.168.118.160 rm certificate/v2_key appliance_console_cli --fetch-key=$EXTERNAL --sshpassword smartvm rm config/database.yml appliance_console_cli --hostname $EXTERNAL --password smartvm psql -h $EXTERNAL -U root vmdb_production select count(*) from miq_queue \quit configure remote database appliance_console_cli --hostname $EXTERNAL --password smartvm cat config/database.yml # FAIL In appliance_console/database_configuration.rb#join_region Tempfile.new(path) is no longer valid. adding a filename fixes this (e.g.: Tempfile.new(['regionscr','.rb'], path) ) I will work with Joe and get this fixed on 5/5. --kbrock [1]: https://github.com/ManageIQ/manageiq/pull/2590
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/86bb87e2d40c65877f817aa1d472f1b723d2c9d4 commit 86bb87e2d40c65877f817aa1d472f1b723d2c9d4 Author: Keenan Brock <kbrock> AuthorDate: Mon May 4 23:39:45 2015 -0400 Commit: Keenan Brock <kbrock> CommitDate: Tue May 5 10:49:15 2015 -0400 Fix appliance_console unable to join external db Apparently Temp.new(path) no longer works. This fix passes in the expected filename first, including the extension for good measure Temp.new([prefix, postfix], path) https://bugzilla.redhat.com/show_bug.cgi?id=1217818 lib/appliance_console/database_configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I have made the code change provided in the git commit to my appliance and have verified this fixed the issue of adding additional appliances to the regions.
Just verified it working on 5.4.0.0.26.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html