示例#1
0
文件: runlists.py 项目: allfs/autooam
def run002(vers, vmitype, num = None, enterprise = True):
    '''Runs basic002 on all configs on all supported boxtypes.'''
    runlist = []
    if vmitype == 'vagrant':
        for b in vagboxes.list_all():
            for c in configs.list_all():
                cfg = configs.call_by_name(c[0], vers, b)
                cfg['enterprise'] = enterprise
                runlist.append( (cfg, 'vagrant', tests.basic002() ) )

    return _random_subset(runlist,num)
示例#2
0
文件: runlists.py 项目: allfs/autooam
def run_boxtest(vers, vmitype, num = None, enterprise = True):
    '''Run all boxes variations with single node configs and minimal other variation.'''
    runlist = []
    
    # centos6
    cfg = configs.singlenode(vers)
    cfg['boxtype'] = 'cal-centos6'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # debian6
    cfg = configs.singlenode(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-debian6'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # debian7
    cfg = configs.singlenode(vers)
    cfg['binary'] = True
    cfg['boxtype'] = 'cal-debian7'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # precise64
    cfg = configs.singlenode(vers)
    cfg['boxtype'] = 'cal-precise64'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    # trusty64
    cfg = configs.singlenode(vers)
    cfg['idbuser'] = '******'
    cfg['boxtype'] = 'cal-trusty64'
    cfg['enterprise'] = enterprise
    runlist.append( (cfg, 'vagrant', tests.basic002()) )

    return runlist
示例#3
0
文件: runlists.py 项目: allfs/autooam
def run_hadoop_basic(vers, vmitype, num = None, enterprise = True):
    '''Run basic002 on the supported Hadoop configurations.'''
    
    # standard root package installs
    cfg = _base_hadoop_1um_2pm_config( vers, 'cal-centos6', enterprise ) 
    runlist = [ (cfg, 'vagrant', tests.basic002()) ]
    runlist.append( (cfg, 'vagrant', tests.moduleFailover(testpm1_fail = False)) )

    cfg = _base_hadoop_1um_2pm_config( vers, 'cal-precise64', enterprise ) 
    runlist.append( (cfg, 'vagrant', tests.basic002()) )
    runlist.append( (cfg, 'vagrant', tests.moduleFailover(testpm1_fail = False)) )

    # standard root binary installs
    cfg = _base_hadoop_1um_2pm_config( vers, 'cal-centos6', enterprise ) 
    cfg['binary'] = True
    runlist.append( (cfg, 'vagrant', tests.basic002()) )
    runlist.append( (cfg, 'vagrant', tests.moduleFailover(testpm1_fail = False)) )

    cfg = _base_hadoop_1um_2pm_config( vers, 'cal-precise64', enterprise ) 
    cfg['binary'] = True
    runlist.append( (cfg, 'vagrant', tests.basic002()) )
    runlist.append( (cfg, 'vagrant', tests.moduleFailover(testpm1_fail = False)) )
    
    return runlist
示例#4
0
文件: runlists.py 项目: allfs/autooam
def run_random_basic002(vers, vmitype, num = None, enterprise = True):
    '''Runs basic002 on a randomly generated config. 
       Note that the enterprise parameter is intentionally ignored.'''
    
    cfgs = [
             ( 'multi_2umpm_combo', 0.5 ),
             ( 'multi_1um_2pm', 0.5 ),
             ]
    if ConfigSpec._version_greaterthan(vers,'3.5.3'):
        cfgs.append( ('singlenode', 0.5) )
    
    idbusers = [
                ( 'root', 0.6 ),
                ( 'calpont', 0.4 )
               ]
    datdups   = [
             ( True, 0.2 ),
             ( False, 0.8 )
             ]
    binaries  = [
             ( True, 0.2 ),
             ( False, 0.8 )
             ]
    storages = [ 
             ('internal', 0.5 ),
             ('external', 0.5 )
             ]
    enterprises  = [
             ( True, 0.5 ),
             ( False, 0.5 )
             ]
    pmquerys  = [
             ( True, 0.5 ),
             ( False, 0.5 )
             ]
    emroles = [
             ( 'um1', 0.7),
             ( 'em1', 0.2),
             ( 'pm1', 0.1)
             ]
    
    runlist = []
    if num <= 0:
        # for this runlist we always want to generate at least one
        num = 1
    for i in range (0, num):    
        boxtype = _choose_rand_boxtype()
        cfgname = _choose_weighted(cfgs)
        cfg = configs.call_by_name(cfgname, vers, boxtype)
        idbuser = _choose_weighted(idbusers)
        cfg['idbuser'] = idbuser
        enterprise = _choose_weighted(enterprises)
        cfg['enterprise'] = enterprise

        # technically we supported datdup since 3.5.1 but are rereleasing with a different 
        # strategy for installation/integration in 4.0
        if ConfigSpec._version_greaterthan(vers,'4.0.0-0') and \
            vagboxes.datdup_support(boxtype) and \
            cfg['rolespec']['pm']['count'] > 1 and \
            enterprise == True:
            datdup = _choose_weighted(datdups)
        else:
            datdup = False
        # TODO: due to various InfiniDB bugs, datdup (i.e. glusterfs) support is
        # currently broken so hardcoding this to false.
        #cfg['datdup'] = datdup
        cfg['datdup'] = False
        
        # EM related checks
        if common.props['cluster.cluster.eminvm'] and not vagboxes.em_support(boxtype):
            # this can happen in the emboxonly flag is not set and a "legacy" box gets chosen.
            # in that case we just reset the 'em' field to None to bypass any EM in this test
            cfg['em'] = None
        elif common.props['cluster.cluster.eminvm']:
            # randomly vary which node the EM is assugned to
            cfg['em']['role'] = _choose_weighted(emroles)
        
        if idbuser == 'root':
            cfg['binary'] = _choose_weighted(binaries)
        if ConfigSpec._version_greaterthan(vers,'4.5.0-0'):
            cfg['pm_query'] = _choose_weighted(pmquerys)

        # for unknown reasons there is an issue with the external storage
        # configuration on the smaller of the 3 initial autooam machines
        # (srvautooam, srvoam1, srvoam2).  For now, we will avoid running
        # external storage on srvautooam by checking system memory.  NOTE:
        # the amount of memory may or may not have anything at all to do
        # with the manifestation of the issue
    
        # datdup only works with internal storage, so don't attempt an override here
        if not datdup and psutil.virtual_memory().total >= 16825044992L:
            cfg['storage'] = _choose_weighted(storages)
            
        runlist.append( (cfg, 'vagrant', tests.basic002() ) )
    return runlist