Hi there all
I’m needing some help figuring out what to do about importing custom button configuration between my development and production engines.
Before Capablanca, we used the awesome cfme-rhtconsulting-scripts from the github repository of the same name, which worked like a charm. However, under CFME 5.5+ button imports are failing for me thus:
root@poc-cfme1 vmdb]# bin/rake rhconsulting:buttons:import[/root/git/dev/cfme-dev/buttons/buttons.yml]
[DEPRECATION] `configure` is removed in secure_headers 3.x. Instead use `default`.
Button Group: [Actions]
rake aborted!
ActiveModel::MissingAttributeError: can't write unknown attribute `resource_actions`
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute.rb:138:in `with_value_from_database'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute_set.rb:39:in `write_from_user'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/write.rb:74:in `write_attribute_with_type_cast'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/write.rb:56:in `write_attribute'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/dirty.rb:96:in `write_attribute'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods.rb:373:in `[]='
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:118:in `block in import_custom_buttons'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:88:in `each'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:88:in `import_custom_buttons'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:146:in `block in import_custom_button_sets'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:135:in `each'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:135:in `import_custom_button_sets'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:7:in `block in import'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/transactions.rb:220:in `transaction'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:6:in `import'
/var/www/miq/vmdb/lib/tasks/rhconsulting_buttons.rake:231:in `block (3 levels) in <top (required)>'
Tasks: TOP => rhconsulting:buttons:import
(See full trace by running task with --trace)
It seems to my untrained eye that the problem is with a previously accessible attribute not being accessible any more.
ActiveModel::MissingAttributeError: can’t write unknown attribute resource_actions
/opt/rh/cfme-gemset/gems/activerecord-4.2.5.1/lib/active_record/attribute.rb:138
Ok. So is this something I can workaround by tweaking the rake task, somehow? I would think not, as if resource_actions isn’t write accessible anymore, that must be defined in the model and would need a code change (which I don’t want to do on my production engines … so … )
So - is this a bug in CloudForms/ManageIQ and I should report it? Or is this a problem with the rake task I’m using, and how can I work around it?