Closed mvdboogaard closed 5 years ago
I see also the roles "Red Hat Access Logs", "Access Insights Viewer" and "Access Insights Admin" are not created:
2019-05-14T09:36:43 [W|app|] Creating scope :path_of. Overwriting existing method FactName.path_of.
2019-05-14T09:36:44 [W|app|] Scoped order is ignored, it's forced to be batch order.
2019-05-14T09:36:44 [W|app|] Could not create role 'Red Hat Access Logs': ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_log_viewer", "logs", :logs, :view_log_viewer]
2019-05-14T09:36:44 [W|app|] Scoped order is ignored, it's forced to be batch order.
2019-05-14T09:36:44 [W|app|] Could not create role 'Access Insights Viewer': ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_hosts", "rh_telemetry_api", "rh_telemetry_view", :rh_telemetry_api, :rh_telemetry_view, :view_hosts]
2019-05-14T09:36:45 [W|app|] Scoped order is ignored, it's forced to be batch order.
2019-05-14T09:36:45 [W|app|] Could not create role 'Access Insights Admin': ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_hosts", "rh_telemetry_api", "rh_telemetry_view", "rh_telemetry_configurations", :rh_telemetry_api, :rh_telemetry_view, :rh_telemetry_configurations, :view_hosts]
2019-05-14T09:36:32 [W|app|] Creating scope :path_of. Overwriting existing method Hostgroup.path_of.
2019-05-14T09:36:32 [W|app|] Creating scope :path_of. Overwriting existing method Taxonomy.path_of.
2019-05-14T09:36:32 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2019-05-14T09:36:33 [W|app|] Scoped order is ignored, it's forced to be batch order.
2019-05-14T09:36:34 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2019-05-14T09:36:37 [I|app|] Triggering..
2019-05-14T09:36:38 [W|app|] ignoring associations organization_ids, location_ids audit definition for Container, the resource is not audited
2019-05-14T09:36:38 [W|app|] Creating scope :path_of. Overwriting existing method FactName.path_of.
2019-05-14T09:36:39 [W|app|] ignoring associations organization_ids, location_ids audit definition for DockerContainerWizardStates::Preliminary, the resource is not audited
2019-05-14T09:36:39 [W|app|] ignoring associations organization_ids, location_ids audit definition for DockerRegistry, the resource is not audited
2019-05-14T09:36:46 [W|app|] Scoped order is ignored, it's forced to be batch order.
2019-05-14T09:36:46 [W|app|] Could not create role 'Red Hat Access Logs': ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_log_viewer", "logs", :logs, :view_log_viewer]
2019-05-14T09:36:46 [E|app|] Cannot continue because some permissions were not found, please run rake db:seed and retry
2019-05-14T09:36:46 [F|app|] Failed running Dynflow daemon
2019-05-14T09:36:46 [F|app|] <Foreman::PermissionMissingException> ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_log_viewer", "logs", :logs, :view_log_viewer]
Did you run foreman-rake db:seed
after installing? The permission you mention though should be created after Foreman restart thanks to https://github.com/redhataccess/foreman-plugin/blob/master/redhat-access/lib/redhat_access/engine.rb#L115
Did you do service httpd restart
after installing the plugin?
I did run foreman-rake db:seed
and also foreman-rake db:migrate
just to be sure.
After installation I restarted foreman completely (foreman-maintain restart
).
I tried it again and it is still not working. Now I only did a foreman-rake db:seed
and service httpd restart
.
I installed the following packages:
I use the Katello 3.11 repository
I wil start with an upgrade to Katello 3.12 and Foreman 1.22 which provides tfm-rubygem-redhat_access-2.2.5. As I can see this version must have the fix in it.
I upgraded Katello and Foreman and installed tfm-rubygem-redhat_access again with foreman-rake db:seed
and service httpd restart
. But still the same error.
Problem solved!!
The problem was that I had duplicate permissions for RedHat Access. Somehow they weren't removed proparly once.
I removed tfm-rubygem-redhat_access and tfm-rubygem-redhat_access_lib.
Next I looked up the permissions which are defined in https://github.com/redhataccess/foreman-plugin/blob/91d8d8209108a5c2b953a14c76f9043b88de95de/redhat-access/lib/redhat_access/engine.rb
and removed them.
As there are duplicate permissions you have to lookup serveral times and remove them (till you get the response nil
)
Example:
irb(main):072:0> Permission.find_by_name('view_cases') => #<Permission id: 270, name: "view_cases", resource_type: nil, created_at: "2019-05-03 07:30:17", updated_at: "2019-05-03 07:30:17"> irb(main):073:0> Permission.find_by_name('view_cases').destroy irb(main):074:0> Permission.find_by_name('view_cases') => nil
After installing tfm-rubygem-redhat_access I see the following error in the logfile:
After restarting foreman the GUI is not available anymore with the same error message. Removing tfm-rubygem-redhat_access will gain access to the GUI again.
RedHat access is never shown in the GUI