cfg['lutf']['tmp-dir'] = os.environ['LUTF_TMP_DIR']
except:
pass
- try:
- cfg['lutf']['tmp-dir'] = os.environ['LUTF_TMP_DIR']
- except:
- pass
if len(agent_list) > 0:
cfg['lutf']['agent-list'] = agent_list
def __collect_lutf_logs(self, host):
if host != os.environ['HOSTNAME']:
rfname = "lutf."+host+".tar.gz"
+ tmp_dir = cfg['lutf']['tmp-dir']
rfpath = os.path.join(os.sep, 'tmp', rfname)
- rtardir = os.path.join('tmp', 'lutf')
- cmd = "tar -czf "+rfpath+" -C "+os.sep+" "+rtardir
+ cmd = "tar -czf "+rfpath+" -C "+os.sep+" "+tmp_dir
lutf_exec_remote_cmd(cmd, host);
- lutf_get_file(host, rfpath, os.path.join(os.sep, 'tmp', 'lutf', rfname))
+ lutf_get_file(host, rfpath, os.path.join(tmp_dir, rfname))
def run(self):
master = ''
self.__lustre_base_path = ''
self.alias_list = self.provision_intfs(config_ifs_num)
# delete any older test_progress files
- if os.path.isfile(self.get_test_progress_path()):
+ if os.path.isfile(self.get_test_progress_path()) and self.__lutf_type == EN_LUTF_MASTER:
os.remove(self.get_test_progress_path())
def import_env_vars(self, fpath):
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(hostname=target, timeout=3, banner_timeout=3, auth_timeout=3, username='root')
+ ssh.connect(hostname=target, timeout=3, banner_timeout=3, username='root')
sftp = ssh.open_sftp()
logging.debug("Commencing get %s -> %s" % (rfile, sfile))
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(hostname=target, timeout=3, banner_timeout=3, auth_timeout=3, username='root')
+ ssh.connect(hostname=target, timeout=3, banner_timeout=3, username='root')
sftp = ssh.open_sftp()
logging.debug("Commencing put %s -> %s" % (sfile, rfile))
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(hostname=host, timeout=3, banner_timeout=3, auth_timeout=3, username='root')
+ ssh.connect(hostname=host, timeout=3, banner_timeout=3, username='root')
stdin, stdout, stderr = ssh.exec_command(cmd)
error = False
def api_config_ni(self, net, device_list=[], global_cpts=None, ip2nets=None,
peer_credits=128, peer_timeout=180, peer_buffer_credits=0,
- credits=256):
+ credits=256, conns_per_peer = -1):
tunables = lnetconfig.lnet_ioctl_config_lnd_tunables()
tunables.lt_cmn.lct_peer_timeout = peer_timeout
tunables.lt_cmn.lct_peer_tx_credits = peer_credits;
return False, [rc, net, device_list, global_cpts, ip2nets]
else:
g_cpts = None
- rc, yaml_err = lnetconfig.lustre_lnet_config_ni(nwd, g_cpts, ip2nets, tunables, -1)
+ rc, yaml_err = lnetconfig.lustre_lnet_config_ni(nwd, g_cpts, ip2nets, tunables, conns_per_peer, -1)
#Freeing the g_cpts causes a segmentation fault
#if g_cpts:
# lnetconfig.cfs_expr_list_free(g_cpts)
{
struct timeval start;
struct timeval now;
- struct cYAML *a;
bool found = false;
lutf_agent_blk_t *agent;
PDEBUG("Start waiting for Agents");
while (now.tv_sec - start.tv_sec < timeout && !found) {
+ struct cYAML *a = NULL;
+
found = true;
PDEBUG("Waiting for Agents");
while (cYAML_get_next_seq_item(agents, &a) != NULL) {