Specifying port for saga.job.Service

8 views
Skip to first unread message

Mark Perri

unread,
Jan 12, 2017, 2:56:57 PM1/12/17
to saga-users
I'm trying to use a non-standard port to submit jobs through slurm+ssh, but there is a problem when SAGA uploads the SLURM script. (version 0.44)

It looks like SAGA is using /usr/bin/sftp -P 2222 to set the port, but my sftp specifies to use sftp -oPort=2222 to set the port number.

Line 646 in utils/pty_shell_factory.py should read:                    info['sftp_args'] += "-oPort=%d " % int(url.port)

Thanks,
Mark
                                                                       

Andre Merzky

unread,
Jan 13, 2017, 4:38:28 AM1/13/17
to saga-...@googlegroups.com
Hi Mark,



On Thu, Jan 12, 2017 at 8:56 PM, Mark Perri <mark....@sonoma.edu> wrote:
> I'm trying to use a non-standard port to submit jobs through slurm+ssh, but
> there is a problem when SAGA uploads the SLURM script. (version 0.44)
>
> It looks like SAGA is using /usr/bin/sftp -P 2222 to set the port, but my
> sftp specifies to use sftp -oPort=2222 to set the port number.

Interesting - we did not yet encounter an sftp version which does not
accept '-P [port]'. May I ask what sftp version you are using, and on
what system you encountered it? On any debian-derived Linux system
(like Ubuntu), you can do that with:

$ dpkg -S `which sftp`
openssh-client: /usr/bin/sftp

$ dpkg -l | grep openssh-client
ii gsi-openssh-clients
7.1p2f-4+gt6.xenial amd64 GSI OpenSSH
Clients
ii openssh-client 1:7.3p1-1
amd64 secure shell (SSH) client, for
secure access to remote machines

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=yakkety
DISTRIB_DESCRIPTION="Ubuntu 16.10"


> Line 646 in utils/pty_shell_factory.py should read:
> info['sftp_args'] += "-oPort=%d " % int(url.port)

We need to check if that works for the different sftp versions around,
but indeed, that would be the alternative.

Thanks, Andre.


> Thanks,
> Mark
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "saga-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to saga-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
99 little bugs in the code.
99 little bugs in the code.
Take one down, patch it around.

127 little bugs in the code...

Mark Perri

unread,
Jan 13, 2017, 2:36:20 PM1/13/17
to saga-users
Hi Andre,

It's probably because our machines are so old.  Here's the version info (don't laugh)

Machine 1:
Ubuntu 10.04.4 LTS
openssh-client                         1:5.3p1-3ubuntu7.1


Machine 2:
Red Hat Enterprise Linux Server release 6.8 (Santiago)
openssh-clients-5.3p1-118.1.el6_8.x86_64

P.S.
Both machines are so old that they run python 2.6 which requires a change to radical/utils/read_json.py
line 61:  return dict([(_byteify(key),_byteify(value)) for key, value in input.iteritems()])

If the versions are too out of date to support it's not a big deal, it's easy to manually edit the files.
Thanks,
Mark

Andre Merzky

unread,
Jan 13, 2017, 3:33:08 PM1/13/17
to saga-...@googlegroups.com
That is... fascinating :) But in earnest: I am sure you have reasons
to keep those machines around, who am I to judge?

About Python 2.6: yeah, we know we are incompatible in a number of
places. Worse, some parts of our code actually break semantically
under 2.6, so we are unlikely able to really support it. The SAGA
layer should not be affected IIRC, but we can't really make any
promises in that respect.

About the ssh version: interesting! Well, I don't mind using '-oPort'
really. The few installations I checked all support it. Let me look
around a little more to verify that on some of the machines we depend
on - if that works out, I don't mind adding that fix.

Best, Andre.

Mark Perri

unread,
Jan 13, 2017, 4:18:39 PM1/13/17
to saga-users
Sounds good.  I keep meaning to upgrade the first, but it's in constant use and any downtime is slightly disastrous.  The second is maintained by our IT and I don't even have root access.  Maybe this summer (I've said that for 3 or 4 years now).
Thanks,
Mark

Andre Merzky

unread,
Jan 15, 2017, 7:47:27 AM1/15/17
to saga-...@googlegroups.com
Dear Mark,

`-o Port` seems to be sufficiently supported. I did the suggested
change in a branch (`fix/ssh_port_spec`). Could you please give that
a try and report back? We can then consider that branch for merge and
testing toward the next release.

Thanks, Andre.

Mark Perri

unread,
Jan 16, 2017, 6:26:35 PM1/16/17
to saga-users
Thanks for the quick fix, that works fine.
Mark

Andre Merzky

unread,
Jan 16, 2017, 7:20:43 PM1/16/17
to saga-...@googlegroups.com
Great! It will go into the next release then, which is planned to
happen around mid February.

Best, Andre.
Reply all
Reply to author
Forward
0 new messages