Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1697303 - Editing Compute Resource fails with error "ActionView::Template::Error: undefined method `[]=' for #<ActiveModel::Errors:0x000000000a3f1308>"
Summary: Editing Compute Resource fails with error "ActionView::Template::Error: undef...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - VMWare
Version: 6.4.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Released
Assignee: Chris Roberts
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-08 10:32 UTC by shisingh
Modified: 2023-03-24 14:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 19:57:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24526 0 Normal Closed undefined method `[]=' for #<ActiveModel::Errors:0x00563e9032deb0> with wrong ca cert on vmware 2020-12-17 12:39:35 UTC

Description shisingh 2019-04-08 10:32:01 UTC
Description of problem: Not able to Edit the Vmware Compute Resource and host associated with the Compute Resource.

Error message while trying to Edit Compute Resource:

==============================
2019-04-05T14:15:20 [I|app|] Started GET "/compute_resources/1-vcenter-intern/edit" for 192.168.255.8 at 2019-04-05 14:15:20 +0200
2019-04-05T14:15:20 [I|app|4ce60] Processing by ComputeResourcesController#edit as HTML
2019-04-05T14:15:20 [I|app|4ce60]   Parameters: {"id"=>"1-vcenter-intern"}
2019-04-05T14:15:20 [I|app|4ce60] Current user: externer.dl.kuemmer (administrator)
2019-04-05T14:15:20 [I|app|4ce60]   Rendering compute_resources/edit.html.erb within layouts/application
2019-04-05T14:15:20 [I|app|4ce60]   Rendered compute_resources/form/_vmware.html.erb (15.8ms)
2019-04-05T14:15:20 [I|app|4ce60]   Rendered compute_resources/_form.html.erb (20.3ms)
2019-04-05T14:15:20 [I|app|4ce60]   Rendered compute_resources/edit.html.erb within layouts/application (21.6ms)
2019-04-05T14:15:20 [W|app|4ce60] Action failed
ActionView::Template::Error: undefined method `[]=' for #<ActiveModel::Errors:0x000000000a3f1308>
Did you mean?  []
/usr/share/foreman/app/helpers/compute_resources_helper.rb:70:in `rescue in list_datacenters'
/usr/share/foreman/app/helpers/compute_resources_helper.rb:66:in `list_datacenters'
/usr/share/foreman/app/views/compute_resources/form/_vmware.html.erb:4:in `_6e9b52025edf8d188f2fb9a2caec1057'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:155:in `render'
==========================

Error message while trying to Edit Host associated with Compute Resource:

==========================
Oops, we're sorry but something went wrong ERF56-4248 [Foreman::FingerprintException]: The remote system presented a public key with hash 574e3795d870c42d1c04d399198d1258c0621b4721b4e67362a398dcf08e1630 but we're expecting a different hash. If you are sure the remote system is authentic, go to the compute resource edit page, press the 'Test Connection' or 'Load Datacenters' button and submit.
==========================

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.4.2

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results: Unable to edit Compute resource or Hosts associated with Compute Resource.

Expected results: It should allow us to edit Compute resource or Hosts associated with Compute Resource.


Additional info: Upstream Bug Found:

https://projects.theforeman.org/issues/24526

Comment 4 Jitendra Yejare 2019-04-10 13:29:21 UTC
Verified !

@ Satellite 6.5 snap 23


Steps:
----------

1. Create VMWare Compute Resource in Satellite.
2. Update the PubKet from Foreman console as mentioned in comment 3.
3. Attempt to edit the VMWare Compute Resource and submit the updates.


Behavior(Expected):
---------------------

1. The updates to the VMWare CR are sent successfully
2. No errors observed


Success Logs:
------------------

Processing by ComputeResourcesController#update as HTML
2019-04-10T08:19:54 [I|app|c3d3d9c3]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"pewVGizQGUE02eb0biZc6kBpxPyyVMfXG1D0DA+WWoPj4BHAAvNb8b9SpoSimxZdmqJSeG87cC2UH9sizBb13w==", "compute_resource"=>{"name"=>"VMware", "provider"=>"Vmware", "description"=>"", "server"=>"vcenter.satellite.com", "user"=>"sateng", "datacenter"=>"RH_Engineering", "display_type"=>"vmrc", "set_console_password"=>"[FILTERED]", "caching_enabled"=>"0", "pubkey_hash"=>"bla", "location_ids"=>["2", "", "11"], "organization_ids"=>["1", "", "4"]}, "commit"=>"Submit", "id"=>"1-VMware"}
2019-04-10T08:19:54 [I|app|c3d3d9c3] Current user set to admin (admin)
2019-04-10T08:19:54 [I|aud|c3d3d9c3] ComputeResource (1) update event on caching_enabled true, false
2019-04-10T08:19:54 [I|aud|c3d3d9c3] ComputeResource (1) update event on organization_ids 1, 1, 4
2019-04-10T08:19:54 [I|aud|c3d3d9c3] ComputeResource (1) update event on location_ids 2, 2, 11
2019-04-10T08:19:54 [I|app|c3d3d9c3] Redirected to https://satellite.com/compute_resources
2019-04-10T08:19:54 [I|app|c3d3d9c3] Completed 302 Found in 150ms (ActiveRecord: 37.1ms)
2019-04-10T08:19:55 [I|app|] Started GET "/compute_resources" for 10.65.223.56 at 2019-04-10 08:19:55 -0400
2019-04-10T08:19:55 [I|app|635eb425] Processing by ComputeResourcesController#index as HTML
2019-04-10T08:19:55 [I|app|635eb425] Current user set to admin (admin)
2019-04-10T08:19:55 [I|app|635eb425]   Rendering compute_resources/index.html.erb within layouts/application
2019-04-10T08:19:55 [I|app|635eb425]   Rendered common/_pagination.html.erb (0.6ms)
2019-04-10T08:19:55 [I|app|635eb425]   Rendered compute_resources/index.html.erb within layouts/application (12.2ms)
2019-04-10T08:19:55 [I|app|635eb425]   Rendered common/_searchbar.html.erb (0.6ms)
2019-04-10T08:19:55 [I|app|635eb425]   Rendered layouts/_application_content.html.erb (1.8ms)
2019-04-10T08:19:55 [I|app|635eb425]   Rendering layouts/base.html.erb
2019-04-10T08:19:55 [I|app|635eb425]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-3.0.1.11/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb (0.6ms)
2019-04-10T08:19:55 [I|app|635eb425]   Rendered layouts/base.html.erb (56.8ms)
2019-04-10T08:19:55 [I|app|635eb425] Completed 200 OK in 100ms (Views: 70.7ms | ActiveRecord: 6.9ms)
2019-04-10T08:19:56 [I|app|] Started GET "/notification_recipients" for 10.65.223.56 at 2019-04-10 08:19:56 -0400
2019-04-10T08:19:56 [I|app|8d374714] Processing by NotificationRecipientsController#index as JSON
2019-04-10T08:19:56 [I|app|8d374714] Current user set to admin (admin)
2019-04-10T08:19:56 [I|app|8d374714] Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 1.3ms)
2019-04-10T08:20:07 [I|app|] Started GET "/notification_recipients" for 10.65.223.56 at 2019-04-10 08:20:07 -0400
2019-04-10T08:20:07 [I|app|84b0810b] Processing by NotificationRecipientsController#index as JSON
2019-04-10T08:20:07 [I|app|84b0810b] Current user set to admin (admin)
2019-04-10T08:20:07 [I|app|84b0810b] Completed 200 OK in 10ms (Views: 0.1ms | ActiveRecord: 1.5ms)

Comment 5 Jitendra Yejare 2019-04-10 13:30:23 UTC
The updates to the Host also sent successfully. Cant put logs here as I dont see pubkey key in logs for host update. But it worked.

Comment 8 Bryan Kearney 2019-05-14 19:57:27 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/RHSA-2019:1222


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