Bug 1300018 - CFME 4.0 session setting necessary for proper CFME operation in Load Balancer environment is no longer acceptable and causes worker failures
CFME 4.0 session setting necessary for proper CFME operation in Load Balancer...
Status: CLOSED CURRENTRELEASE
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
x86_64 Linux
high Severity high
: GA
: 5.7.0
Assigned To: Nick Carboni
Jan Krocil
appliance:configuration
: TestOnly, ZStream
Depends On:
Blocks: 1300336 1348632
  Show dependency treegraph
 
Reported: 2016-01-19 13:48 EST by Thomas Hennessy
Modified: 2017-01-12 00:04 EST (History)
12 users (show)

See Also:
Fixed In Version: 5.7.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1300336 1348632 (view as bug list)
Environment:
Last Closed: 2017-01-11 15:17:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
evm.log file from testing (4.01 MB, text/plain)
2016-01-19 13:48 EST, Thomas Hennessy
no flags Details
last_startup.txt file containing the configuration settings which casue the problem (61.08 KB, text/plain)
2016-01-19 13:48 EST, Thomas Hennessy
no flags Details

  None (edit)
Description Thomas Hennessy 2016-01-19 13:48:12 EST
Created attachment 1116315 [details]
evm.log file from testing

Description of problem: in the vmdb.yml file (advances settings for section 'server' a setting of 'sql' is documented as the proper setting in a load balancer environment, but CFME no longer accepts this value, onle 'cached' is accepted.


Version-Release number of selected component (if applicable):5.5.0.13


How reproducible:


Steps to Reproduce:
1. startup CFME 4.0 (5.5.0.13) as usual to establish working baseline
2. go to Advanced settings in Config-> Configurations and change the 'session_store' value from the default 'cached' to 'sql', save and restart the appliance
3. after waiting for appliance restart to complete, try to login to the appliance directly using CFME.  It will fail.
4- capture and review the evm.log from the last restart and notice that there is an error as follows:
=====
[----] I, [2016-01-19T13:26:47.687750 #5023:1279998]  INFO -- : MIQ(Vmdb::Initializer.init) - Program Name: /var/www/miq/vmdb/bin/rails, PID: 5023, ENV['MIQ_GUID']: 2cf3b2ac-beda-11e5-a516-005056af0061, ENV['EVMSERVER']: true
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/application/configuration.rb:172:in `rescue in session_store': `ActiveRecord::SessionStore` is extracted out of Rails into a gem. Please add `activerecord-session_store` to your Gemfile to use it. (RuntimeError)
	from /opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/application/configuration.rb:169:in `session_store'
	from /var/www/miq/vmdb/config/initializers/session_store.rb:44:in `<top (required)>'
.....
.....
=======

Actual results:

error noted above


Expected results:
normal restart of CFME without any error and UI to be accessible as usual.


Additional info:
evm..log is provided showing first a successful startup sequence in which the 'session_store' value is then changed from 'cached' to 'sql' and then the evmserverd service is restarted .  the second startup in the provided evm.log contains the error sequence above where only the 'session_store' setting from the vmdb.yml file has been changed.

the last_startup.txt file is also provided which contains the configuration which evoked the error.
Comment 2 Thomas Hennessy 2016-01-19 13:48 EST
Created attachment 1116316 [details]
last_startup.txt file containing the configuration settings which casue the problem
Comment 3 Nick Carboni 2016-01-19 17:11:26 EST
It looks like the session store functionality was moved into a gem in this rails commit https://github.com/rails/rails/commit/0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad. Opened a PR to add the gem.

https://github.com/ManageIQ/manageiq/pull/6255
Comment 4 CFME Bot 2016-01-19 18:21:04 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/291fdf0cf1865248d492f0a33835b6e0e8cdb2c6

commit 291fdf0cf1865248d492f0a33835b6e0e8cdb2c6
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Tue Jan 19 17:07:13 2016 -0500
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Tue Jan 19 17:40:16 2016 -0500

    Added the activerecord-session_store gem
    
    As of https://github.com/rails/rails/commit/0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad
    the session store was extracted into a gem. We need it for the `session_store: sql`
    functionality.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300018

 Gemfile | 1 +
 1 file changed, 1 insertion(+)
Comment 6 CFME Bot 2016-01-19 22:44:26 EST
Detected commit referencing this ticket while ticket status is POST.
Comment 7 Nick Carboni 2016-01-20 08:05:27 EST
(In reply to CFME Bot from comment #5)
> https://github.com/ManageIQ/manageiq/pull/6191

This seems to be an issue with the bot coming up again.  This PR is not necessary for the completion of this ticket.
Comment 8 Chen 2016-03-23 02:01:11 EDT
Hi Nick,

May I know the workaround for the version 5.5.0 ? Can we just manually install the missing gem to get over the issue ? Would you please let me know the detailed steps ?

Some customers are hard to upgrade their production cfme environments.

Best Regards,
Chen
Comment 9 Nick Carboni 2016-03-23 13:42:03 EDT
Chen,

Sorry, there is no supported workaround for this issue.
To get the fix they have to upgrade to the version of 5.5 where https://bugzilla.redhat.com/show_bug.cgi?id=1300336 has been fixed.
Comment 13 Nick Carboni 2016-06-27 18:00:59 EDT
https://github.com/ManageIQ/manageiq/pull/9473
Comment 14 CFME Bot 2016-07-01 09:51:16 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d9eb2ef666da0c063a0225be5ffc85aee4a5301b

commit d9eb2ef666da0c063a0225be5ffc85aee4a5301b
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Mon Jun 27 17:47:16 2016 -0400
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Mon Jun 27 18:20:03 2016 -0400

    Update activerecord-session_store gem
    
    https://github.com/rails/activerecord-session_store/pull/66 added
    rails 5 compatibility to the activerecord-session_store gem
    
    Without this, we were not able to support UI load balancing which
    requires session information be stored in the database.
    
    The restriction on the logging gem also had to be removed
    as it was causing a dependency issue versioned as it was.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300018

 Gemfile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 15 Jan Krocil 2016-10-27 05:28:44 EDT
Verified fixed in 5.7.0.7 - 5.7.0.7-beta1.20161025153249_9376fbd.

Note You need to log in before you can comment on or make changes to this bug.