View Issue Details

IDProjectCategoryView StatusLast Update
855RackTablesdefaultpublic2013-06-09 08:23
Reporterapromix007 Assigned Toandriyanov  
Status assignedResolutionopen 
PlatformLinuxOSDebianOS Versionsqueeze
Product Version0.20.4 
Summary855: SSH Gateway with FTOS8 (Force10) is not working
DescriptionHi ..

I found 2 problems when I using the SSH gateway with Force10 Switches (FTOS8).

1) After sending commands to Force10 Switch through SSH gateway isn't the connection terminated correctly, but stays open.
The problem is terminal settings on the Switch and the absence of one command to the end. The Switch is expected SPACE key (--More-- --More-- --More-- ...) and "exit\n" command yet.

The Solution is a little patch in inc/deviceconfig.php file:

-------------------------------------- CUT --------------------------------------
--- inc/deviceconfig.php-orig 2013-05-10 10:30:07.214835333 +0200
+++ inc/deviceconfig.php-new 2013-05-10 11:11:07.615878143 +0200
@@ -1695,7 +1695,7 @@
                        throw new InvalidArgException ('opcode', $cmd['opcode']);
- return $ret;
+ return "terminal length 0\n" . $ret . "exit\n";
 function air12TranslatePushQueue ($dummy_object_id, $queue, $dummy_vlan_names)
-------------------------------------- CUT --------------------------------------

2) The return code from SSH gateway is not evaluated correctly. SSH returns the return code "0" and the message "Connection to XXX.XXX.XXX.XXX closed by remote host.", what is correct.
RackTables display but the error message "gateway error: ssh error: Connection to XXX.XXX.XXX.XXX closed by remote host." and no result.
This is not a real error, but notice only in this case.

The Solution is a little patch in inc/remote.php file:

-------------------------------------- CUT --------------------------------------
--- inc/remote.php-orig 2013-05-10 10:28:22.146894528 +0200
+++ inc/remote.php-new 2013-05-10 11:44:57.594879535 +0200
@@ -443,7 +443,7 @@
        if ($settings['protocol'] != 'ssh' || ! $tolerate_remote_errors)
- if (! empty ($errors))
+ if ($ret_code !== 0 && ! empty ($errors)) //gateway error: ssh error: Connection to XXX.XXX.XXX.XXX closed by remote host. IS NOT REAL ERROR !!!
                        throw new RTGatewayError ("${settings['protocol']} error: " . rtrim ($errors));
                elseif ($ret_code !== 0)
                        throw new RTGatewayError ("${settings['protocol']} error: result code $ret_code");
-------------------------------------- CUT --------------------------------------

After these two patches the SSH gateway work with Force10 perfectlly.

Thanks for reading.

Best Regards,
Marian Stetina
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-05-10 12:18 apromix007 New Issue
2013-06-09 08:23 andriyanov Assigned To => andriyanov
2013-06-09 08:23 andriyanov Status new => assigned