Bug 1621029
Summary: | foreman-rake db:seed fails on upgrade to Foraman 1.17.1 | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Tomer Brisker <tbrisker> |
Component: | Users & Roles | Assignee: | Tomer Brisker <tbrisker> |
Status: | CLOSED ERRATA | QA Contact: | Jitendra Yejare <jyejare> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.3.0 | CC: | bkearney, dhlavacd, inecas, jyejare, mbacovsk, mhulan, tbrisker, zhunting |
Target Milestone: | 6.4.0 | Keywords: | Triaged, Upgrades |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | foreman-1.18.0.17-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-16 18:59:33 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tomer Brisker
2018-08-23 13:05:15 UTC
Created from redmine issue https://projects.theforeman.org/issues/24697 Upstream bug assigned to None - If there is a permission added to the default role with no filters, it will be removed when seeding. - If there is a permission added with a specific filter, it will cause the db:seed task to fail. Upstream bug assigned to tbrisker Upstream bug assigned to tbrisker Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24697 has been resolved. @Tomer, Can I get the exact steps to repro this issue: I am quite confused about the 'default role', Is it just one role 'default role' or is it all builtin default roles(i.e manager, org admin) ? Also, either its default single role or all built-in roles, we cant modify there filters at all AFAIK. Steps would be really helpful here. This regards the role named "Default Role", which is editable by users as it allows defining permissions that all users in the system have. To reproduce, there are two cases that need to be tested: 1. Add additional permission to default role (e.g. "view_domains") in 6.3, upgrade to 6.4 -> permission should still be present in the default role. 2. Add additional permission with filter to the default role (e.g. "view_domains" with filter "name ~ a") in 6.3, upgrade to 6.4 -> upgrade should be successful and the permission should still be present with same filter. Verified ! @ Satellite 6.4 snap 20 Steps: 1. Added additional permissions(with filter and without filter) to default role in 6.3 2. Upgrade Satellite to 6.4 3. Verified if the default role has newly added permissions with filter and without filter. Observation: 1. The satellite upgrade to 6.4 is successful, especially the rake db:seed part is successfully completed. Upgrade Step: db_seed... /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here Seeding /usr/share/foreman/db/seeds.d/020-partition_tables_list.rb Seeding /usr/share/foreman/db/seeds.d/020-permissions_list.rb Seeding /usr/share/foreman/db/seeds.d/020-provisioning_templates_list.rb Seeding /usr/share/foreman/db/seeds.d/020-roles_list.rb Seeding /usr/share/foreman/db/seeds.d/030-auth_sources.rb Seeding /usr/share/foreman/db/seeds.d/030-permissions.rb Seeding /usr/share/foreman/db/seeds.d/035-admin.rb Seeding /usr/share/foreman/db/seeds.d/040-roles.rb Seeding /usr/share/foreman/db/seeds.d/050-taxonomies.rb Seeding /usr/share/foreman/db/seeds.d/060-architectures.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-2.0.1.9/db/seeds.d/069-provisioning_templates_defaults.rb Seeding /usr/share/foreman/db/seeds.d/070-provisioning_templates.rb Seeding /usr/share/foreman/db/seeds.d/080-partition_tables.rb Seeding /usr/share/foreman/db/seeds.d/100-installation_media.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/101-locations.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/102-organizations.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/104-proxy.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/106-mail_notifications.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/107-enable_dynflow.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/108-subcription-bookmarks.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/109-katello-notification-blueprints.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/110-content-view-autopublish.rb Seeding /usr/share/foreman/db/seeds.d/110-smart_proxy_features.rb Seeding /usr/share/foreman/db/seeds.d/130-compute_profiles.rb Seeding /usr/share/foreman/db/seeds.d/150-bookmarks.rb Seeding /usr/share/foreman/db/seeds.d/160-mail_notifications.rb Seeding /usr/share/foreman/db/seeds.d/170-notification_blueprints.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.13.4/db/seeds.d/20-foreman_tasks_permissions.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-2.1.6/db/seeds.d/200-update-insights-roles.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-2.1.6/db/seeds.d/201-add-insights-email-notifications.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-12.0.0/db/seeds.d/50-bootdisk_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.5/db/seeds.d/50-notification_blueprints.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-12.0.2/db/seeds.d/50_discovery_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.13.4/db/seeds.d/60-dynflow_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.5/db/seeds.d/60-ssh_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-12.0.2/db/seeds.d/60_discovery_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.13.4/db/seeds.d/61-foreman_tasks_bookmarks.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-2.2.5/db/seeds.d/62_ansible_proxy_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.5/db/seeds.d/70-job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-12.0.2/db/seeds.d/70_discovery_mail_notification.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.22/db/seeds.d/75-job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.10.2/db/seeds.d/75-job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-2.2.5/db/seeds.d/75_job_templates.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-12.0.2/db/seeds.d/80_discovery_ui_notification.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-2.0.1.9/db/seeds.d/850-global_parameters.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.5/db/seeds.d/90-bookmarks.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-12.0.2/db/seeds.d/90_add_permissions_from_default_roles.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-2.2.5/db/seeds.d/90_notification_blueprints.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.10.2/db/seeds.d/openscap_feature.rb Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.10.2/db/seeds.d/openscap_policy_notification.rb All seed files executed foreman-rake db:seed finished successfully! 2. Post upgrade, the additional permissions in default role with and without filter are intact. 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-2018:2927 |