Export to GitHub

pdsh - issue #19

node list from dshbak broken with 2.25


Posted on Apr 19, 2011 by Happy Camel

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.

Comment #1

Posted on Apr 19, 2011 by Happy Ox

Can you paste output without |dshbak -c? e.g.:

pdsh -a "rpm -qa|grep dhcp-|sort"

You can just attach the output if you'd like.

Then I can use those lines to create a reproducer. Thanks for finding this bug. mark

Comment #2

Posted on Apr 19, 2011 by Happy Camel

[root@a4bu-m1 updates]# pdsh -a "rpm -qa|grep ^dhcp-3|sort" a4bu-n303: dhcp-3.0.5-23.el5_6.4 a4bu-n307: dhcp-3.0.5-23.el5_6.4 a4bu-d001: dhcp-3.0.5-23.el5_6.4 a4bu-n301: dhcp-3.0.5-23.el5_6.4 a4bu-n306: dhcp-3.0.5-23.el5_6.4 a4bu-d002: dhcp-3.0.5-23.el5_6.4 a4bu-n308: dhcp-3.0.5-23.el5_6.4 a4bu-n305: dhcp-3.0.5-23.el5_6.4 a4bu-n304: dhcp-3.0.5-23.el5_6.4 n003: dhcp-3.0.5-23.el5_6.4 a4bu-a002: dhcp-3.0.5-23.el5_6.4 a4bu-a001: dhcp-3.0.5-23.el5_6.4 a4bu-n302: dhcp-3.0.5-23.el5_6.4 n016: dhcp-3.0.5-23.el5_6.4 n006: dhcp-3.0.5-23.el5_6.4 a4bu-io02: dhcp-3.0.5-23.el5_6.4 n008: dhcp-3.0.5-23.el5_6.4 n007: dhcp-3.0.5-23.el5_6.4 n012: dhcp-3.0.5-23.el5_6.4 a4bu-io01: dhcp-3.0.5-23.el5_6.4 n005: dhcp-3.0.5-23.el5_6.4 n013: dhcp-3.0.5-23.el5_6.4 n009: dhcp-3.0.5-23.el5_6.4 n010: dhcp-3.0.5-23.el5_6.4 n004: dhcp-3.0.5-23.el5_6.4 n014: dhcp-3.0.5-23.el5_6.4 n002: dhcp-3.0.5-23.el5_6.4 n015: dhcp-3.0.5-23.el5_6.4 ...

Comment #3

Posted on Apr 19, 2011 by Happy Ox

ok, thanks, this was a very silly mistake added during the refactor of dshbak code in r1289. I'm going to add a test and then the fix shortly. Thanks for reporting it, it is sad that the existing tests missed it, but they all tested corner cases not involving multiple host prefixes.

Comment #4

Posted on Apr 19, 2011 by Happy Ox

This issue was closed by revision r1319.

Comment #5

Posted on Apr 19, 2011 by Happy Ox

This issue was updated by revision r1318.

Comment #6

Posted on Apr 19, 2011 by Happy Ox

You might want to checkout the latest pdsh trunk and verify that scripts/dshbak now works for your case. The fix will be in the next (imminent) release of pdsh.

Thanks again for catching this bug.

mark

Comment #7

Posted on Apr 28, 2011 by Happy Ox

Issue 27 has been merged into this issue.

Comment #8

Posted on Apr 28, 2011 by Happy Ox

This issue was updated by revision r1335.

Better fix for print_header() from Scott M. McDermott via Issue 27.

Status: Fixed

Labels:
Type-Defect Priority-High