Bug 1323258 - fix_auth.rb undefined class/module ArgumentError
Summary: fix_auth.rb undefined class/module ArgumentError
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.4.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: GA
: 5.6.0
Assignee: Šimon Lukašík
QA Contact: Jan Krocil
URL:
Whiteboard: cli:upgrade
Depends On:
Blocks: 1328469
TreeView+ depends on / blocked
 
Reported: 2016-04-01 16:15 UTC by Colin Arnott
Modified: 2019-08-06 20:04 UTC (History)
7 users (show)

Fixed In Version: 5.6.0.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1328469 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:46:58 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Colin Arnott 2016-04-01 16:15:07 UTC
Description of problem:
when trying to clear out invalid keys from an appliance after a database import

Version-Release number of selected component (if applicable):
cfme-5.4.3.1-1.el6cf.x86_64

How reproducible:
should be pretty reliable

Steps to Reproduce:
0. import a database export from another appliance
1. match the region numbers
2. attempt to clear out invalid keys with `bundle exec tools/fix_auth.rb --v2 --invalid bogus`

Actual results:
[root@localhost vmdb]# bundle exec tools/fix_auth.rb --v2 --invalid bogus
fixing authentications.password, auth_key
fixing miq_databases.registration_http_proxy_server, session_secret_token, csrf_secret_token
fixing miq_ae_values.value
fixing miq_ae_fields.default_value
fixing configurations.settings
fixing miq_requests.options
fixing miq_request_tasks.options
/opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/class_loader.rb:53:in `path2class': undefined class/module DRb:: (ArgumentError)
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/class_loader.rb:53:in `resolve'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/class_loader.rb:45:in `find'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/class_loader.rb:27:in `load'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:394:in `resolve_class'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:207:in `visit_Psych_Nodes_Mapping'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:15:in `visit'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:5:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:31:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:336:in `block in revive_hash'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:334:in `each'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:334:in `each_slice'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:334:in `revive_hash'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:161:in `visit_Psych_Nodes_Mapping'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:15:in `visit'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:5:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:31:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:310:in `visit_Psych_Nodes_Document'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:15:in `visit'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/visitor.rb:5:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/visitors/to_ruby.rb:31:in `accept'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych/nodes/node.rb:37:in `to_ruby'
        from /opt/rh/ruby200/root/usr/share/gems/gems/psych-2.0.13/lib/psych.rb:246:in `load'
        from /var/www/miq/vmdb/lib/vmdb/configuration_encoder.rb:30:in `load'
        from /var/www/miq/vmdb/tools/fix_auth/auth_config_model.rb:36:in `recrypt'
        from /var/www/miq/vmdb/tools/fix_auth/auth_model.rb:49:in `block in fix_passwords'
        from /var/www/miq/vmdb/tools/fix_auth/auth_model.rb:47:in `each'
        from /var/www/miq/vmdb/tools/fix_auth/auth_model.rb:47:in `fix_passwords'
        from /var/www/miq/vmdb/tools/fix_auth/auth_model.rb:88:in `block in run'
        from /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation/delegation.rb:6:in `each'
        from /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/relation/delegation.rb:6:in `each'
        from /var/www/miq/vmdb/tools/fix_auth/auth_model.rb:87:in `run'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:65:in `block (2 levels) in fix_database_passwords'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:64:in `each'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:64:in `block in fix_database_passwords'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:61:in `each'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:61:in `fix_database_passwords'
        from /var/www/miq/vmdb/tools/fix_auth/fix_auth.rb:89:in `run'
        from /var/www/miq/vmdb/tools/fix_auth/cli.rb:36:in `run'
        from /var/www/miq/vmdb/tools/fix_auth/cli.rb:40:in `run'
        from tools/fix_auth.rb:23:in `<main>'


Expected results:
Not a stacktrace, and for the command to execute successfully

Comment 3 Šimon Lukašík 2016-04-20 09:09:50 UTC
On upstream we see different error. That one should be fixed in https://github.com/ManageIQ/manageiq/pull/8113

Comment 4 Šimon Lukašík 2016-04-20 12:02:29 UTC
This is deterministic only over certain dataset. You need to have some MiqRequestTask object with `options` column that contains yaml with `DRb::` string.

Comment 5 Šimon Lukašík 2016-04-20 12:31:42 UTC
The upstream patch https://github.com/ManageIQ/manageiq/pull/8113 makes 'DRb' module present for yaml parser, as well as it makes any other module (that may happen to be in one of the options) available.

Comment 9 errata-xmlrpc 2016-06-29 15:46:58 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.

https://access.redhat.com/errata/RHBA-2016:1348


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