I’m having the same issue apparently.
I’ve been working towards implementing Foreman/Katello as a Spacewalk/RHSat5 replacement, with the expected nuke it from orbit, burn it down, stir the ashes, pave it over and rebuild on a fairly regular basis. Since last week, I’ve discovered this on 2 separate hosts, one in the office and one at home. Both are built on CentOS 7.6.1810, fully patched, as well as the current shipping version of Foreman and the Katello plugin.
foreman-release-1.21.2-1.el7.noarch
katello-3.11.0-1.el7.noarch
The following options were used on the foreman-installer command line:
–scenario=katello
–enable-foreman
–enable-foreman-plugin-ansible
–enable-foreman-proxy-plugin-ansible
–enable-foreman-plugin-setup
–enable-foreman-plugin-tasks
–enable-foreman-plugin-templates
–enable-foreman-proxy
–enable-foreman-plugin-bootdisk
–enable-katello
–enable-foreman-compute-vmware
From /var/log/foreman/production.log (this seems to be interesting or applies:)
2019-04-15T13:54:14 [I|app|e2940a57] Authorized user admin(Admin User)
2019-04-15T13:54:14 [I|app|e2940a57] Current user set to admin (admin)
2019-04-15T13:54:14 [W|app|e2940a57] Action failed
RuntimeError: Association not found for location
/usr/share/foreman/app/controllers/api/base_controller.rb:75:in `parent_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:61:in `resource_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:100:in `resource_scope_for_index'
Running ‘hammer -d ansible roles list’ yields (in part at least:)
[DEBUG 2019-04-15T14:05:04 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2019-04-15T14:05:04 API] 500 Internal Server Error
[DEBUG 2019-04-15T14:05:04 API] {
"error" => {
"message" => "Association not found for location"
}
}
[DEBUG 2019-04-15T14:05:04 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_internal_error
[ERROR 2019-04-15T14:05:04 Exception] Association not found for location
Association not found for location
[ERROR 2019-04-15T14:05:04 Exception]
As a rookie, I’m going to assume that there’s a log (or more) that I can inspect.
Additionally, I don’t see where/how to connect an Ansible role to a specific location or organization, they would appear to be neutral in that regard.