Bug 1337832 - Upgrade[619 -> sat62 snap12] [E] missing attribute: remote_id (ActiveModel::MissingAttributeError)
Summary: Upgrade[619 -> sat62 snap12] [E] missing attribute: remote_id (ActiveModel::M...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-05-20 08:03 UTC by Sachin Ghai
Modified: 2019-04-01 20:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 09:14:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
complete exception (13.72 KB, text/plain)
2016-05-20 08:09 UTC, Sachin Ghai
no flags Details
foreman-debug logs (1.04 MB, application/x-xz)
2016-05-20 09:44 UTC, Sachin Ghai
no flags Details

Description Sachin Ghai 2016-05-20 08:03:31 UTC
Description of problem: I was trying upgrade from sat6.1.9 -> sat62 snap12 and following error being raised at step: "yum install satellite -y"

2016-05-20 03:25:06 [I] Processing by Api::V2::ReportsController#create as JSON
2016-05-20 03:25:06 [I]   Parameters: {"report"=>"[FILTERED]", "apiv"=>"v2"}
2016-05-20 03:25:06 [E] missing attribute: remote_id (ActiveModel::MissingAttributeError)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.89/app/lib/katello/util/thread_session.rb:65:in `current='
/usr/share/foreman/app/controllers/api/base_controller.rb:147:in `set_admin_user'
/usr/share/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:31:in `require_puppetmaster_or_login'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:488:in `block (4 levels) in _run__3047619100355329862__process_action__3975370369526073242__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11485'
/usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in `disable_json_root'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_11485'






Version-Release number of selected component (if applicable):
Upgrade[619 -> sat62 snap12] 

How reproducible:


Steps to Reproduce:
 
1. Set sat6.2 repo on existing sat6.1 setup
2. yum install satellite -y



Actual results:
 [E] missing attribute: remote_id (ActiveModel::MissingAttributeError)

Expected results:
no error should be thrown while running "yum install satellite -y"

Additional info:

Comment 1 Sachin Ghai 2016-05-20 08:08:14 UTC
I further checked logs and found following issue as well. Please note that I was trying to upgrade satellite  with which capsule node(qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com) was associated.


This error is being logged with both the following steps:

yum install satellite -y
yum upgrade -y


==> /var/log/foreman/production.log <==
2016-05-20 03:25:00 [I] Processing by HostsController#externalNodes as YML
2016-05-20 03:25:00 [I]   Parameters: {"name"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com"}
2016-05-20 03:25:00 [W] Operation FAILED: missing attribute: remote_id
2016-05-20 03:25:01 [I]   Rendered common/500.html.erb within layouts/application (466.0ms)
2016-05-20 03:25:01 [I] Completed 500 Internal Server Error in 521ms
2016-05-20 03:25:01 [F] 
ActionView::Template::Error (undefined method `zip' for #<String:0x000000105bd000>):
    1: <%= alert :header => _("Oops, we're sorry but something went wrong"), :class => 'alert-danger',
    2:   :actions => link_to(_('Back'), main_app.root_path, :class => 'btn btn-default'),
    3:   :text => h(exception.message),
    4:   :close => false %>
  lib/foreman/gettext/all_domains.rb:6:in `_'
  app/views/common/500.html.erb:1:in `_app_views_common_____html_erb___4138617222443179438_137073100'
  app/controllers/application_controller.rb:303:in `generic_exception'
  lib/middleware/catch_json_parse_errors.rb:9:in `call'
  app/controllers/application_controller.rb:115:in `set_admin_user'
  app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:31:in `require_puppetmaster_or_login'
  app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'


2016-05-20 03:25:04 [I] Processing by Api::V2::HostsController#facts as JSON
2016-05-20 03:25:04 [I]   Parameters: {"facts"=>"[FILTERED]", "name"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com", "certname"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com", "apiv"=>"v2", :host=>{"name"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com", "certname"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com"}}
2016-05-20 03:25:04 [E] missing attribute: remote_id (ActiveModel::MissingAttributeError)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.89/app/lib/katello/util/thread_session.rb:65:in `current='
/usr/share/foreman/app/controllers/api/base_controller.rb:147:in `set_admin_user'
/usr/share/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:31:in `require_puppetmaster_or_login'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:488:in `block (4 levels) in _run__2829096150164191299__process_action__2653503610255451673__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11478'
/usr/share/foreman/app/controllers/api/v2/base_controller.rb:151:in `disable_json_root'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_11478'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:472:in `block (3 levels) in _run__2829096150164191299__process_action__2653503610255451673__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11477'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_3881'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_11477'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:460:in `block (2 levels) in _run__2829096150164191299__process_action__2653503610255451673__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11476'

Comment 2 Sachin Ghai 2016-05-20 08:09:56 UTC
Created attachment 1159828 [details]
complete exception

Comment 3 Sachin Ghai 2016-05-20 09:44:40 UTC
Created attachment 1159866 [details]
foreman-debug logs

Comment 5 Sachin Ghai 2016-05-26 09:10:21 UTC
This issue appears only when we run "yum install satellite -y" before "yum update -y". But looks like satellite package gets installed with "yum update -y". 

So if we run "yum update -y"  w/o prior "yum install satellite -y" then this issue doesn't appear.

Comment 6 Sachin Ghai 2016-05-26 09:14:35 UTC
I'm closing this issue for now, I'll re-open this if come across again with standard upgrade procedure. thanks


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