Bug 1859968
| Summary: | sosreport doesn't collect haproxy.cfg | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Arie Bregman <abregman> | |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> | |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav HradĂlek <mhradile> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.2 | CC: | agk, bmr, bperkins, cww, knoha, mhradile, plambri, sbradley | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | 8.4 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | sos-4.0-2.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1993051 1993052 (view as bug list) | Environment: | ||
| Last Closed: | 2021-05-18 14:47:21 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: | 1993051, 1993052 | |||
|
Description
Arie Bregman
2020-07-23 11:59:38 UTC
This sounds strange, since haproxy plugin there matches https://github.com/sosreport/sos/blame/legacy-3.9/sos/plugins/haproxy.py where I see: class HAProxy(Plugin, RedHatPlugin, DebianPlugin): """HAProxy load balancer """ plugin_name = 'haproxy' profiles = ('webserver',) packages = ('haproxy',) def setup(self): var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy" self.add_copy_spec([ "/etc/haproxy/haproxy.cfg", var_puppet_gen + "/etc/haproxy/haproxy.cfg" ]) .. So, /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg should be collected. If this plugin was enabled. Is haproxy package installed on the system? Could you please run "sosreport -vvv" and attach the tarball afterwards? So then the haproxy plugin needs to be enabled not only by presence of the package, but also by presence of the haproxy directory.
Will this change help?
--- /usr/lib/python3.6/site-packages/sos/plugins/haproxy.py
+++ /usr/lib/python3.6/site-packages/sos/plugins/haproxy.py
@@ -25,12 +25,13 @@ class HAProxy(Plugin, RedHatPlugin, Debi
profiles = ('webserver',)
packages = ('haproxy',)
+ var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy"
+ files = ( var_puppet_gen, )
def setup(self):
- var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy"
self.add_copy_spec([
"/etc/haproxy/haproxy.cfg",
- var_puppet_gen + "/etc/haproxy/haproxy.cfg"
+ self.var_puppet_gen + "/etc/haproxy/haproxy.cfg"
])
self.add_copy_spec("/etc/haproxy/conf.d/*")
self.add_cmd_output("haproxy -f /etc/haproxy/haproxy.cfg -c")
(In reply to Pavel Moravec from comment #3) > So then the haproxy plugin needs to be enabled not only by presence of the > package, but also by presence of the haproxy directory. > > Will this change help? > > --- /usr/lib/python3.6/site-packages/sos/plugins/haproxy.py > +++ /usr/lib/python3.6/site-packages/sos/plugins/haproxy.py > @@ -25,12 +25,13 @@ class HAProxy(Plugin, RedHatPlugin, Debi > profiles = ('webserver',) > > packages = ('haproxy',) > + var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy" > + files = ( var_puppet_gen, ) > > def setup(self): > - var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy" > self.add_copy_spec([ > "/etc/haproxy/haproxy.cfg", > - var_puppet_gen + "/etc/haproxy/haproxy.cfg" > + self.var_puppet_gen + "/etc/haproxy/haproxy.cfg" > ]) > self.add_copy_spec("/etc/haproxy/conf.d/*") > self.add_cmd_output("haproxy -f /etc/haproxy/haproxy.cfg -c") I'm not familiar with sos code but if that makes sosreport to collect haproxy not only when the package is present then yes, great. Thank you That codechange will automatically collect the cfg file whenever /var/lib/config-data/puppet-generated/haproxy is present on the system. (In reply to Pavel Moravec from comment #5) > That codechange will automatically collect the cfg file whenever > /var/lib/config-data/puppet-generated/haproxy is present on the system. Perfect, thank you. Tested manually on RHEL-8.4 x86_64 without haproxy installed by mocking haproxy.cfg file. # rpm -qa haproxy # rpm -qa sos sos-4.0-5.el8.noarch # mkdir -p /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/ # touch /var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg # sos report ... Your sosreport has been generated and saved in: /var/tmp/sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf.tar.xz # tar -tf /var/tmp/sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf.tar.xz | grep haproxy sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf/var/lib/config-data/puppet-generated/haproxy/ sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf/var/lib/config-data/puppet-generated/haproxy/etc/ sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf/var/lib/config-data/puppet-generated/haproxy/etc/haproxy/ sosreport-host-10-0-139-2-1234567890-2021-01-21-iflubtf/var/lib/config-data/puppet-generated/haproxy/etc/haproxy/haproxy.cfg 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 (sos bug fix and enhancement update), 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/RHEA-2021:1604 There is a z-stream request to backport this to 8.2 (only) for better support experience of OSP16.1 still in use by many customers. Could you please provide business justification to get approval from SST CEE or PM lead ? Hi Pavel-san, Thank you for your comment on this. Business Justification: OSP16.1 is supported until April 30 2024 using RHEL8.2 EUS provided in the normal RHOSP subscriptions and RHEL8.2 TUS which OSP16.1 EUS provides the access to. Support team in Red Hat and OEM partners expect that sosreport command collect all configuration files of RHOSP16. Lacking this fix needs an additional work in support side and it will have an impact to customer satisfaction by taking a time to collect haproxy configuration additionally. For better support experience, the fix should be backported into RHEL8.2. To SST CEE or PM, Could you please grant an approval for backporting to RHEL8.2.z? Kind Regards, Keigo Noha |