Bug 1434454 - Existing MiqQueue rows can contain serialized Rails 4.2 era classes we can't deserialize in Rails 5+
Summary: Existing MiqQueue rows can contain serialized Rails 4.2 era classes we can't ...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.8.0
Assignee: Joe Rafaniello
QA Contact: Dave Johnson
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-21 14:20 UTC by Joe Rafaniello
Modified: 2019-08-06 20:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-05-31 14:43:11 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1367 normal SHIPPED_LIVE Moderate: CFME 5.8.0 security, bug, and enhancement update 2017-05-31 18:16:03 UTC

Description Joe Rafaniello 2017-03-21 14:20:40 UTC
Description of problem:

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

How reproducible: Easy

Steps to Reproduce:
1.  Create a service retirement in a Rails 4.2 version of cfme, making sure it's on the miq_queue.
2.  Upgrade to a rails 5.0 version, such as cfme 5.7.x

Actual results:
Each MiqQueue deliver of these messages will fail with:
"undefined class/module ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer" attempting to get next message

Expected results:
The Worker should skip or mark this message as "error".

Additional info:

Comment 2 Joe Rafaniello 2017-03-21 14:21:56 UTC
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1429747, which handles the issue by marking the bad queue message as "error".  This BZ will clear the bad rows from the miq_queue table.

Comment 4 CFME Bot 2017-03-22 18:26:14 UTC
New commit detected on ManageIQ/manageiq/master:

commit 9795934bf9e5d42198278168d03d69fb26eebe73
Author:     Joe Rafaniello <jrafanie@redhat.com>
AuthorDate: Mon Mar 20 17:08:44 2017 -0400
Commit:     Joe Rafaniello <jrafanie@redhat.com>
CommitDate: Tue Mar 21 10:26:07 2017 -0400

    Remove MiqQueue rows containing a class removed in Rails 5.
    The PostgreSQL::OID::Integer class was removed in:
    It's possible that old Rails 4.2 versions of objects could have been
    serialized in the MiqQueue in the args column and we won't be able to
    deserialize them with Rails 5+, so we need to remove these rows.
    Related to https://github.com/ManageIQ/manageiq/pull/14365
    Related to https://bugzilla.redhat.com/show_bug.cgi?id=1429747

 ...95659_remove_oid_integer_args_from_miq_queue.rb |  8 +++++++
 ..._remove_oid_integer_args_from_miq_queue_spec.rb | 27 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 db/migrate/20170320195659_remove_oid_integer_args_from_miq_queue.rb
 create mode 100644 spec/migrations/20170320195659_remove_oid_integer_args_from_miq_queue_spec.rb

Comment 5 Joe Rafaniello 2017-03-22 20:18:57 UTC
Note, this is not for backport to 5.7 because it's a data migration.  This is for 5.8+ only.

Comment 7 errata-xmlrpc 2017-05-31 14:43:11 UTC
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.


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