Bug #21155
openstack trace when client calls 'enabled_repos'
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1494207
Description of problem:
Occasionally, clients may receive a 500 when calling a PUT on '/rhsm/systems/<UUID>/enabled_repos'. Short version of error is:
NoMethodError: undefined method `save_bound_repos_by_path!' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.144/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb:176:in `block in enabled_repos' | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:72:in `as' | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:78:in `as_anonymous_admin' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.144/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb:175:in `enabled_repos'
See attachment for full error from log, including request params.
I'm not sure how to reproduce this issue, I saw it while looking for an unrelated issue.