The openssh-clients package was missing on a Red Hat Enterprise Virtualization Manager system installed using the minimal-installation option. As the rhevm-log-collector utility has a dependency on the openssh-clients package, it could not collect logs from hypervisors when openssh-clients was absent. This update adds the dependency to the installation spec file, so openssh-clients is installed together with the Manager, and the log-collector can gather hosts sosreports.
Description of problem:
In case openssh-clients are not installed, the log collector will fail:
Version-Release number of selected component (if applicable):
is3
How reproducible:
Run 'engine-log-collector'
Log:
[root@istein-33 /]# ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45
(04:40:03 PM) istein: -bash: ssh: command not found
[root@istein-33 /]# engine-log-collector -v
INFO: Gathering oVirt Engine information...
DEBUG: calling(['sosreport', '--batch', '--report', '--build', '--tmp-dir=/tmp/logcollector-mHSD5p', '-o', 'engine,rpm,libvirt,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,apache,memory', '-k', 'rpm.rpmva=off', '-k', 'general.all_logs=True', '-k', 'apache.log=True'])
DEBUG: returncode(0)
DEBUG: STDOUT(
sosreport (version 2.2)
This utility will collect some detailed information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.
This process may take a while to complete.
No changes will be made to your system.
Running plugins. Please wait ...
Completed [14/14] ...
sosreport build tree is located at : /tmp/logcollector-mHSD5p/istein-33-2013070216281372771728
)
DEBUG: STDERR()
INFO: Gathering PostgreSQL the oVirt Engine database and log files from localhost...
DEBUG: calling(['/usr/sbin/sosreport', '--batch', '--report', '-o', 'postgresql', '--tmp-dir=/tmp/logcollector-mHSD5p/log-collector-data', '-k', 'postgresql.dbname=engine', '-k', 'postgresql.username=engine', '-k', 'postgresql.password=123456'])
DEBUG: returncode(0)
DEBUG: STDOUT(
sosreport (version 2.2)
This utility will collect some detailed information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.
This process may take a while to complete.
No changes will be made to your system.
Running plugins. Please wait ...
Completed [1/1] ...
Creating compressed archive...
Your sosreport has been generated and saved in:
/tmp/logcollector-mHSD5p/log-collector-data/sosreport-istein-33-20130702162858-6437.tar.xz
The md5sum is: 695d52697b691d941b561c078bf46437
Please send this file to your support representative.
)
DEBUG: STDERR()
DEBUG: filename(sosreport-istein-33-20130702162858-6437.tar.xz)
DEBUG: path(/tmp/logcollector-mHSD5p/log-collector-data/sosreport-istein-33-20130702162858-6437.tar.xz)
DEBUG: checksum(695d52697b691d941b561c078bf46437)
DEBUG: API Vendor(ovirt.org) API Version(3.3.0)
About to collect information from 1 hypervisors. Continue? (Y/n): Y
INFO: Gathering information from selected hypervisors...
INFO: collecting information from 10.35.160.45
DEBUG: calling(['/usr/bin/ssh', '-p', '22', '-i', '/etc/pki/ovirt-engine/keys/engine_id_rsa', '-oStrictHostKeyChecking=no', 'root.160.45', "\nVERSION=`/bin/rpm -q --qf '[%{VERSION}]' sos | /bin/sed 's/\\.//'`;\nif [ $VERSION -ge 22 ]; then\n /usr/sbin/sosreport --batch -k general.all_logs=True -o libvirt,vdsm,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,memory,rpm\nelif [ $VERSION -ge 17 ]; then\n /usr/sbin/sosreport --no-progressbar -k general.all_logs=True -o vdsm,general,networking,hardware,process,yum,filesys\nelse\n /bin/echo No", 'valid', 'version', 'of', 'sosreport', 'found. 1>&2\n exit 1\nfi\n'])
ERROR: Failed to collect logs from: 10.35.160.45; [Errno 2] No such file or directory
DEBUG: Traceback (most recent call last):
DEBUG: File "/usr/bin/engine-log-collector", line 655, in run
DEBUG: stdout = self.sosreport()
DEBUG: File "/usr/bin/engine-log-collector", line 647, in sosreport
DEBUG: return self.caller.call(cmd)
DEBUG: File "/usr/bin/engine-log-collector", line 192, in call
DEBUG: stderr=subprocess.PIPE
DEBUG: File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
DEBUG: errread, errwrite)
DEBUG: File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child
DEBUG: raise child_exception
DEBUG: OSError: [Errno 2] No such file or directory
DEBUG: Configuration for 10.35.160.45:
DEBUG: {'bc_reports': 'vdsm,general,networking,hardware,process,yum,filesys',
DEBUG: 'cert_file': '/etc/pki/ovirt-engine/ca.pem',
DEBUG: 'engine': 'istein-33.scl.lab.tlv.redhat.com:443',
DEBUG: 'hostname': '10.35.160.45',
DEBUG: 'hosts': set([('nfsToolsTest',
DEBUG: <helper.hypervisors.Cluster object at 0x2d0de50>,
DEBUG: '10.35.160.45')]),
DEBUG: 'insecure': False,
DEBUG: 'key_file': '/etc/pki/ovirt-engine/keys/engine_id_rsa',
DEBUG: 'local_scratch_dir': '/tmp/logcollector-mHSD5p/log-collector-data',
DEBUG: 'local_tmp_dir': '/tmp/logcollector-mHSD5p',
DEBUG: 'log_file': '/var/log/ovirt-engine/engine-log-collector.log',
DEBUG: 'max_connections': 10,
DEBUG: 'no_hypervisor': False,
DEBUG: 'no_postgresql': False,
DEBUG: 'passwd': '123456',
DEBUG: 'pg_dbhost': 'localhost',
DEBUG: 'pg_dbname': 'engine',
DEBUG: 'pg_dbport': '5432',
DEBUG: 'pg_pass': '123456',
DEBUG: 'pg_ssh_user': 'root',
DEBUG: 'pg_user': 'engine',
DEBUG: 'quiet': False,
DEBUG: 'reports': 'libvirt,vdsm,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,memory,rpm',
DEBUG: 'scp_cmd': '/usr/bin/scp -P 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45',
DEBUG: 'ssh_cmd': '/usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45',
DEBUG: 'ssh_port': 22,
DEBUG: 'user': 'admin@internal',
DEBUG: 'verbose': True}
INFO: finished collecting information from 10.35.160.45
Creating compressed archive...
DEBUG: calling(['xz', '--version'])
DEBUG: returncode(0)
DEBUG: STDOUT(xz (XZ Utils) 4.999.9beta
liblzma 4.999.9beta
)
DEBUG: STDERR()
DEBUG: calling(['tar', '-cf', '/tmp/sosreport-LogCollector-20130702162903.tar', '-C', '/tmp/logcollector-mHSD5p', '.'])
DEBUG: returncode(0)
DEBUG: STDOUT()
DEBUG: STDERR()
DEBUG: calling(['xz', '-1', '/tmp/sosreport-LogCollector-20130702162903.tar'])
DEBUG: returncode(0)
DEBUG: STDOUT()
DEBUG: STDERR()
DEBUG: calling(['md5sum', '/tmp/sosreport-LogCollector-20130702162903.tar.xz'])
DEBUG: returncode(0)
DEBUG: STDOUT(aa0b0a26fd3a8c7e1f0e2ad84caefa85 /tmp/sosreport-LogCollector-20130702162903.tar.xz
)
DEBUG: STDERR()
INFO: Log files have been collected and placed in /tmp/sosreport-LogCollector-20130702162903.tar.xz.
The MD5 for this file is aa0b0a26fd3a8c7e1f0e2ad84caefa85 and its size is 0.7M
[root@istein-33 /]#
This bug is currently attached to errata RHBA-2013:15255. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.
Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:
* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')
Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.
For further details on the Cause, Consequence, Fix, Result format please refer to:
https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes
Thanks in advance.
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-2014-0039.html
Description of problem: In case openssh-clients are not installed, the log collector will fail: Version-Release number of selected component (if applicable): is3 How reproducible: Run 'engine-log-collector' Log: [root@istein-33 /]# ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45 (04:40:03 PM) istein: -bash: ssh: command not found [root@istein-33 /]# engine-log-collector -v INFO: Gathering oVirt Engine information... DEBUG: calling(['sosreport', '--batch', '--report', '--build', '--tmp-dir=/tmp/logcollector-mHSD5p', '-o', 'engine,rpm,libvirt,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,apache,memory', '-k', 'rpm.rpmva=off', '-k', 'general.all_logs=True', '-k', 'apache.log=True']) DEBUG: returncode(0) DEBUG: STDOUT( sosreport (version 2.2) This utility will collect some detailed information about the hardware and setup of your Red Hat Enterprise Linux system. The information is collected and an archive is packaged under /tmp, which you can send to a support representative. Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY and it will be considered confidential information. This process may take a while to complete. No changes will be made to your system. Running plugins. Please wait ... Completed [14/14] ... sosreport build tree is located at : /tmp/logcollector-mHSD5p/istein-33-2013070216281372771728 ) DEBUG: STDERR() INFO: Gathering PostgreSQL the oVirt Engine database and log files from localhost... DEBUG: calling(['/usr/sbin/sosreport', '--batch', '--report', '-o', 'postgresql', '--tmp-dir=/tmp/logcollector-mHSD5p/log-collector-data', '-k', 'postgresql.dbname=engine', '-k', 'postgresql.username=engine', '-k', 'postgresql.password=123456']) DEBUG: returncode(0) DEBUG: STDOUT( sosreport (version 2.2) This utility will collect some detailed information about the hardware and setup of your Red Hat Enterprise Linux system. The information is collected and an archive is packaged under /tmp, which you can send to a support representative. Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY and it will be considered confidential information. This process may take a while to complete. No changes will be made to your system. Running plugins. Please wait ... Completed [1/1] ... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/logcollector-mHSD5p/log-collector-data/sosreport-istein-33-20130702162858-6437.tar.xz The md5sum is: 695d52697b691d941b561c078bf46437 Please send this file to your support representative. ) DEBUG: STDERR() DEBUG: filename(sosreport-istein-33-20130702162858-6437.tar.xz) DEBUG: path(/tmp/logcollector-mHSD5p/log-collector-data/sosreport-istein-33-20130702162858-6437.tar.xz) DEBUG: checksum(695d52697b691d941b561c078bf46437) DEBUG: API Vendor(ovirt.org) API Version(3.3.0) About to collect information from 1 hypervisors. Continue? (Y/n): Y INFO: Gathering information from selected hypervisors... INFO: collecting information from 10.35.160.45 DEBUG: calling(['/usr/bin/ssh', '-p', '22', '-i', '/etc/pki/ovirt-engine/keys/engine_id_rsa', '-oStrictHostKeyChecking=no', 'root.160.45', "\nVERSION=`/bin/rpm -q --qf '[%{VERSION}]' sos | /bin/sed 's/\\.//'`;\nif [ $VERSION -ge 22 ]; then\n /usr/sbin/sosreport --batch -k general.all_logs=True -o libvirt,vdsm,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,memory,rpm\nelif [ $VERSION -ge 17 ]; then\n /usr/sbin/sosreport --no-progressbar -k general.all_logs=True -o vdsm,general,networking,hardware,process,yum,filesys\nelse\n /bin/echo No", 'valid', 'version', 'of', 'sosreport', 'found. 1>&2\n exit 1\nfi\n']) ERROR: Failed to collect logs from: 10.35.160.45; [Errno 2] No such file or directory DEBUG: Traceback (most recent call last): DEBUG: File "/usr/bin/engine-log-collector", line 655, in run DEBUG: stdout = self.sosreport() DEBUG: File "/usr/bin/engine-log-collector", line 647, in sosreport DEBUG: return self.caller.call(cmd) DEBUG: File "/usr/bin/engine-log-collector", line 192, in call DEBUG: stderr=subprocess.PIPE DEBUG: File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__ DEBUG: errread, errwrite) DEBUG: File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child DEBUG: raise child_exception DEBUG: OSError: [Errno 2] No such file or directory DEBUG: Configuration for 10.35.160.45: DEBUG: {'bc_reports': 'vdsm,general,networking,hardware,process,yum,filesys', DEBUG: 'cert_file': '/etc/pki/ovirt-engine/ca.pem', DEBUG: 'engine': 'istein-33.scl.lab.tlv.redhat.com:443', DEBUG: 'hostname': '10.35.160.45', DEBUG: 'hosts': set([('nfsToolsTest', DEBUG: <helper.hypervisors.Cluster object at 0x2d0de50>, DEBUG: '10.35.160.45')]), DEBUG: 'insecure': False, DEBUG: 'key_file': '/etc/pki/ovirt-engine/keys/engine_id_rsa', DEBUG: 'local_scratch_dir': '/tmp/logcollector-mHSD5p/log-collector-data', DEBUG: 'local_tmp_dir': '/tmp/logcollector-mHSD5p', DEBUG: 'log_file': '/var/log/ovirt-engine/engine-log-collector.log', DEBUG: 'max_connections': 10, DEBUG: 'no_hypervisor': False, DEBUG: 'no_postgresql': False, DEBUG: 'passwd': '123456', DEBUG: 'pg_dbhost': 'localhost', DEBUG: 'pg_dbname': 'engine', DEBUG: 'pg_dbport': '5432', DEBUG: 'pg_pass': '123456', DEBUG: 'pg_ssh_user': 'root', DEBUG: 'pg_user': 'engine', DEBUG: 'quiet': False, DEBUG: 'reports': 'libvirt,vdsm,general,networking,hardware,process,yum,filesys,devicemapper,selinux,kernel,memory,rpm', DEBUG: 'scp_cmd': '/usr/bin/scp -P 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45', DEBUG: 'ssh_cmd': '/usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa -oStrictHostKeyChecking=no root.160.45', DEBUG: 'ssh_port': 22, DEBUG: 'user': 'admin@internal', DEBUG: 'verbose': True} INFO: finished collecting information from 10.35.160.45 Creating compressed archive... DEBUG: calling(['xz', '--version']) DEBUG: returncode(0) DEBUG: STDOUT(xz (XZ Utils) 4.999.9beta liblzma 4.999.9beta ) DEBUG: STDERR() DEBUG: calling(['tar', '-cf', '/tmp/sosreport-LogCollector-20130702162903.tar', '-C', '/tmp/logcollector-mHSD5p', '.']) DEBUG: returncode(0) DEBUG: STDOUT() DEBUG: STDERR() DEBUG: calling(['xz', '-1', '/tmp/sosreport-LogCollector-20130702162903.tar']) DEBUG: returncode(0) DEBUG: STDOUT() DEBUG: STDERR() DEBUG: calling(['md5sum', '/tmp/sosreport-LogCollector-20130702162903.tar.xz']) DEBUG: returncode(0) DEBUG: STDOUT(aa0b0a26fd3a8c7e1f0e2ad84caefa85 /tmp/sosreport-LogCollector-20130702162903.tar.xz ) DEBUG: STDERR() INFO: Log files have been collected and placed in /tmp/sosreport-LogCollector-20130702162903.tar.xz. The MD5 for this file is aa0b0a26fd3a8c7e1f0e2ad84caefa85 and its size is 0.7M [root@istein-33 /]#