Code Monkey home page Code Monkey logo

pdsh's People

Contributors

chu11 avatar garlick avatar grondo avatar

Watchers

 avatar

pdsh's Issues

incorrect permissions on target install directories

pdsh-2.28 doesn't explicitly set directory permissions appropriately.

account used to do 'configure' and 'make':

ssh-sdowdy$ umask
0077

account used to do the 'make install':

root# umask
0022

Consequently:

# pwd
/usr/local/pdsh-2.28
# find . -type d -ls
50497513    4 drwx------   6 root     root         4096 Nov  3 08:37 .
50497531    4 drwx------   2 root     root         4096 Nov  3 08:37 ./bin
50497515    4 drwx------   3 root     root         4096 Nov  3 08:37 ./lib
50497516    4 drwx------   2 root     root         4096 Nov  3 08:37 ./lib/pdsh
50497514    4 drwx------   2 root     root         4096 Nov  3 08:37 ./sbin
50497536    4 drwxr-xr-x   3 root     root         4096 Nov  3 08:37 ./man
50497537    4 drwxr-xr-x   2 root     root         4096 Nov  3 08:37 ./man/man1

looking at the 'make install' transaction log....

/usr/bin/install -c -d -m 0755 "/usr/local/pdsh-2.28/man/man1"
explains the (correct) perms on the man directories, but:

test -z "/usr/local/pdsh-2.28/bin" || mkdir -p -- "/usr/local/pdsh-2.28/bin"

explains how explicit perms aren't done on the bin directory.

Thanks,
--stephen

Original issue reported on code.google.com by [email protected] on 3 Nov 2011 at 2:48

DSHGROUP_PATH default is not correct

It seems that the code which added support for overriding
DSHGROUP_PATH at configure is broken. 

 1. The default is /etc/dshgroup and should be /etc/dsh
 2. The default is incorrect in config/ac_dshgroup.m4
 3. If running configure with just --with-dshgroup, the
    default becomes CONFIG_DSHGROUP=yes

Thanks to Stephen Dowdy for reporting this

Original issue reported on code.google.com by [email protected] on 3 Nov 2011 at 2:10

[patch] PDSH_SSH_ARGS undocumented behavior change

``$PDSH_SSH_ARGS`` has new undocumented requirement of
specifying host and username format characters for
expansion in pipecmd().

These format chars appear to be intended for internal
pdsh usage and probably should not be exposed to the
user (and required as they are now), breaking
compatibility: My usual login scripts broke after
upgrading pdsh from 2.11 to 2.23.

The manual seems to say that ``$PDSH_SSH_ARGS`` is
strictly an ssh command line; it does not say anything
about the user needing to supply the special ``%h`` and
``%l`` format characters in there.  After moving from
2.11 to trunk it became a requirement to specify these
format chars if ``$PDSH_SSH_ARGS`` was used.

Looks like this was broken in r1143 during refactor of
ssh module to use pipecmd.

Following patch is intended to restore original
behavior while preserving the changes from r1143.

Please apply, thanks.

-- 
Scott

Original issue reported on code.google.com by [email protected] on 27 Apr 2011 at 2:00

Attachments:

dshbak: Support sending output to one file per host

From: Michael Shigorin <mike at osdn dot org dot ua>
Subject: [pdsh] dshdir(1) output processing script
To: Mark Grondona                                         
Cc: Alexander Bandura <xand dot bandura at gmail dot com>                       

Date: Fri, 25 Feb 2011 06:45:48 -0800                                           

        Hello Mark,                                                             
please find attached the perl script my colleague has kindly                    
turned dshbak(1) into on my request.  Maybe dshbak might be                     
modified to include this functionality but we needed at least                   
something capable of putting each node's output separately                      
and it might be useful for others as well.                                      

Alexander is CCed, and I've finally wrote a manpage along with                  
including the script into ALT Linux package:                                    
http://packages.altlinux.org/pdsh

Usage: dshdir -d DIR [-f]

Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 3:19

Allow more levels of directory recursion in rpdcp server

I was looking into getting pdsh built for ppc64.  It failed test
t0006-pdcp.sh #19 "rpdcp -r works" due to getting a SIGSEGV in the
rpdcp command.  The test has about 7 levels of directory recursion
(tree/dir/a/b/c/d/e).  On ppc64, the SEGV came after about the 5th
level (tree/dir/a/b/c).  Eventually, I found that stack was being
exhausted.

Here are some numbers:

  $ getconf -a | grep PAGE_SIZE
  x86_64 : PAGE_SIZE 4096
  ppc64  : PAGE_SIZE 65536

  $ grep ' DSH_THREAD_STACKSIZE ' src/pdsh/dsh.c
  #define DSH_THREAD_STACKSIZE    128*1024

So the ppc64 system is using 64K pages with a thread stack size of
128K.  There is stack guard page, which being one page is 64K on
ppc64, so the usable stack is 64K.  In src/pdsh/pcp_server.c in
_sink(), there is a "char buf[BUFSIZ]" definition where BUFSIZ in
8192.  Therefore, the stack grows by at least 8K per recursion in
_sink().  64K / 8K = 8, which is reasonably close to the 5 levels that
are actually achieved, especially given that there are over 400 bytes
worth of other stack variables.

I did some tests upping the stack size and moving buf to the heap.
The latter was a much bigger win in terms of the number of levels deep
that could be recursed into before stack exhaustion.

  buf on stack:
    ppc64 128K stack size = 5 levels
    ppc64 256K stack size = 20 levels

    x86_64 128K stack size = 14 levels

  buf on heap:
    ppc64 128K stack size = 83 levels

    x86_64 128K stack size = 227 levels

I attached a patch that moves buf to the heap plus cleans up a few
other items in that area of the code.

Original issue reported on code.google.com by [email protected] on 15 Feb 2012 at 4:40

Attachments:

pdsh omitting ssh config options


Hi

I had a lot of host to manage with hostnames not so easily defined by a regex. 
To be more compicated I have different user names on these host. That is the 
reason why I am using a well configured .ssh/config file (500+ lines without 
comments).

The problem is that pdsh is omitting _SOME_ of the settings, to be more 
precise, it is only using the IdentityFile option as far as I experienced. See 
below:

These are two samples are verifing that I have a correct ssh config file 
(different username than the local one, pubkey works):

ag51@szivattyu # ssh hostone id
uid=214(aggg123) gid=1(staff)
ag51@szivattyu # ssh hosttwo id
uid=513(nem3lehe) gid=1(staff)

Plain pdsh doesn't work. Checking the remote side logs, it is using the local 
username (ag51), which of course didn't works, omitting the ssh config file.

ag51@szivattyu  # pdsh -w hostone -w hosttwo id
hostone: Permission denied, please try again.
hostone: Permission denied, please try again.
hostone: Permission denied (publickey,password,keyboard-interactive).
pdsh@szivattyu: hostone: ssh exited with exit code 255
hosttwo: Permission denied, please try again.
hosttwo: Permission denied, please try again.
hosttwo: Permission denied (publickey,password,keyboard-interactive).
pdsh@szivattyu: hosttwo: ssh exited with exit code 255

Using the -l option explicitly make it work.

ag51@szivattyu  # pdsh -l aggg123 -w hostone -w hosttwo id
hostone: uid=214(aggg123) gid=1(staff)
hosttwo: uid=513(nem3lehe) gid=1(staff)

The problem is, that I didn't use a default private key, so the location is 
only configured in the .ssh/config file, which proofs that pdsh reads some of 
the options from it. 

I took a look at the code, however I'm not a coder, and I figured out, that it 
somehow gets the username from only two sources: the local username, or from 
the -l option. It didn't check the .ssh/config for the username.

Is there any solution for this? As I told the story above, the -l switch is not 
an option in my case, and I don't think that I am the only one who uses such 
.ssh/config files.

Currently I am using dancers shell, but I want to get rid of it for some 
reasons. But dancers shell can use the ssh config file flawless.

Regards,
V. Kandasamy

Original issue reported on code.google.com by [email protected] on 30 Sep 2011 at 5:48

Support forwarding stdin in pdsh


From an sf.net user:

"It would be nice, if pdsh could be used in a pipe. For example:

 $ echo foo bar | pdsh -w host1,host2 md5sum"

In order to support anything like this, pdsh first needs to support
broadcasting of stdin. This is on the TODO list, but is low priority
at the moment.

Original issue reported on code.google.com by [email protected] on 10 Sep 2010 at 4:36

pdsh hangs on creating a daemon process

I am trying to use pdsh to startup a hiphop server in daemon mode. I see that 
pdsh hangs on the issuing machine.

If I shutdown hiphop on the target machine, through other means, pdsh shuts 
down on the issuing machine.

As a workaround I am using the '-u' option to timeout after 10 seconds. But 
this is error-prone.

If you can give me reasons why this is happening (created process not shutting 
down file descriptors etc) I can fix this on hiphop.

I would really appreciate any pointers.
-- Param

Original issue reported on code.google.com by [email protected] on 28 Jan 2011 at 2:03

HP-UX issues

User macnfaf graciously ran some tests on HP-UX and noted failures.
This issue is set up to track resolution to the various problems on HP-UX.

Original issue reported on code.google.com by [email protected] on 15 Aug 2011 at 9:11

pdcp not work fine

> pdcp -V
pdsh-2.24 (+readline)

master server is : CNC-BJ-5-3N1
slave server is : CNC-BJ-5-3N2

command following:  
pdcp -R ssh -w CNC-BJ-5-3N2 /Application/abc /Application/  

output: 
CNC-BJ-5-3N2: bash: /Application/abc: No such file or directory
pdcp@CNC-BJ-5-3N1: CNC-BJ-5-3N2: ssh exited with exit code 127

"/Application/abc " exactly exist on  CNC-BJ-5-3N1.

what can i do for this case. thx.

-- heipark zhang

Original issue reported on code.google.com by [email protected] on 19 Oct 2011 at 11:04

  • Merged into: #12

Document running commands inside a shell with exec module

Hi,

Is there any trick to make work next sentence ?

pdsh -Rexec -w ^hosts.txt "command1 | command2"

Can we use pipe inside the command with exec module, like we do in ssh module ?

I tried some variants (escapping "|", ...), but I didn't get the correct 
formula to do it works

Thank you!

Original issue reported on code.google.com by [email protected] on 14 Sep 2011 at 1:47

Compile of genders.c fails

 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -D_REENTRANT -mt -O2 -Wl,-E -I/usr/local/include -I/usr/include -c genders.c
  -DPIC -o .libs/genders_la-genders.o
"genders.c", line 527: error #2029: expected an expression
                   query ?: "(all)", genders_errormsg(gh));
                          ^

"genders.c", line 527: error #2053: expected a ":"
                   query ?: "(all)", genders_errormsg(gh));
                                                         ^

"genders.c", line 536: error #2029: expected an expression
                   query ?: "(all)", genders_errormsg(gh));
                          ^

"genders.c", line 536: error #2053: expected a ":"
                   query ?: "(all)", genders_errormsg(gh));
                                                         ^

4 errors detected in the compilation of "genders.c".

The compiler used is the HP C/aC++ B3910B A.06.25.02 [Nov 25 2010]

Original issue reported on code.google.com by [email protected] on 20 Apr 2011 at 2:05

Add option for specifying a domain

In my use of pdsh I had to explictly create lists of the form:

AZ-1.DOMAINNAME.COM
AZ-2.DOMAINNAME.COM

in order to use pdsh or I had to use

pdsh -l user -w az1.domainname.com,az-2.domainname.com command

Both forms seem clumsy when a form like:

pdsh -H domainname.com -l user -w az1,az-2 command

would be so much cleaner and faster.

Original issue reported on code.google.com by [email protected] on 25 May 2011 at 11:38

exec module for pdcp

Hello,

I need to use exec module for pdcp (yep, we have some hack using instead usual 
scp). How to add it into pdcp modules?

I'm using exec find with pdsh but now I would love to have parallel copying 
with our hack solution :)

jirib

Original issue reported on code.google.com by [email protected] on 23 Nov 2011 at 10:26

2.26-1 on Fedora 16 netgroups

Whenever I try to use pdsh against a NIS netgroup I get an error saying "no 
remote hosts specified".

[root@host ~]# pdsh -g nisgroup1
pdsh@host: no remote hosts specified

[root@host ~]# pdsh -L
3 modules loaded:

Module: rcmd/exec
Author: Mark Grondona <[email protected]>
Descr:  arbitrary command rcmd connect method
Active: yes

Module: misc/netgroup
Author: Mark Grondona <[email protected]>
Descr:  Target netgroups from pdsh
Active: yes
Options:
-g groupname      target hosts in netgroup "groupname"
-X groupname      exclude hosts in netgroup "groupname"

Module: rcmd/ssh
Author: Jim Garlick <[email protected]>
Descr:  ssh based rcmd connect method
Active: yes

[root@host ~]# yum list installed \*pdsh\*
pdsh.x86_64                2.26-1.fc16
pdsh-mod-netgroup.x86_64   2.26-1.fc16
pdsh-rcmd-ssh.x86_64       2.26-1.fc16

Using "pdsh -w host1,host2,host3" works with no problems.  Not exactly sure if 
this is pdsh, NIS or a combination of the two.

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 1:18

testsuite assumes bash

Many parts of testsuite use bash-isms but reference /bin/sh.
For portability bash specific test code should be removed.

Original issue reported on code.google.com by [email protected] on 3 Apr 2011 at 3:22

pdsh 2.25 doesn't load genders module

I built pdsh with the following:

./configure     --prefix /u06/pdsh-2.25   \
                --without-dshgroups       \
               --without-exec             \
                --without-netgroup        \
                --without-machines        \
                --without-rsh             \
                --with-genders            \
                --with-readline           \
                --with-ssh                \
                CFLAGS="-O2 -Wl,-E -I/usr/local/include -I/usr/include" \
                LDFLAGS="-L/usr/local/lib/hpux32 -L/usr/lib/hpux32"  \
                LIBS="-lcext"

wilma:/home/root/pdsh-2.25# /u06/pdsh-2.25/bin/pdsh -V
pdsh-2.25 (+readline)
rcmd modules: ssh
misc modules: (none)

It finds the ssh module but not the genders module:

wilma:/home/root/pdsh-2.25# ll /u06/pdsh-2.25/lib/pdsh
total 432
-rw-r--r--   1 root       sys          29756 Apr 20 13:16 genders.a
-rwxr-xr-x   1 root       sys            893 Apr 20 13:16 genders.la
-r-xr-xr-x   1 root       sys          76256 Apr 20 13:16 genders.so
-rw-r--r--   1 root       sys          13828 Apr 20 13:16 sshcmd.a
-rwxr-xr-x   1 root       sys            850 Apr 20 13:16 sshcmd.la
-r-xr-xr-x   1 root       sys          72940 Apr 20 13:16 sshcmd.so

Previously when I built with machine and dshgroups it loaded those modules 
without problem, but not genders.  Any ideas?  config.log uploaded.

Original issue reported on code.google.com by [email protected] on 20 Apr 2011 at 6:45

Attachments:

Cannot compile on FreeBSD with genders module

I can compile and run pdsh on FreeBSD but when i try to compile with genders i 
get the following error with configure.

checking for whether to build nodeattr module... yes
checking for nodeattr... /usr/local/bin/nodeattr
checking for whether to build genders module... yes
checking for genders_handle_create in -lgenders... no
configure: Cannot support genders without libgenders

I do have genders installed and nodeattr works without a problem.  I do not 
know where to go from here to troubleshoot the problem.

genders is installed at the following location:
/usr/local/lib/genders/gendlib.pl
/usr/local/lib/genders/hostlist.pl
/usr/local/lib/libgenders.so.2
/usr/local/lib/libgenders.so
/usr/local/lib/libgenders.la
/usr/local/lib/libgenders.a
/usr/local/lib/libgendersplusplus.so.1
/usr/local/lib/libgendersplusplus.so
/usr/local/lib/libgendersplusplus.la
/usr/local/lib/libgendersplusplus.a
/usr/local/include/genders.h
/usr/local/include/gendersplusplus.hpp
/usr/local/bin/nodeattr

Thanks
Sean


Original issue reported on code.google.com by [email protected] on 18 May 2011 at 1:28

testsuite has many failures when run as root

See the description of many testsuite failures in Issue 12.
Running as root disables PDSH_MODULE_DIR use, which is required
for some of the module loading tests and most of the pdcp tests.
Also, if some portion of the build directory is owned by a different
user, pdsh will fail to load *any* modules due to paranoia about the
security of the path.

Though it isn't strictly necessary for the testsuite to run as root,
the tests that are failing now should instead be gracefully skipped
so as not to appear that the tests are mysteriously failing.

Original issue reported on code.google.com by [email protected] on 8 Mar 2011 at 2:47

pdsh-2.24 fails unit tests on Mac OS X 10.6 x86_64

Hello Mark!  I tried to update the Fink pdsh package, and while the build 
seemed to run OK, I saw a few failures from the test suite:

--- begin paste ---
...
make  check-TESTS
not ok - 1 working success
#   /bin/true
ok 2 - test runs if prerequisite is satisfied
ok 3 - tests clean up after themselves
ok 4 - tests clean up even after a failure
ok 5 - failure to clean up causes the test to fail
ok 6 - pdsh runs
ok 7 - pdsh -V works
ok 8 - pdsh -L works
ok 9 - pdsh -h works
ok 10 - rcmd/exec module is built
ok 11 - pdsh -N option works
ok 12 # skip -u option is functional (missing LONGTESTS)
ok 13 - -f sets fanout
ok 14 - -l sets remote username
ok 15 - -t sets connect timeout
ok 16 - -u sets command timeout
ok 17 - command timeout 0 by default
ok 18 - -b enables batch mode
ok 19 - pdsh -N option works
# failed 1 among 19 test(s)
1..19
FAIL: ./t0001-basic.sh
ok 1 - working xstrerrorcat
ok 2 - working pipecmd
# passed all 2 test(s)
1..2
PASS: ./t0002-internal.sh
ok 1 - hostname range expansion works
ok 2 - host range expansion does not strip leading zeros
ok 3 - host range expansion handles mixed size suffixes
ok 4 - host range expansion works with "," embedded in range
ok 5 - host range expansion works with 2 sets of brackets
ok 6 - pdsh -x option works
ok 7 - pdsh -x option works with ranges
ok 8 - pdsh -x option works with ranges (gnats:118)
ok 9 - pdsh -x option works with non-numeric suffix (gnats:120)
ok 10 - pdsh -w- reads from stdin
ok 11 - pdsh -w- can be used with other -w args
ok 12 - WCOLL environment variable works
ok 13 - ranges can be embedded in wcoll files
ok 14 - ^file works
ok 15 - -x ^file works
ok 16 - ^file works with other args
ok 17 - Multiple ^file args
ok 18 - Multiple -w^file
ok 19 - -^file excludes hosts in file
ok 20 - ^file errors out if file doesnt exist
ok 21 - host exclusion with "-" works
ok 22 - regex filtering works
ok 23 - regex exclusion works
ok 24 - regex exclusion works from -x
ok 25 - multiple -w options
# passed all 25 test(s)
1..25
PASS: ./t0003-wcoll.sh
ok 1 - PDSH_MODULE_DIR functionality
ok 2 - module A takes precedence over B
ok 3 - pdsh -M B ativates module B
ok 4 - PDSH_MISC_MODULES option works
ok 5 - -M option overrides PDSH_MISC_MODULES environment var
ok 6 - pdsh help string correctly displays options of loaded modules
ok 7 - Loading conflicting module with -M causes error
ok 8 - Conflicting modules dont run init()
ok 9 - Force loaded module runs init()
ok 10 - New conflicting module does not run init() with -M
# passed all 10 test(s)
1..10
PASS: ./t0004-module-loading.sh
ok 1 - pdsh -l sets username for all hosts
ok 2 - Can set remote username via user@hosts
ok 3 - user@hosts works for a subset of hosts
ok 4 - Can set rcmd_type via rcmd_type:hosts
ok 5 - Can set rcmd_type and user via rcmd_type:user@hosts
# passed all 5 test(s)
1..5
PASS: ./t0005-rcmd_type-and-user.sh
ok 1 - Creating pdcp link to pdsh binary
ok 2 - Creating rpdcp link to pdsh binary
ok 3 - pdcp runs
ok 4 - rpdcp runs
ok 5 - pdcp -V works
ok 6 - pdcp -q works
ok 7 - -e sets remote program path
ok 8 - PDSH_REMOTE_PDCP_PATH sets remote program path
ok 9 - -f sets fanout
ok 10 - -l sets remote username
ok 11 - -t sets connect timeout
ok 12 - -u sets command timeout
ok 13 - command timeout 0 by default
ok 14 - Have pcptest rcmd module
ok 15 - pdcp basic functionality
ok 16 - rpdcp basic functionality
ok 17 - initialize directory tree
ok 18 - pdcp -r works
ok 19 - rpdcp -r works
# passed all 19 test(s)
1..19
PASS: ./t0006-pdcp.sh
ok 1 - dshbak functionality
ok 2 - dshbak -c does not coalesce different length output
ok 3 - dshbak -c properly compresses multi-digit suffixes
ok 4 - dshbak -c properly compresses prefix with embedded numerals
ok 5 - dshbak -c does not strip leading zeros
ok 6 - dshbak -c does not coalesce different zero padding
ok 7 - dshbak -c properly coalesces zero padding of "00"
ok 8 - dshbak -c can detect suffixes
not ok 9 - dshbak -c can detect suffix with numeral # TODO known breakage
ok 10 - dshbak -d functionality
ok 11 - dshbak -f functionality
ok 12 - dshbak -f without -d fails
ok 13 - dshbak -d fails when output dir does not exist
not ok - 14 dshbak -d fails gracefully for non-writable dir
#   
#     mkdir test_output &&
#     chmod 500 test_output &&
#     echo -e "foo0: bar" | dshbak -d test_output 2>&1 | tee logfile | \
#        grep "Failed to open output file"  &&
#     rm -rf test_output logfile
#   
# still have 1 known breakage(s)
# failed 1 among remaining 13 test(s)
1..14
FAIL: ./t1000-dshbak.sh
# passed all 0 test(s)
1..0 # SKIP skipping genders tests, genders module not available
PASS: ./t1001-genders.sh
ok 1 - dshgroup options are active
ok 2 - dshgroup -g option works
ok 3 - dshgroup -g option works with more than one group
ok 4 - dshgroup -X option works
ok 5 - dshgroup -X option works with -w
# passed all 5 test(s)
1..5
PASS: ./t1002-dshgroup.sh
# passed all 0 test(s)
1..0 # SKIP skipping slurm tests, slurm module not available
PASS: ./t1003-slurm.sh
====================
2 of 10 tests failed
====================
...
--- end paste ---

What additional information can I provide that may be of help?

thanks,  
-Steve

Original issue reported on code.google.com by [email protected] on 2 Mar 2011 at 1:50

dshbak no longer indents output for collapsed host output groups

``dshbak`` has changed behvaior, after recent refactor.
It used to be each collapsed batch was indented by one
column, which helped looking at the output.

Old behavior may have been easier for sending output in
emails to others, etc (always thought it could use a
blank line too).  Could post-process this myself but
old behavior differed so thought I would mention it.
Don't know if this was intentional or not, perhaps not
a bug.

My perl is really bad/old/useless or I would offer a
patch, sorry.  But just thought I would mention this as
enhancement so it did not get lost.

Thanks.

Original issue reported on code.google.com by [email protected] on 2 May 2011 at 10:34

Support user defined variables in pdsh

Hi!

It would be nice having user defined variables per host in pdsh.

This could be the first "execute different command by host (I see a wishlist 
bug here talking about)" implementation:

Like %h is hostname.

We could define:

$ cat ~/.pdsh/vars/host01:
ports="8080 8081"
$ cat ~/.pdsh/vars/host02:
ports="8080"

Then:

pdsh -w ^filewithhosts "
for port in %ports
do
   wget -O - --user user --password pass localhost:\$port/manager/list
done
"

Do you think it could be possible in the future ?

Thank you developping this awesome tool !

Original issue reported on code.google.com by [email protected] on 9 Sep 2011 at 6:32

option to remove .hostname when doing a rpdcp

I was wondering if there was anyway to get an option so when doing a rpdcp it 
does not tag on .hostname to the end of the file.

In my case i have 300 servers with files named hostname.html that i retrieve.  
i remove the .hostname from the file after it is downloaded, but it would be 
great if there was an option to just not have it on there to begin with (i do 
understand the problems if it tries to grab two files with the same name).

thanks,

Sean

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 8:47

Compile of mod.c fails with --enable-static-modules

Monday morning and we're back at it. :-)

cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../..  -D_REENTRANT -mt  -O2 -Wl,-E 
-I/usr/local/include -I/usr/include -c dsh.c
"dsh.c", line 325: warning #2111-D: statement is unreachable
      return NULL;
      ^

source='mod.c' object='mod.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../config/depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../..  -D_REENTRANT -mt  -O2 -Wl,-E 
-I/usr/local/include -I/usr/include -c mod.c
"mod.c", line 342: warning #2223-D: function "_mod_initialize" declared 
implicitly
      if (mod != NULL && _mod_initialize (mod) < 0)
                         ^

"mod.c", line 380: error #2020: identifier "_mod_init_list_safe" is undefined
      list_for_each (module_list, (ListForF) _mod_init_list_safe, NULL);
                                             ^

"mod.c", line 757: warning #2177-D: function "_mod_init_list_safe" was declared 
but never referenced
  static int _mod_init_list_safe (mod_t mod, void *arg)
             ^

1 error detected in the compilation of "mod.c".

Compiled with the following:
./configure     --prefix=/u06/pdsh       \
                --enable-static-modules  \
                --without-dshgroups      \
                --without-exec           \                 
                --without-netgroup       \
                --without-machines       \
                --without-rsh            \
                --with-genders           \
                --with-readline          \
                --with-ssh               \
                CFLAGS="-O2 -Wl,-E -I/usr/local/include -I/usr/include" \
                LDFLAGS="-L/usr/local/lib/hpux32 -L/usr/lib/hpux32"  \
                LIBS="-lcext"


Original issue reported on code.google.com by [email protected] on 25 Apr 2011 at 2:24

dshbak breaking up node list

I just noticed after upgrading to 2.26 that my node list in dshbak is broken up 
between 9 and 10, and 99-100:

----------------
n[01-09,10-23]
----------------

or

----------------
n[001-099,100-119]
----------------

While this isn't a huge deal, it's a little confusing and makes it more 
difficult to easily spot issues.  Is it possible this is a bug and could be 
fixed?

Thanks, Justin.


Original issue reported on code.google.com by [email protected] on 26 Jul 2011 at 4:19

Missing ChangeLog when compiling with bundled spec file

When recompiling pdsh from the tarball with
   rpmbuild -ta  --with genders --with nodeattr pdsh-2.27.tar.bz2
the packaging dies while processing files with the following error:

+ cp -pr COPYING README ChangeLog NEWS DISCLAIMER 
/var/tmp/pdsh-2.27-1-root-root/usr/share/doc/pdsh-2.27
cp: cannot stat `ChangeLog': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.87249 (%doc)

A quick check in the spec file show around line 363
%files
%defattr(-,root,root)
%doc COPYING README ChangeLog NEWS DISCLAIMER 
%doc README.KRB4 README.modules README.QsNet
%{_bindir}/pdsh

But the ChangeLog file is missing. There are 2 solution: 1) bundle the 
ChangeLog file in the tarball or 2) remove the ChangeLog file from the %doc 
entry.

Unluck redhat doesn't ship a precompiled rpm for this great program so it is 
better if the spec file is in order i think :)

Thank you very much

Original issue reported on code.google.com by [email protected] on 6 Feb 2012 at 2:15

node list from dshbak broken with 2.25

Since upgrading to 2.25, when I use dshbak to get lists of nodes, I can't 
simply copy/paste the list as it doesn't have any commas in it:

[root@a4bu-m1 updates]# pdsh -a "rpm -qa|grep dhcp-|sort" |dshbak -c
----------------
a4bu-a[001-002]a4bu-d[001-002]a4bu-io[01-02]a4bu-l[4-5]a4bu-n[301-308]n[001-078]
----------------

Thanks.

Original issue reported on code.google.com by [email protected] on 19 Apr 2011 at 9:12

PDSH_SSH_ARGS_APPEND doesn't work

Since the arguments in PDSH_SSH_ARGS_APPEND are appended after
the default args of:

 "-2 -a -x -l%u %h"

the new args come after the hostname and mess up the ssh command,
thus rendering this env var useless. The arguments need to be appended
after the last real ssh option, not the hostname, which is compulsory
and probably should not be optional anyway.

Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 3:11

[patch] usernames truncated at arbitrary limit of 17 in dsh.c

We were getting failed logins and wondering what was
happening::

    $ strace -qfs 30 -e execve \
      pdsh -w hmaster01 -l abcdefghijklmnopqrstuvwxyz true 2>&1 |
      grep `type -p ssh` | grep -v xyz | fmt

    execve("/usr/bin/ssh", ["ssh", "-oConnectTimeout=10",
    "-2", "-a", "-x", "-labcdefghijklmnop", "hmaster01", "true"],
    [/* 75 vars */]) = 0

note the truncated argument to '-l'.

set a break in pipecmd.c and noticed this was being
passed in truncated all the way from _rsh_thread()
args, as instantiated in the opt->ruser arg to
_thd_init() we get the opt_t struct in opt.h::

    #define MAX_USERNAME 17
    ...
    char ruser[MAX_USERNAME]; /* remote username (-l or default) */

seems arbitrary to limit it like that, granted our
usernames are long but this is not the first site
encountered with longer names.

Looked around on how this was properly defined and
ended up with following patch against r1322.

Please apply, thanks.

-- 
Scott

Original issue reported on code.google.com by [email protected] on 27 Apr 2011 at 12:44

Attachments:

PDSH is truncating very long lines


I have very long lines of xml strings that I would like to capture with pdsh 
from multiple hosts. pdsh seems to trim from the head of each line. 

Here is how I can show the issue without cluttering the message. When I run wc 
on remote server, I get 93K chars:

$ pdsh -N -w ssh:server-1 "grep b429d9114463de0b721e4760995665a6 
/var/log/server.log* | grep VISUAL | grep cmd | wc "
      4      52   93311

When I run wc on my localhost, I see only 30K chars:

$ pdsh -N -w ssh:server-1 "grep b429d9114463de0b721e4760995665a6 
/var/log/videoid/server.log* | grep VISUAL | grep cmd " | wc 
      3       4   30956

Original issue reported on code.google.com by [email protected] on 3 Sep 2011 at 12:23

dshgroup module include statements

Is there any way to have an include statement in a the dsh module group file so 
updating a machine in one file will effect the rest, like:

GROUP1
servera
serverb

GROUP2
clienta
clientb

GROUP.ALL
{include GROUP1}
{include GROUP2}

We have multiple locations and this would be an excellent feature.  I would be 
willing to test any code on RHEL5 or HP-UX 11.23/11.31 or freeBSD.

Thanks,

Sean

Original issue reported on code.google.com by [email protected] on 14 Apr 2011 at 4:19

Unsatisfied code symbol 'rcmd_opt_set' on HP-UX 11.23

I built pdsh-2.25 on HP-UX 11i v2 using the HP C/aC++ compiler.  But when I 
attempt to execute pdsh the following occurs:

/u06/pdsh-2.25/bin/pdsh  date
/usr/lib/hpux32/dld.so: Unsatisfied code symbol 'rcmd_opt_set' in load module 
'/u06/pdsh-2.25/lib/pdsh/sshcmd.so'.
Killed

wilma:/home/root/pdsh-2.25# /u06/pdsh-2.25/bin/pdsh  -V
pdsh-2.25 (+readline)
rcmd modules: ssh
misc modules: machines,dshgroup

This is what I used:

./configure   --prefix /u06/pdsh-2.25 \
              --with-dshgroups \
              --with-readline  \
              --with-machines  \
              --with-ssh       \
              --without-rsh    \
              --without-exec   \
              CFLAGS="-O -I/usr/local/include -I/usr/include"  \
              LDFLAGS="-L/usr/local/lib/hpux32 -L/usr/lib/hpux32" \
              LIBS="-lcext"

Any clues, hints, incantations appreciated.  config.log attached.

Original issue reported on code.google.com by [email protected] on 19 Apr 2011 at 1:16

Attachments:

Add torque module



Hi!
Since we're still using Torque as resource manager on the compute clusters at 
our site, I created a torque-module (similar to the slurm-module; in fact, I 
modified the slurm-module to instead talk to torque/pbs-server).
Is it something that you would be interested in including in pdsh?
The module is not thoroughly tested yet, but afaik it works at my place. 
Autotools and spec-stuff also seems to work (on CentOS5).

/Mattias

Original issue reported on code.google.com by [email protected] on 10 Sep 2010 at 4:32

not user install

Hello,
I have to install pdsh in a cluster, where I not have root permission, with a 
particular user (userfoo).
But the application has to be used  by all other user (myuser).
It is possible to install pdsh with these conditions?
I configure with --with-ssh --prefix=/opt/appli/pdsh/2.22 

When I type pdsh, I get: 
userfoo> module path "/opt/appli/pdsh/2.22/lib/pdsh" insicure
userfoo> "/opt/appli": World writable and sticky bit is not set
userfoo> Couldn't load any pdsh module

or
myuser>  module path "/opt/appli/pdsh/2.22/lib/pdsh" insicure
myuser>  module path "/opt/appli/pdsh/2.22/lib/pdsh": Owner not root, current 
uid, or pdsh executable owner
userfoo> Couldn't load any pdsh module


Original issue reported on code.google.com by [email protected] on 5 Apr 2011 at 10:23

when configured with custom dshgroups path - still uses hardcoded

Configure line:

./configure --prefix=/hpc/local --without-rsh --with-ssh --without-readline 
--with-machines=/hpc/local/etc/pdsh.machines --with-dshgroups=/hpc/local/etc 
--with-nodeupdown --with-rcmd-rank-list=ssh


Run line:

$pdsh -g pdsh.vm uptime
pdsh@boo15: unable to read group file from /home/miked/.dsh/group/pdsh.vm or 
/etc/dsh/group/pdsh.vm
pdsh@boo15: no remote hosts specified
$

Original issue reported on code.google.com by [email protected] on 9 Aug 2011 at 9:08

interactive mode w/ssh no longer works

I just built and installed 2.25 today, with genders and rcmd-ssh.  Since the 
install, I can no longer use pdsh in interactive mode:

[root@a4au-m1 tmp]# pdsh -w n002
pdsh> hostname
n002: Pseudo-terminal will not be allocated because stdin is not a terminal.

The "normal" way still works:

[root@a4au-m1 tmp]# pdsh -w n002 hostname -s
n002: a4au-n002

If I add "-v" to PDSH_SSH_ARGS_APPEND I can see that auth succeeds and it 
accepts my publickey, but then hangs - following is the last few lines I see:

n002: debug1: Authentication succeeded (publickey).
n002: debug2: fd 4 setting O_NONBLOCK
n002: debug2: fd 6 setting O_NONBLOCK
n002: debug1: channel 0: new [client-session]
n002: debug2: channel 0: send open
n002: debug1: Entering interactive session.
n002: debug2: callback start
n002: debug2: client_session2_setup: id 0
n002: debug2: channel 0: request shell confirm 0
n002: debug2: callback done
n002: debug2: channel 0: open confirm rwindow 0 rmax 32768
n002: debug2: channel 0: rcvd adjust 2097152

Original issue reported on code.google.com by [email protected] on 31 Mar 2011 at 10:07

Username not changing in pdsh

Hi,

I'm using pdsh-2.26 but i am not able to change the remote username ( its 
always seem to use pdsh as username )


Blessed!![deepakka@seenmade:pdsh-2.26]$  pdsh -w 
ssh:deepakka@fatsi[01-02].ypost.sp1 "uname"

fatsi01: Permission denied, please try again.
fatsi02: Permission denied, please try again.
fatsi01: Permission denied, please try again.
fatsi02: Permission denied, please try again.
fatsi01: Permission denied (publickey,gssapi-with-mic,password).
pdsh@seenmade: fatsi01: ssh exited with exit code 255
fatsi02: Permission denied (publickey,gssapi-with-mic,password).
pdsh@seenmade: fatsi02: ssh exited with exit code 255

Blessed!![deepakka@seenmade:pdsh-2.26]$  pdsh -l deepakka -w 
ssh:fatsi[01-02].ypost.sp1 "uname"

fatsi02: Permission denied, please try again.
fatsi01: Permission denied, please try again.
fatsi02: Permission denied, please try again.
fatsi01: Permission denied, please try again.
fatsi02: Permission denied (publickey,gssapi-with-mic,password).
pdsh@seenmade: fatsi02: ssh exited with exit code 255
fatsi01: Permission denied (publickey,gssapi-with-mic,password).
pdsh@seenmade: fatsi01: ssh exited with exit code 255


What am i missing ?



#make check
:
:
# still have 1 known breakage(s)
# passed all remaining 14 test(s)
1..15
pdsh test suite complete.
116/121 tests passed.
2 broken tests failed as expected.
1 broken test now fixed.
1 test failed.
1 test skipped.
FAIL: runtests.sh
===================
1 of 1 tests failed
===================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/homes/deepakka/pdsh-2.26/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/homes/deepakka/pdsh-2.26/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/homes/deepakka/pdsh-2.26/tests'
make: *** [check-recursive] Error 1

Original issue reported on code.google.com by [email protected] on 4 Jun 2011 at 9:44

Do not pass -l%u to ssh in sshcmd.c if not explicitly defined

Currently pdsh's sshcmd.c module always passes the -l option to the ssh 
commands, even if the user did not defined it. In ordinary test cases it won't 
cause a problem, but if the user uses .ssh/config with User option specified, 
the option in the config file will be omitted. 

The purpose of -l option in ssh command line is to override the local or 
configured value for username to send. That is why it is a bad idea to always 
explicitly call the ssh commands with -l option. However it is a nice thing to 
implement the -l override mechanism in pdsh, let the ssh command and it's 
internal mechanism to decide what username to send, because that's what the 
user expects. 

Mark is currently fixing the usage PDSH_SSH_ARGS environment variable which 
supplies a workaround for the problem described above, but in my point of view 
this should be the default behaviour.

The conversation led to this request can be found in Issue 39.

V. Kandasamy

Original issue reported on code.google.com by [email protected] on 4 Oct 2011 at 4:47

"Artifial issue": pshbak -c collects hostnames wrong-ish for some cases

I stumbled across the following issue

echo -e 'n01:\nn2:' | dshbak -c

It get collected as 
n[01-2]
which then would get expanded to
n01,n02
by pdsh.

I'm really not much of a perl hacker, so I don't present any patch for it 
though. ;)

/Mattias

Original issue reported on code.google.com by don.fanucci on 24 Sep 2010 at 8:55

Testsuite failures on AIX

On an AIX 5.2 system the testsuite fails in many ways.

The problems seem to stem from:
 - Assumption of GNU diff(1)
 - Assumption of GNU cp(1)
 - Assumption of GNU make(1)
 - /bin/sh on AIX doesn't seem to support some of the core
   requirements of test-lib.sh (trap 'die' EXIT, for example
   seems to always cause the test to exit 0)


Original issue reported on code.google.com by [email protected] on 30 Apr 2011 at 2:19

dshbak no longer shows commas for collapsed hosts with same output if hostnames are dissimilar

``dshbak`` broke a bit somewhere between 2.11 and r1325,

same output for multiple hosts gets correctly collapsed
into ranges, but hostnames that don't fit in the ranges
just get mashed together::

    host1other4foo[8-20]

where it used to be::

    host1,other2,foo[8-20]

tried to understand the perl and got scared, but closed my
eyes and made the attached patch.

Please apply, thanks.

P.S. output used to be indented but it's not anymore, not
     sure that matters? cannot decide which looks better.

-- 
Scott

Original issue reported on code.google.com by [email protected] on 28 Apr 2011 at 10:19

  • Merged into: #19

Attachments:

List conflicting modules in -V and -L output

Currently pdsh loads all modules found in pkglibdir,
but unloads modules that fail to initialize, typically
due to conflicting module options. Therefore, present
but conflicting modules do not appear in the output of
-L and -V.

At least one user has noted that it will be less confusing to
list conflicting modules in -L and -V, but somehow denote the
inactive modules.

Original issue reported on code.google.com by [email protected] on 13 Sep 2010 at 9:18

pdsh 2.24 - pdcp executes file instead of copying

Perhaps i am doing something wrong but my 2.23 version works fine.  When i 
compile pdsh and execute a pdcp it executes the file instead of copying it.  It 
looks as though bash is attempting to execute it.  This is on RHEL 5.5 64bit.

Compile options:

./configure --with-dshgroups --with-readline --with-machines --with-ssh

[root@galaxy bin]# pdcp -w galaxy /tmp/me /var/tmp/me
galaxy: bash: /tmp/me: Permission denied
pdcp@galaxy: galaxy: ssh exited with exit code 126
[root@galaxy bin]#

Thanks,

Sean


Original issue reported on code.google.com by [email protected] on 4 Mar 2011 at 8:01

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.