Giter Site home page Giter Site logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hmm.  It looks like you're using a pre-2.0 version of pssh.  In pssh 2.0, if a 
host is 
specified more than once, it will create multiple files: first "hostname", then 
"hostname.1", "hostname.2", etc.  This works even if the host is specified 
twice with 
the same port.  Does this address your problem, or is there a use case where 
the port 
really needs to be included in the filename?  Thanks.

Original comment by [email protected] on 16 Feb 2010 at 7:47

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
In fact it's not very convenient to have the output files named .1 .2 .3

After I launched my pssh command, I look in the output folder, and it's very
difficult to retrieve the host from the .X file. (you have to look for the Xth
position in your host file).

It is far better to have the exact host name in the output file.

What do you think ?

Original comment by [email protected] on 18 Feb 2010 at 4:52

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Thanks for your opinions.  Let me give you a little more justification for the 
way things are being 
done right now, and then ask you a few questions to help find a way to make 
things better.

I think .1 .2 .3 will always be necessary because sometimes you connect to the 
exact same host multiple 
times.  Suppose I run `pssh -h hosts_file -h hosts_file -h hosts_file -o output 
some_command`.  Then 
there need to be separate output files, but there is no way to distinguish the 
different connections to 
the same hosts.

It sounds like your need is to be able to distinguish between connections by 
the port as well as the 
host.  What would you think of making the filename be of the form 
"username@hostname:port.number", 
where the username and port are only added if non-default?  A few examples:

- If I connect to athena three times, the files' names are "athena", 
"athena.1", and "athena.2".
- If I connect to athena twice with port 50, the filenames are "athena:50" and 
"athena:50.1".
- If I connect to athena once with username jdoe and once with port 50, the 
filenames are "jdoe@athena" 
and "athena:50".

I would love to hear your thoughts on this proposal, as well as any alternate 
proposals you have in 
mind.  Thanks for your help with pssh.

Original comment by [email protected] on 18 Feb 2010 at 6:31

  • Changed state: Accepted

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024

Original comment by [email protected] on 18 Feb 2010 at 6:31

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I totaly agree with your idea.

To my mind the output file name should be the closest of the line format in the
hosts_file. But of course it's not possible because the username is separated 
with a
space (new idea: change the hosts_file format.).

Thanks!

Original comment by [email protected] on 19 Feb 2010 at 2:37

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Okay.  I just made a commit that should implement the behavior described in 
comment 
#3.  Would you please test this and see if it works for you?

You have a good point about the format of the hosts file (where 
"user@host:port" would 
probably make more sense than "host:port user").  However, this is really a 
separate 
issue; would you please open a new issue for this?  Thanks for your help.

Original comment by [email protected] on 19 Feb 2010 at 6:06

  • Changed state: Started

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hello,

I cloned the git repo.
I get the following error :

pssh/bin$ ./pssh -v -h /tmp/hosts -o /tmp/output/ -e /tmp/error/ ls
Traceback (most recent call last):
  File "./pssh", line 115, in <module>
    if opts.host_entries:
AttributeError: Values instance has no attribute 'host_entries'

Am I calling pssh properly ?

Thanks in advance
Marc

Original comment by [email protected] on 22 Feb 2010 at 10:30

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I tried reproducing the error you just posted, but I wasn't able to get this 
exception.  I think the problem is that there is an older version of psshlib 
somewhere 
on your Python path.  I've now pushed a change that I think will address your 
problem.  
Would you mind doing a "git pull" and trying again?  Thanks for your help.

Original comment by [email protected] on 22 Feb 2010 at 5:37

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
[deleted comment]

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Thanks. It works perfectly :

pssh/bin$ cat hosts 
SERVER
SERVER
SERVER:222
SERVER:222
pssh/bin$ ./pssh -h hosts -o output/ -e error/ ls
[1] 08:58:31 [SUCCESS] SERVER:222
[2] 08:58:31 [SUCCESS] SERVER
[3] 08:58:31 [SUCCESS] SERVER
[4] 08:58:31 [SUCCESS] SERVER:222
pssh/bin$ ls -l output/*
-rw-r--r-- 1 mamau mamau 37 24 févr. 08:58 output/SERVER
-rw-r--r-- 1 mamau mamau 37 24 févr. 08:58 output/SERVER.1
-rw-r--r-- 1 mamau mamau 12 24 févr. 08:58 output/SERVER:222
-rw-r--r-- 1 mamau mamau 12 24 févr. 08:58 output/SERVER:222.1

Original comment by [email protected] on 24 Feb 2010 at 8:13

from parallel-ssh.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Great.  Thanks for reporting the problem and testing the changes.

Original comment by [email protected] on 24 Feb 2010 at 4:08

  • Changed state: Verified

from parallel-ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.