Bug 1357122
Summary: | [upgrade - with oscap] upgrade step migrate_foreman failed | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Kedar Bidarkar <kbidarka> |
Component: | Upgrades | Assignee: | Shlomi Zadok <szadok> |
Status: | CLOSED ERRATA | QA Contact: | Kedar Bidarkar <kbidarka> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.2.0 | CC: | bbuckingham, kbidarka, ohadlevy, szadok, tbrisker |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | foreman-1.11.0.49-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 11:23:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Kedar Bidarkar
2016-07-15 20:00:31 UTC
looking at the logs, it looks like some part is missing. e.g. i can see in the seed logs: You have 13 pending migrations: 20150819105725 AddLookupValueMatchToHostAndHostgroup 20150917155300 UpdateHostStatusStatusFieldInt 20151009084350 DropPtables 20151019174035 RenameDomainHostCount 20151025120534 AddHiddenValueToLookupKey 20151104100257 AddHostsCountToHostgroup 20151109152507 AddHostStatusHostIdIndex 20151120153254 DeleteBootableInterface 20151220093801 RemoveSpacesFromSmartVariableKey 20160201131211 AddExpiredLogsToSmartProxy 20160215143900 AddSubnetDomainRelationConstraints 20160404074723 DowncaseDisplayTypes 20160609092110 RemoveNilFromMergeOverride yet, in the db migration logs it looks like it ran without any missing migrations? installer logs shows it ran successfully (db:migrate). Are you able to reproduce / provide machine that we can reproduce this on? thanks! Looks like this stems from 2 openscap permissions being created twice: [2] pry(#<Foreman::Plugin>)> Permission.where(:name => permissions) => [#<Permission id: 237, name: "view_arf_reports", resource_type: nil, created_at: "2016-06-30 06:57:00", updated_at: "2016-06-30 06:57:00">, #<Permission id: 245, name: "destroy_arf_reports", resource_type: nil, created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 247, name: "view_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 248, name: "edit_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 249, name: "create_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 250, name: "create_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 251, name: "destroy_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 252, name: "assign_policies", resource_type: "ForemanOpenscap::Policy", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 253, name: "view_scap_contents", resource_type: "ForemanOpenscap::ScapContent", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 254, name: "edit_scap_contents", resource_type: "ForemanOpenscap::ScapContent", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 255, name: "create_scap_contents", resource_type: "ForemanOpenscap::ScapContent", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 256, name: "destroy_scap_contents", resource_type: "ForemanOpenscap::ScapContent", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">, #<Permission id: 257, name: "destroy_scap_contents", resource_type: "ForemanOpenscap::ScapContent", created_at: "2016-07-15 17:00:18", updated_at: "2016-07-15 17:00:18">] Note that "destroy_scap_contents" and "create_policies" appear twice, though this should not be allowed (as permission names should be unique). This causes the open scap plugin initialization to fail, stopping any attempt to start the application (such as running migrations) to fail. I attempted to investigate what caused the duplicate permissions, but still haven't found the root cause. OK, after further investigation this happens due to a fairly rare race condition in plugin add permissions. connecting to existing upstream issue. Upstream bug assigned to szadok Upstream bug component is Upgrades Upstream bug assigned to szadok Moving to POST as upstream fix has been merged. This issue is no longer seen while upgrading with oscap for RHEL6 or RHEL7 setups. As this is a rare race condition, please feel free to re-open this bug, if seen again. VERIFIED With sat62-snap20.3(GA) 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/RHBA-2016:1501 |