Bug 1118910 - katello-debug.sh should be moved instead of copied
Summary: katello-debug.sh should be moved instead of copied
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Infrastructure
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: Unspecified
Assignee: Bryan Kearney
QA Contact: sthirugn@redhat.com
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 21:46 UTC by Chris Roberts
Modified: 2016-04-22 15:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:29:21 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 6682 None None None 2016-04-22 15:39:43 UTC

Description Chris Roberts 2014-07-11 21:46:59 UTC
Description of problem:

when running katello-debug to collect logs it says command not found. we found the script that its supposed to call under /usr/share/katello/scripts/katello-debug.sh

when doing sh /usr/share/katello/scripts/katello-debug.sh it comes back with:

[root@toledosat6 script]# sh katello-debug.sh 
katello-debug.sh: line 2: add_files: command not found
katello-debug.sh: line 5: add_files: command not found
katello-debug.sh: line 6: add_files: command not found
katello-debug.sh: line 7: add_files: command not found
katello-debug.sh: line 8: add_files: command not found
katello-debug.sh: line 11: add_files: command not found
katello-debug.sh: line 12: add_files: command not found
katello-debug.sh: line 15: add_files: command not found
katello-debug.sh: line 16: add_files: command not found
katello-debug.sh: line 17: add_files: command not found
katello-debug.sh: line 18: add_files: command not found
katello-debug.sh: line 19: add_files: command not found
katello-debug.sh: line 22: add_cmd: command not found
katello-debug.sh: line 25: add_files: command not found
katello-debug.sh: line 26: add_files: command not found
katello-debug.sh: line 27: add_files: command not found
katello-debug.sh: line 28: add_files: command not found
katello-debug.sh: line 29: add_files: command not found
katello-debug.sh: line 32: add_files: command not found
katello-debug.sh: line 33: add_files: command not found
katello-debug.sh: line 34: add_cmd: command not found
katello-debug.sh: line 35: add_files: command not found

How reproducible:


Steps to Reproduce:
1. run katello-debug = command not found
2. run the script at /usr/share/katello/scripts/katello-debug.sh
3. lots of errors with add_cmd and add_files command not found

Actual results:
[root@toledosat6 script]# sh katello-debug.sh 
katello-debug.sh: line 2: add_files: command not found
katello-debug.sh: line 5: add_files: command not found
katello-debug.sh: line 6: add_files: command not found
katello-debug.sh: line 7: add_files: command not found
katello-debug.sh: line 8: add_files: command not found
katello-debug.sh: line 11: add_files: command not found
katello-debug.sh: line 12: add_files: command not found
katello-debug.sh: line 15: add_files: command not found
katello-debug.sh: line 16: add_files: command not found
katello-debug.sh: line 17: add_files: command not found
katello-debug.sh: line 18: add_files: command not found
katello-debug.sh: line 19: add_files: command not found
katello-debug.sh: line 22: add_cmd: command not found
katello-debug.sh: line 25: add_files: command not found
katello-debug.sh: line 26: add_files: command not found
katello-debug.sh: line 27: add_files: command not found
katello-debug.sh: line 28: add_files: command not found
katello-debug.sh: line 29: add_files: command not found
katello-debug.sh: line 32: add_files: command not found
katello-debug.sh: line 33: add_files: command not found
katello-debug.sh: line 34: add_cmd: command not found
katello-debug.sh: line 35: add_files: command not found

Expected results:
katello-debug to run ok

Here is the script:

# General stuff
add_files "/var/log/audit/audit.log"

# Candlepin
add_files "/var/log/candlepin/*"
add_files "/var/log/tomcat6/*"
add_files "/etc/candlepin/candlepin.conf"
add_files "/etc/tomcat6/server.xml"

# Elastic Search
add_files "/var/log/elasticsearch/*"
add_files "/etc/elasticsearch/*"

# Pulp
add_files "/etc/pulp/*.conf"
add_files "/etc/pulp/server/plugins.conf.d/nodes/distributor/*"
add_files "/var/log/pulp/*"
add_files "/etc/httpd/conf.d/pulp.conf"
add_files "/etc/qpidd.conf"

#Grab the qpid items from syslog
add_cmd "cat /var/log/messages | grep qpidd" "/var/log/qpidd.log"

# Splice
add_files "/var/log/splice/*"
add_files "/etc/splice/*"
add_files "/etc/httpd/conf.d/splice.conf",
add_files "/etc/cron.d/spacewalk-sst-sync"
add_files "/etc/cron.d/splice-sst-sync"

# Katello
add_files "/var/log/katello/*"
add_files "/var/log/katello-installer/*"
add_cmd "find /root/ssl-build -ls | sort -k 11" "katello_ssl_build_dir"
add_files "/etc/foreman/plugins/katello.yaml"

Comment 1 RHEL Product and Program Management 2014-07-11 22:03:56 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 sthirugn@redhat.com 2014-07-14 01:21:36 UTC
This is NOTABUG and works as expected.  katello-debug doesnt work anymore and foreman-debug should be used. Please refer https://bugzilla.redhat.com/show_bug.cgi?id=1102362

Comment 5 Rob Marti 2014-07-14 13:09:19 UTC
For what it's worth, katello-debug is still installed by the katello package, it's just not in the PATH anymore.


katello-1.5.0-26.el6sat.noarch
/usr/share/katello/scripts/katello-debug.sh

Comment 6 Rob Marti 2014-07-14 13:13:51 UTC
Correction - /usr/share/katello/script/katello-debug.sh
Sorry for any confusion.

Comment 7 Bryan Kearney 2014-07-17 13:35:56 UTC
Foreman debud should be used instead. The solution to this is for the packaging to move the file, instead of linking it.

Comment 9 Bryan Kearney 2014-07-17 20:46:30 UTC
Created redmine issue http://projects.theforeman.org/issues/6682 from this bug

Comment 10 Bryan Kearney 2014-08-05 22:03:54 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6682 has been closed
-------------
Bryan Kearney
Applied in changeset commit:katello|41200b4d3333075db3ef1a55fe04236b4550c931.

Comment 13 sthirugn@redhat.com 2014-08-07 15:37:22 UTC
Verified.

# ls -l /usr/share/katello/script/
total 32
-rwxr-xr-x. 1 root root 1245 Aug  6 10:34 katello-debug.sh
-rwxr-xr-x. 1 root root  342 Aug  6 10:34 katello-jobs
-rwxr-xr-x. 1 root root 2650 Aug  6 10:34 katello-remove
-rwxr-xr-x. 1 root root  145 Aug  6 10:34 katello-remove-orphans
-rwxr-xr-x. 1 root root 4197 Aug  6 10:34 katello-service
-rwxr-xr-x. 1 root root 5601 Aug  6 10:34 service-wait


# /bin/sh /usr/share/katello/script/katello-debug.sh 
This script should not be executed directly, use foreman-debug instead

Version Tested:
GA Snap 4 - Satellite-6.0.4-RHEL-6-20140806.0

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.19-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.19-1.el6_5.noarch
* candlepin-tomcat6-0.9.19-1.el6_5.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.6.0.38-1.el6sat.noarch
* foreman-compute-1.6.0.38-1.el6sat.noarch
* foreman-gce-1.6.0.38-1.el6sat.noarch
* foreman-libvirt-1.6.0.38-1.el6sat.noarch
* foreman-ovirt-1.6.0.38-1.el6sat.noarch
* foreman-postgresql-1.6.0.38-1.el6sat.noarch
* foreman-proxy-1.6.0.23-1.el6sat.noarch
* foreman-selinux-1.6.0.4-1.el6sat.noarch
* foreman-vmware-1.6.0.38-1.el6sat.noarch
* katello-1.5.0-28.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-installer-0.0.57-1.el6sat.noarch
* openldap-2.4.23-34.el6_5.1.x86_64
* pulp-katello-0.3-3.el6sat.noarch
* pulp-nodes-common-2.4.0-0.30.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.30.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.30.beta.el6sat.noarch
* pulp-server-2.4.0-0.30.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
* sssd-ldap-1.11.5.1-3.el6.x86_64

Comment 15 Bryan Kearney 2014-09-11 12:29:21 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.