Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1323258 - fix_auth.rb undefined class/module ArgumentError
fix_auth.rb undefined class/module ArgumentError
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.4.0
x86_64 Linux
high Severity high
: GA
: 5.6.0
Assigned To: Šimon Lukašík
Jan Krocil
cli:upgrade
: ZStream
Depends On:
Blocks: 1328469
  Show dependency treegraph
 
Reported: 2016-04-01 12:15 EDT by Colin Arnott
Modified: 2016-11-07 23:00 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.6.0.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1328469 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:46:58 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Colin Arnott 2016-04-01 12:15:07 EDT
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 05:09:50 EDT
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 08:02:29 EDT
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 08:31:42 EDT
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 11:46:58 EDT
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.