AdityaSarang / pdsh

Automatically exported from code.google.com/p/pdsh
GNU General Public License v2.0
0 stars 0 forks source link

dshbak no longer indents output for collapsed host output groups #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
``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 scott@omnisys.com on 2 May 2011 at 10:34

GoogleCodeExporter commented 8 years ago
meant to enter as enhancement but can't seem to change it.

Original comment by scott@omnisys.com on 2 May 2011 at 10:34

GoogleCodeExporter commented 8 years ago
This was not intentional, but also I'm not exactly sure what the
change in behavior was from your description (sorry). I don't remember
any indentation from recent dshbak, but I'll go back and try a version
from before the refactor.

Would you mind pasting some output from the two versions (include the version
of pdsh from each output). That will help a lot.

Thanks, and sorry. It is toward the end of the day on a Monday ;-)
mark

Original comment by mark.gro...@gmail.com on 2 May 2011 at 10:55

GoogleCodeExporter commented 8 years ago
The output lines were indented by one column:

    ----------------
    mpws[108-208]
    ----------------
     pdsh-2.23-1.el6.x86_64
    ----------------
    mpws[209-308]
    ----------------
     pdsh-2.25-1.el6.x86_64

is now:

    ----------------
    mpws[108-208]
    ----------------
    pdsh-2.23-1.el6.x86_64
    ----------------
    mpws[209-308]
    ----------------
    pdsh-2.25-1.el6.x86_64

which seems less readable.  Old version was that from
2.11, new was with trunk.

Controllable indent with a new dshbak option might be a
good solution.  Maybe I will give it a whirl; in the
meantime current behavior is fine.  I only meant it as
enhancement, not bug.

Original comment by scott@omnisys.com on 2 May 2011 at 11:32

GoogleCodeExporter commented 8 years ago
Hm, I guess the change was intentional 
(see r1158) This change went into pdsh-2.16 (2008-03-19)
and I guess the extra space (which is actually added
by pdsh in output "host: <output>"), was reported as a bug.

I would be happy to work on or take a dshbak option to prefix output
with a configurable string.

Original comment by mark.gro...@gmail.com on 2 May 2011 at 11:43

GoogleCodeExporter commented 8 years ago
The new format is probably better because it's easier
to parse and/or filter for additional processing.

Not a big deal... just kind of curious, erroneously
thought it was part of the dshbak refactoring.  I will
maybe give a try sometime if it really bothers me...
you can close the ticket if you like and if I ever get
around to it I'll just send a patch in.

Thanks!

Original comment by scott@omnisys.com on 3 May 2011 at 12:08

GoogleCodeExporter commented 8 years ago
Yeah, I think the idea was that the output in dshbak should be the output that
actually came from the node(s). (Not the output plus leading whitespace)

If you really need an option to prefix output with something, then we can open
another issue. (it actually should be fairly easy, a couple lines of perl),
but if you don't really _need_ it, I'd rather leave dshbak as is. :-)

Original comment by mark.gro...@gmail.com on 3 May 2011 at 8:13