This would be wonderful if it's reliable. If you have the code to do this
I'll try it out.
I have been trying to get something similar working for a while now.
There's an execute_new subroutine in OS.pm which opens an SSH connection
when the first command is issued and then reuses it whenever execute_new is
called again. This uses Net::SSH::Expect. You can try it out by
redirecting the OS.pm::execute and utils.pm::run_ssh_command subroutines:
sub execute {
return execute_new(@_);
sub run_ssh_command {
...
$identity_paths = get_management_node_info()->{keys} if (!defined
$identity_paths || length($identity_paths) == 0);
return VCL::Module::OS::execute_new($node, $command, $output_level,
$timeout_seconds, $max_attempts, $port, $user, '', $identity_paths);
Note: in run_ssh_command, you need to add the line after the default
variable values have been assigned.
I've encountered problems when a signal is issued while a long running
command is being executed. The command is still running but execute_new's
call to read_all returns partial output while the command is still running.
This gets returned to the calling sub and all sorts of problems occur.
For some reason, it usually occurs when the libvirt.pm/KVM.pm modules are
copying images via the qemu-img utility.
-Andy
On Fri, Dec 20, 2013 at 11:21 AM, Dmitri Chebotarov <[email protected]>wrote:
> Hi
>
> Would it make sense to enable SSH multiplexing (sharing) in VCL env?
>
> There are many SSH commands executed during reservation and image capture
> and in a large environments sharing SSH connections could/should improve
> reservation times and performance.
>
> The vcld would execute 'ssh <worker> sleep Xm &¹ as 1st command and the
> rest of SSH communications with this VM will be done thru the established
> session (ZF-1).
>
> On VCLD¹s /root/.ssh/config:
>
> ControlMaster auto
> ControlPath /root/.ssh/tmp/%h_%p_%r
>
>
>
> --
> Thank you,
>
> Dmitri Chebotarov
> VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers &
> Messaging
> 223 Aquia Building, Ffx, MSN: 1B5
> Phone: (703) 993-6175 | Fax: (703) 993-3404
>
>
>
>
>
>