Opened 7 years ago

#769 new enhancement

Execute remote commands in the background

Reported by: Erik Schnetter Owned by: Erik Schnetter
Priority: minor Milestone:
Component: SimFactory Version:
Keywords: Cc:


In response to a discussion on the mailing list, I replied:

What we need here is an unsafe delayed-execution mechanism. So far,
Simfactory provides the safe version of these mechanisms -- it is safe
because all files are copied into the simulation directory, so that
the resulting simulation is self-contained. Since this takes time, we
are now looking for an unsafe mechanism that works much faster, but
could fail. (For example, if one modified the source tree while
Simfactory is still copying test results, the resulting simulation may
be inconsistent.)

I believe the standard Unix mechanism is "nohup". For example, after
logging in, you would say "nohup sim create-submit mytests --testsuite
--procs 2 &" (note the ampersand to make it run in the background).
What we now want is the same thing, except without logging in

A current work-around may be something like:

./bin/sim --remote ranger execute 'nohup sleep 100 </dev/null

/dev/null 2>&1 & :'

This executes a certain command on Ranger without waiting for the
result. It is necessary to redirect I/O so that ssh finishes. The
final ":" is a null command to obtain a legal shell syntax --
Simfactory expects the command to end without a terminator (such as
"&" or ";").

If you replace the "sleep 100" with any other command (e.g. "sim
submit"), things may work.

In the long term, this should become an option to "--remote", e.g.
"--remote-background". There should then also be a way to retrieve the
output generated by this command (which necessarily remains on the
remote system).

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
Next status will be 'confirmed'.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.