log.debug("System to be installed: %s" % system_value)
if system_value in ['Ubuntu','Debian',]:
return "deb"
- if system_value in ['CentOS',]:
+ if system_value in ['CentOS', 'RedHatEnterpriseServer']:
return "rpm"
return system_value
remote.run(args=['sudo', 'yum', 'install', pkg2add, '-y',],
stderr=pk_err_mess)
except:
- if not pk_err_mess.getvalue().strip() == "Error: Nothing to do":
- raise
+ err_str = pk_err_mess.getvalue().strip()
+ if err_str.find("Error: ") >= 0:
+ ok_msg_loc = err_str.find("Error: Nothing to do")
+ if ok_msg_loc < 0:
+ raise
+ # Check for other error strings (I'm being paranoid).
+ if err_str[0:ok_msg_loc].find("Error: ") > 0:
+ raise
+ if err_str[ok_msg_loc+1:].find("Error: ") > 0:
+ raise
def purge_data(ctx):
"""
def _handle_vm_init(remote):
log.info('Running ceph_qa_chef on ', remote)
+ # /usr/bin/make and /usr/bin/gcc are not automatically installed on rhel . They should be added
+ # to the chef task, but these next two lines probably do not hurt things.
+ if not os.path.isfile('/usr/bin/make'):
+ remote.run(args=['sudo', 'yum', 'install', 'make', '-y'])
+ if not os.path.isfile('/usr/bin/gcc'):
+ remote.run(args=['sudo', 'yum', 'install', 'gcc', '-y'])
remote.run(args=['wget','-q','-O-',
'https://raw.github.com/ceph/ceph-qa-chef/master/solo/solo-from-scratch',
run.Raw('|'),