Description of problem: Debug data-gathering script for RHUI similar to katello-debug/spacewalk-debug, which gathers config and log files and other information that includes everything needed for debugging in most cases. This will also integrate with sosreport who'll call the script to include the data in sosreport tar. Version-Release number of selected component (if applicable): current/newest How reproducible: See above. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Sayli, reassigning this one to you. Let me know if you need any assistance.
rhui-debug.py installed at /usr/share/rh-rhua/rhui-debug.py on the RHUA
Verify that the script is installed at the right location and that when you run 'python /usr/share/rh-rhua/rhui-debug.py' it does a data collection and outputs the path to the collected files.
Verified existence of the script /usr/share/rh-rhua/rhui-debug.py as well as random debug files are readable etc..further info see: [root@ip-10-110-241-123 ~]# ll /usr/share/rh-rhua/rhui-debug.py -rw-r--r--. 1 root root 6008 Aug 1 13:44 /usr/share/rh-rhua/rhui-debug.py [root@ip-10-110-241-123 ~]# python /usr/share/rh-rhua/rhui-debug.py Successfully created directory [/tmp/rhui-debug-2012-08-03-T11-26-40] Copying contents of directory [/root/.rhui/] to [/tmp/rhui-debug-2012-08-03-T11-26-40/root/.rhui/] Copying file [/etc/rhui/rhui-tools.conf] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/rhui] Copying contents of directory [/etc/pulp/] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/pulp/] Copying contents of directory [/etc/gofer/plugins/] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/gofer/plugins/] Copying contents of directory [/var/log/pulp/] to [/tmp/rhui-debug-2012-08-03-T11-26-40/var/log/pulp/] Copying contents of directory [/var/log/httpd/] to [/tmp/rhui-debug-2012-08-03-T11-26-40/var/log/httpd/] Copying file [/etc/httpd/conf.d/pulp.conf] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/httpd/conf.d] Copying file [/etc/yum/pluginconf.d/pulp-profile-update.conf] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/yum/pluginconf.d] Copying file [/etc/pki/pulp/content/pulp-protected-repos] to [/tmp/rhui-debug-2012-08-03-T11-26-40/etc/pki/pulp/content] Creating commands directory [/tmp/rhui-debug-2012-08-03-T11-26-40/commands] Storing output of command [/tmp/rhui-debug-2012-08-03-T11-26-40/commands] in [/tmp/rhui-debug-2012-08-03-T11-26-40/commands/ls_-lR_var.lib.pulp] Checked against /root/RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso Moving bug to VERIFIED.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: For Red Hat Update Infrastructure (RHUI), a rhui-debug script was requested for gathering debug data. rhui-debug.py is now installed on Red Hat Update Appliance (RHUA) at /usr/share/rh-rhua/rhui-debug.py. Run 'python /usr/share/rh-rhua/rhui-debug.py' to collect debug data; pathways to the collected data will also be returned.
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. http://rhn.redhat.com/errata/RHEA-2012-1205.html
Would it be possible to change this in a future release to take an output path on the command line? This is how all the other *-debug scripts we run from sos operate and it avoids the overhead of double-copying and cleaning up (we try to avoid unlinking things outside our own directories). I also note that the script is pulling in the whole of /var/log/http - that directory is already handled by sos and can grow very large under some configs. We have existing size-limiting code to handle this in our httpd module. With the current script we will end up including this twice (or will need a hack in sos to delete it..).
I've packaged the script into a seperate package, and will add a step to our install_CDS.sh script to make sure it gets installed on CDS instances. commit 87b844ec092177bd8303d523e44324b8ebfdf1d2
[root@rhua ~]# python /usr/share/rh-rhua/rhui-debug.py Successfully created directory [/tmp/rhui-debug-2013-02-04-T08-04-36] Copying contents of directory [/root/.rhui/] to [/tmp/rhui-debug-2013-02-04-T08-04-36/root/.rhui/] Copying file [/etc/rhui/rhui-tools.conf] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/rhui] Copying contents of directory [/etc/pulp/] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/pulp/] Copying contents of directory [/etc/gofer/plugins/] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/gofer/plugins/] Copying contents of directory [/var/log/pulp/] to [/tmp/rhui-debug-2013-02-04-T08-04-36/var/log/pulp/] Copying file [/etc/httpd/conf.d/pulp.conf] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/httpd/conf.d] Copying file [/etc/yum/pluginconf.d/pulp-profile-update.conf] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/yum/pluginconf.d] Copying file [/etc/pki/pulp/content/pulp-protected-repos] to [/tmp/rhui-debug-2013-02-04-T08-04-36/etc/pki/pulp/content] Creating commands directory [/tmp/rhui-debug-2013-02-04-T08-04-36/commands] Storing output of command [/tmp/rhui-debug-2013-02-04-T08-04-36/commands] in [/tmp/rhui-debug-2013-02-04-T08-04-36/commands/ls_-lR_var.lib.pulp] [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/root/.rhui/ && echo SUCCESS rhua.example.com rhui.log SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/pulp/ && echo SUCCESS admin cds.conf consumer logging pulp.conf repo_auth.conf SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/gofer/plugins/ && echo SUCCESS builtin.conf consumer.conf package.conf pulpplugin.conf SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/var/log/pulp/ && echo SUCCESS client.log db.log events.log grinder.log pulp.log SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/rhui/rhui-tools.conf && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-36/etc/rhui/rhui-tools.conf SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/httpd/conf.d/pulp.conf && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-36/etc/httpd/conf.d/pulp.conf SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/yum/pluginconf.d/pulp-profile-update.conf && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-36/etc/yum/pluginconf.d/pulp-profile-update.conf SUCCESS [root@rhua ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-36/etc/pki/pulp/content/pulp-protected-repos && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-36/etc/pki/pulp/content/pulp-protected-repos SUCCESS [root@rhua ~]# ls -lR /var/lib/pulp | diff -u /tmp/rhui-debug-2013-02-04-T08-04-36/commands/ls_-lR_var.lib.pulp - && echo SUCCESS SUCCESS [root@rhua ~]# Last login: Mon Feb 4 08:04:15 2013 from 10.48.162.207 [root@cds1 ~]# python /usr/share/rh-rhua/rhui-debug.py --cds Successfully created directory [/tmp/rhui-debug-2013-02-04-T08-04-45] Copying contents of directory [/etc/pulp/] to [/tmp/rhui-debug-2013-02-04-T08-04-45/etc/pulp/] Copying contents of directory [/etc/gofer/plugins/] to [/tmp/rhui-debug-2013-02-04-T08-04-45/etc/gofer/plugins/] Copying contents of directory [/var/log/pulp-cds/] to [/tmp/rhui-debug-2013-02-04-T08-04-45/var/log/pulp-cds/] Copying file [/etc/httpd/conf.d/pulp-cds.conf] to [/tmp/rhui-debug-2013-02-04-T08-04-45/etc/httpd/conf.d] Copying file [/var/log/gofer/agent.log] to [/tmp/rhui-debug-2013-02-04-T08-04-45/var/log/gofer] Creating commands directory [/tmp/rhui-debug-2013-02-04-T08-04-45/commands] Storing output of command [/tmp/rhui-debug-2013-02-04-T08-04-45/commands] in [/tmp/rhui-debug-2013-02-04-T08-04-45/commands/ls_-lR_var.lib.pulp-cds] [root@cds1 ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-45/etc/pulp/ && echo SUCCESS cds.conf repo_auth.conf SUCCESS [root@cds1 ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-45/etc/gofer/plugins/ && echo SUCCESS builtin.conf cdsplugin.conf package.conf SUCCESS [root@cds1 ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-45/var/log/pulp-cds/ && echo SUCCESS gofer.log SUCCESS [root@cds1 ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-45/etc/httpd/conf.d/pulp-cds.conf && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-45/etc/httpd/conf.d/pulp-cds.conf SUCCESS [root@cds1 ~]# ls -1 /tmp/rhui-debug-2013-02-04-T08-04-45/var/log/gofer/agent.log && echo SUCCESS /tmp/rhui-debug-2013-02-04-T08-04-45/var/log/gofer/agent.log SUCCESS [root@cds1 ~]# ls -lR /var/lib/pulp-cds | diff -u /tmp/rhui-debug-2013-02-04-T08-04-45/commands/ls_-lR_var.lib.pulp-cds - && echo SUCCESS SUCCESS
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. http://rhn.redhat.com/errata/RHBA-2013-0571.html