int rag_maxjobs;
int rag_jobs;
bool rag_bad;
+ bool rag_is_local;
int rag_check_in_progress;
struct lipe_list_head rag_list;
struct lipe_list_head rag_ssh_list;
lipe_list_del(&rss->rss_list);
pthread_mutex_unlock(&a->rag_ssh_lock);
- rc = lipe_ssh_exec(&rss->rss_ctx, cmd, pstatus);
+ rc = a->rag_is_local ?
+ system(cmd) :
+ lipe_ssh_exec(&rss->rss_ctx, cmd, pstatus);
+ if (rc)
+ llapi_error(LLAPI_MSG_INFO, rc,
+ "error executing ssh command '%s' on '%s'",
+ cmd, a->rag_hostname);
+
pthread_mutex_lock(&a->rag_ssh_lock);
lipe_list_add(&rss->rss_list, &a->rag_ssh_list);
pthread_cond_signal(&a->rag_ssh_cond);
a = xcalloc(1, sizeof(*a));
a->rag_index = lamigo_agent_count;
- a->rag_hostname = xstrdup(host);
+
+ if (strcmp(host, "-") == 0) {
+ a->rag_hostname = xstrdup("localhost");
+ a->rag_is_local = 1;
+ } else {
+ a->rag_hostname = xstrdup(host);
+ }
+
a->rag_mountpoint = xstrdup(mnt);
+
if (jobs) {
char *endptr;
pool_add_targets $LAMIGO_TGT $((OSTCOUNT / 2)) $((OSTCOUNT - 1)) ||
error "failed to add targets to OST pool '$LAMIGO_TGT'"
- LAMIGO_AGT_NODES="$(osts_nodes_in_pool $LAMIGO_SRC)"
+ LAMIGO_AGT_NODES="${LAMIGO_AGT_NODES:-$(osts_nodes_in_pool $LAMIGO_SRC)}"
}
# initialize lamigo variables