When adding a Centos Sever, SSH Checks for lsb_release pick up wrong data

Bug #445423 reported by Faraz Khan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zivios Open Source Enterprise Management
Fix Committed
Undecided
Mustafa A. Hashmi

Bug Description

SSH Command: which lsb_release
2009-10-07T13:04:38+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: which lsb_release
/usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:38+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin) -i -s
in:/bin:/usr/sbin:/usr/bin) -i -s7): Zivios_Ssh::243|Shell CMD Output: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sb
-bash: syntax error near unexpected token `('
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:39+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin) -c -s
in:/bin:/usr/sbin:/usr/bin) -c -s7): Zivios_Ssh::243|Shell CMD Output: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sb
-bash: syntax error near unexpected token `('
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:40+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin) -r -s
in:/bin:/usr/sbin:/usr/bin) -r -s7): Zivios_Ssh::243|Shell CMD Output: /usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sb
-bash: syntax error near unexpected token `('
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emscomputerdistro=/usr/bin/which: no lsb_release in (/-bash: syntax error near unexpected token `('
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emscomputerdistrorelease=/usr/bin/which: no lsb_releas-bash: syntax error near unexpected token `('-/usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sb
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emscomputersystem=Linux
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emsdistrodesc=/usr/bin/which: no lsb_release in (/usr/-bash: syntax error near unexpected token `('-/usr/bin/which: no lsb_release in (/usr/local/sbin:/usr/local/bin:/sb
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emsdistrocodename=/usr/bin/which: no lsb_release in (/-bash: syntax error near unexpected token `('
2009-10-07T13:04:41+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: cat /proc/cpuinfo | grep 'model name' | awk -F\: '{print $2}'| uniq | sed -e 's/ //'
 sed -e 's/ //'4:42+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: cat /proc/cpuinfo | grep 'model name' | awk -F\: '{print $2}'| uniq |
AMD Athlon(tm) 64 Processor 3000+
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:42+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: cat /proc/cpuinfo | grep 'cpu MHz' | awk -F\: '{print $2}'| uniq | sed -e 's/ //'
d -e 's/ //'3:04:43+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: cat /proc/cpuinfo | grep 'cpu MHz' | awk -F\: '{print $2}'| uniq | se
1800.063
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:43+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: cat /proc/cpuinfo | grep ^processor | wc -l
2009-10-07T13:04:44+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: cat /proc/cpuinfo | grep ^processor | wc -l
1
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:44+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: cat /proc/meminfo | grep MemTotal | awk -F\: '{print $2}' | awk -F\ '{print $1 " " $2}'
'{print $1 " " $2}'+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: cat /proc/meminfo | grep MemTotal | awk -F\: '{print $2}' | awk -F\
131284 kB
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:45+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: cat /proc/meminfo | grep SwapTotal | awk -F\: '{print $2}' | awk -F\ '{print $1 " " $2}'
 '{print $1 " " $2}'00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: cat /proc/meminfo | grep SwapTotal | awk -F\: '{print $2}' | awk -F\
0 kB
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:46+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: uname -sr
2009-10-07T13:04:47+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: uname -sr
Linux 2.6.24-23-xen
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:47+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: uname -m
2009-10-07T13:04:48+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: uname -m
i686
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:48+00:00 DEBUG (7): Zivios_Ssh::180|SSH Command: hostname -f
2009-10-07T13:04:49+00:00 DEBUG (7): Zivios_Ssh::243|Shell CMD Output: hostname -f
localhost.localdomain
-bash-3.2# echo "_CEE_"
_CEE_
-bash-3.2#
_ECO_
2009-10-07T13:04:49+00:00 DEBUG (7): Zivios_Ldap_Engine::403|Set Property called with namespace : CORE : emscomputerarch=i686
2009-10-07T13:04:49+00:00 ERR (3): EMSLinuxComputer::434|Distribution incompatible with Zivios.

Changed in zivios:
assignee: nobody → Mustafa A. Hashmi (mhashmi)
Revision history for this message
Mustafa A. Hashmi (mhashmi) wrote :

Committed fix (Rev 350).

Updates contain new SSH calls that handle command output and exit codes simultaneously. The pre-add operation for Linux based systems was checking for command output. This is a flawed approach by itself. Exit codes are now checked for and command output is returned as well for processing by caller. CentOS Server add has been tested and is working fine -- please reopen this bug is the issue persists.

Note: for more details, please see the Change Log for rev 350.

Changed in zivios:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.