Bug 1863597
| Summary: | Inventory plug-in configuration(--enable-foreman-plugin-inventory-upload) makes DB inconsistent. | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Amar Huchchanavar <ahuchcha> |
| Component: | Installation | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Devendra Singh <desingh> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 6.7.0 | CC: | ahumbe, aruzicka, bkearney, cmarinea, egolov, ekohlvan, gpayelka, jaudet, kkinge, mawerner, mmccune, molasaga, saydas, smajumda, wpinheir, zhunting |
| Target Milestone: | 6.10.0 | Keywords: | FieldEngineering, PrioBumpField, PrioBumpGSS, PrioBumpPM, PrioBumpQA, SubscriptionWatch, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-installer-2.0.0 | Doc Type: | Known Issue |
| Doc Text: |
Inventory plug-in configuration(--enable-foreman-plugin-inventory-upload) makes DB inconsistent
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-16 14:09:27 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
Amar Huchchanavar
2020-08-03 16:50:36 UTC
I have a Satellite 6.7.2 and successfully executed `satellite-installer ...`, without hitting the error described above. However, when registering a client to the satellite, I hit a similar error:
[root@dhcp-2-168 ~]# subscription-manager register --org="Default_Organization" --environment="Library"
Registering to: my-sat.example.com:443/rhsm
Username: admin
Password:
HTTP error (500 - Internal Server Error): PG::UndefinedTable: ERROR: relation "insights_facets" does not exist
LINE 8: WHERE a.attrelid = '"insights_facets"'::regcl...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"insights_facets"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Executing the workaround (`foreman-rake db:migrate --trace`) resolved the issue.
** WORKAROUND ** When installing the plugin, add the --upgrade flag: satellite-installer \ --enable-foreman-plugin-inventory-upload \ --foreman-proxy-plugin-remote-execution-ssh-install-key true \ --upgrade Will work to get this into the documentation as the technical solution to this will land in 6.8 Docs bug filed: https://bugzilla.redhat.com/show_bug.cgi?id=1868118 https://github.com/theforeman/puppet-foreman/commit/9c1787ad19b2cae407b25958095ecbf78757a959 Putting this here for now as it is the fix for this issue. I put this here because it failed trying to link this BZ to jira when I gave it this commit to link above. This should be part of foreman-installer 2.0.0 which was included in 6.8. At least in upstream it wasn't a safe thing to cherry pick due to db:migrate RPM post scripts. It was a combination of packaging and installer that allowed this to be fixed. I'm hesitant to picking this to 6.7. This is a 6.7 bug only as it is solved in 6.8 with the installer. Adjusting bug to reflect this. Verified on 6.10 Snap7
Verification points:
1- Ran the installer command with "enable-foreman-plugin-rh-cloud" and "foreman-proxy-plugin-remote-execution-ssh-install-key", I didnt see any issue with that.
# satellite-installer --enable-foreman-plugin-rh-cloud --foreman-proxy-plugin-remote-execution-ssh-install-key true
2021-07-07 13:45:19 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-07-07 13:45:26 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-07-07 13:45:26 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
......................
......................
Candlepin orphaned consumers: []
Success!
2- Verified the enabled settings in installer helper
# satellite-installer --help|grep -A1 -e enable-foreman-plugin-rh-cloud -e foreman-proxy-plugin-remote-execution-ssh-install-key
--[no-]enable-foreman-plugin-rh-cloud Enable 'foreman_plugin_rh_cloud' puppet module (default: true)
--foreman-proxy-plugin-remote-execution-ssh-install-key Automatically install generated SSH key to root authorized keys
which allows managing this host through Remote Execution (current: true)
3- Register the client with satellite and it works.
4- Verified the fixed in a package.
# rpm -qa|grep foreman-installer-2
foreman-installer-2.5.1-1.el7sat.noarch
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 (Moderate: Satellite 6.10 Release), 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-2021:4702 |