Bug 1214980
| Summary: | [RFE] RHEL 7 subscription-manager: log exact registration commands used and their error outputs if any | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Xixi <xdmoon> | |
| Component: | subscription-manager | Assignee: | candlepin-bugs | |
| Status: | CLOSED WONTFIX | QA Contact: | John Sefler <jsefler> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 7.0 | CC: | alikins, bkearney, csnyder, cwawak, jmoran, redakkan, rjerrido, wpoteat | |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged, UserExperience | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Enhancement | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1215824 (view as bug list) | Environment: | ||
| Last Closed: | 2020-04-06 16:09:19 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1215824 | |||
|
Description
Xixi
2015-04-24 02:44:08 UTC
cloned for RHEL 6: Bug 1215824 - [RFE] RHEL 6 subscription-manager: log exact registration commands used and their error outputs if an The main holdup with this is verifying we scrub passwords from the log messages, which is complicated a bit by the arg parsing module we use (optparse). You can do most of this with recent versions, however it is not turned on by default. And it alter every log entry instead of just one at start up.
If you change the 'formatter_rhsm_log' section in /etc/rhsm/logging.conf
from:
[formatter_rhsm_log]
format=%(asctime)s [%(levelname)s] %(cmd_name)s:%(process)d @%(filename)s:%(lineno)d - %(message)s
datefmt=
class=logging.Formatter
to:
[formatter_rhsm_log]
format=%(asctime)s [%(levelname)s] "%(cmd_line)s" %(cmd_name)s:%(process)d @%(filename)s:%(lineno)d - %(message)s
datefmt=
class=logging.Formatter
(ie, add the %(cmd_line)s to the formatter specifier, it will log the cli line (sys.argv). to each log entry.
Sample output:
2015-09-23 11:09:38,688 [INFO] "bin/subscription-manager register --username duey --password password --org donaldduck --force" subscription-manager:24955 @cache.py:382 - Server does not support packages, skipping profile upload.
2015-09-23 11:09:38,689 [DEBUG] "bin/subscription-manager register --username duey --password password --org donaldduck --force" subscription-manager:24955 @cache.py:110 - Wrote cache: /var/lib/rhsm/facts/facts.json
2015-09-23 11:09:38,689 [DEBUG] "bin/subscription-manager register --username duey --password password --org donaldduck --force" subscription-manager:24955 @cache.py:138 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2015-09-23 11:09:38,981 [INFO] "/usr/libexec/rhsmd" rhsmd:24993 @rhsmd:230 - rhsmd started
2015-09-23 11:09:38,991 [DEBUG] "/usr/libexec/rhsmd" rhsmd:24993 @rhsmd:185 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 1
2015-09-23 11:09:39,060 [DEBUG] "/usr/libexec/rhsmd" rhsmd:24993 @identity.py:131 - Loading consumer info from identity certificates.
2015-09-23 11:09:39,065 [DEBUG] "/usr/libexec/rhsmd" rhsmd:24993 @rhsmd:153 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted
2015-09-23 11:09:39,374 [DEBUG] "bin/subscription-manager subscribe --auto" subscription-manager:24996 @ga_loader.py:89 - ga_loader GaImporterGtk3
2015-09-23 11:09:39,382 [DEBUG] "bin/subscription-manager subscribe --auto" subscription-manager:24996 @plugins.py:569 - loaded plugin modules: [<module 'container_content' from '/usr/share/rhsm-plugins/container_content.pyc'>, <module 'ostree_content' from '/usr/share/rhsm-plugins/ostree_content.pyc'>]
2015-09-23 11:09:39,383 [DEBUG] "bin/subscription-manager subscribe --auto" subscription-manager:24996 @plugins.py:570 - loaded plugins: {'container_content.ContainerContentPlugin': <container_content.ContainerContentPlugin object at 0x3363910>, 'ostree_content.OstreeContentPlugin': <ostree_content.OstreeContentPlugin object at 0x3363ed0>}
2015-09-23 11:09:39,383 [DEBUG] "bin/subscription-manager subscribe --auto" subscription-manager:24996 @identity.py:131 - Loading consumer info from identity certificates.
(exit status and output aren't captured though)
Thank you for opening the bug. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, Please reach out to us Thank you. |