Created attachment 984837 [details] current logs from appliance where zone level log depot has been configured, zone level log collection requested and initited, but failing Description of problem:After instantiating a new VMware appliance with the Version: 5.3.2.6 code base, and then configuring a log depot for the default zone, I attempted to collect logs. Log collections are initiated but fail with the failure in the evm.log file indicating that the log depot is not configured. (which is incorrect) Version-Release number of selected component (if applicable): Version: 5.3.2.6 How reproducible: Steps to Reproduce: 1. instantiate a new appliance with a configured VMDB. 2. use standard credentials to login to the appliance 3. configure zone level log depot to save to redhat dropbox and save 4. initiate zone level full log collections to dropbox. 5. get UI message indicating log collection is starting 6. wait reasonable time for log collections to occur and search dropbox for log set. Actual results: requested logs never appear in the log depot, but the evm.log file shows that CFME has determined that no log depot is configured and so terminates log collection. Expected results: requested logs to show up in RedHat dropbox. Additional info: logs showing error : ===== [----] E, [2015-01-26T17:56:41.053711 #2139:946830] ERROR -- : MIQ(MiqServer.post_current_logs) Task: [443032000000000113] Posting of current logs failed for CFME-3.2-NONDB default MiqServer 443032000000000002 due to error: [RuntimeError] [Log Depot settings not configured] [----] E, [2015-01-26T17:56:41.063937 #2139:946830] ERROR -- : MIQ(MiqQueue.deliver) Message id: [443032000000006705], Error: [Log Depot settings not configured] [----] E, [2015-01-26T17:56:41.064237 #2139:946830] ERROR -- : [RuntimeError]: Log Depot settings not configured Method:[rescue in deliver] [----] E, [2015-01-26T17:56:41.064336 #2139:946830] ERROR -- : /var/www/miq/vmdb/app/models/log_file.rb:53:in `upload' ===== full current logs from failing appliance are attached including prodution log from which one can see that the zone level configuration has been completed before the log collection is requested. Also, individual appliance level log depot settings were later created and appliance level log collections initiated to dropbox and these were successful.
This looks like fallout from this commit: https://github.com/ManageIQ/manageiq/commit/a42bb4f829e34781d433854c7aca0db5ec36982f
Upstream PR https://github.com/ManageIQ/manageiq/pull/1850
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/146dd50246dfd70b44e46e5e51a741a7508e803b commit 146dd50246dfd70b44e46e5e51a741a7508e803b Author: Joe Rafaniello <jrafanie> AuthorDate: Mon Feb 23 17:53:11 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Mon Feb 23 17:59:31 2015 -0500 Use log_depot for MiqServer#log_file_depot or Zone#log_file_depot When the Zone level log_file_depot is configured, but not the MiqServer, MiqServer#log_file_depot is nil, so we need to look for the Zone's depot. Commit 4f0c1b542649bb8b4c99d8f584582aeef439cefa, changed log collection to use relationships to get the file depots but only on the server. It missed that we can configure the depot at the server or zone or both and that we should look for the server's first, then the zone's. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/app/models/miq_server/log_management.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/9ff74a7feee8c29e12c44d8df108095545c8b88b commit 9ff74a7feee8c29e12c44d8df108095545c8b88b Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:25:19 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Tue Feb 24 16:38:44 2015 -0500 Add some tests for MiqServer#log_depot Change factory to specify a URI by default. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/factories/file_depot.rb | 1 + vmdb/spec/models/miq_server/log_management_spec.rb | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/52da34cfd7893bfe9f7b3da4eeafce6397ef3939 commit 52da34cfd7893bfe9f7b3da4eeafce6397ef3939 Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:33:37 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Tue Feb 24 16:38:47 2015 -0500 Define the uri "let" before it's referenced. It was correct before, but this makes it easier to read. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/models/miq_server/log_management_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/c316aeb753d028486efe0bbdc720897be26c4b69 commit c316aeb753d028486efe0bbdc720897be26c4b69 Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:32:03 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Tue Feb 24 16:38:47 2015 -0500 Existing uses of the file_depot factory should use the default uri. They don't need something different so use the default. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/models/log_collection_spec.rb | 2 +- vmdb/spec/models/miq_server/log_management_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Note, this only fails if the Zone is configured and the MiqServer(appliance) is NOT configured with a log depot.
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=05bddadec3971cf3bc129e986f7e3f815526e1cd commit 05bddadec3971cf3bc129e986f7e3f815526e1cd Author: Joe Rafaniello <jrafanie> AuthorDate: Mon Feb 23 17:53:11 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Feb 25 14:44:24 2015 -0500 Use log_depot for MiqServer#log_file_depot or Zone#log_file_depot When the Zone level log_file_depot is configured, but not the MiqServer, MiqServer#log_file_depot is nil, so we need to look for the Zone's depot. Commit 4f0c1b542649bb8b4c99d8f584582aeef439cefa, changed log collection to use relationships to get the file depots but only on the server. It missed that we can configure the depot at the server or zone or both and that we should look for the server's first, then the zone's. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/app/models/miq_server/log_management.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=51a5e203727e2fd7cb691e442e5984ee03b07853 commit 51a5e203727e2fd7cb691e442e5984ee03b07853 Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:25:19 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Feb 25 14:44:27 2015 -0500 Add some tests for MiqServer#log_depot Change factory to specify a URI by default. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/factories/file_depot.rb | 1 + vmdb/spec/models/miq_server/log_management_spec.rb | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=9e348bcb48c2e09446225c6f42673680e27d0720 commit 9e348bcb48c2e09446225c6f42673680e27d0720 Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:32:03 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Feb 25 14:44:31 2015 -0500 Existing uses of the file_depot factory should use the default uri. They don't need something different so use the default. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/models/log_collection_spec.rb | 2 +- vmdb/spec/models/miq_server/log_management_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5fed3896daaa403c2eef42258be2b5aae058843c commit 5fed3896daaa403c2eef42258be2b5aae058843c Author: Joe Rafaniello <jrafanie> AuthorDate: Tue Feb 24 16:33:37 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Feb 25 14:44:34 2015 -0500 Define the uri "let" before it's referenced. It was correct before, but this makes it easier to read. https://bugzilla.redhat.com/show_bug.cgi?id=1186485 vmdb/spec/models/miq_server/log_management_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Verified fixed in 5.4.0.4 (5.4.0.4.20150528174021_88cc76c). Zone level log collection now works correctly.
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