[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freeipmi-devel] minor bug/inconsistencies in bmc-config output
From: |
Albert Chu |
Subject: |
Re: [Freeipmi-devel] minor bug/inconsistencies in bmc-config output |
Date: |
Tue, 22 Jan 2013 10:11:12 -0800 |
Hey Dan,
On Mon, 2013-01-21 at 12:59 -0800, dan farmer wrote:
> First, thanks for the tool, I'd been doing individual grabs of config
> values before, bleah!
>
>
> Secondly, bmc-config returns 1 even if it succeeds pulling
> configuration details (my sys-details at the bottom.) I suppose it's
> possible that it returns non-zero when it gets an "Unable to checkout"
> on a field, but that isn't even listed in the non -v output and is a
> fraction of the output. I hope this is a bug, or there is an
> alternate way to get an exit code, or else it makes running the tool
> in an automated fashion really sucky (how can you know what worked?)
I'll go back and look at this code some more. The exit code is
generally considered to be non-zero if there is any checkout failure
(fatal or non-fatal). However, that should probably be tweaked, b/c of
how bmc-config has grown, it's probably impossible for all config
checkouts to always succeed on any hardware out there. The exit codes
should atleast be different (maybe 1 on fatal error, 2 on non-fatal
error).
> Thirdly, a small bug, or at least a consistency issue, with the
> --filename output, which ignores the --always-prefix argument (the
> first command prepends the host, the 2nd doesn't); the manpage says
> under --always-prefix that the tool will "always prefix output" - is
> this a problem with my system (details below), the tool, the man page,
> or my understanding, or some combo of the same? :)
This is probably a documentation mistake. B/c the output of bmc-config
is supposed to be fed back into bmc-config, it's one of the FreeIPMI
tools that shouldn't support the always-prefix option. I'll have to
look into this more closely.
But thanks for the bug report. Somewhere along the line --filename
stopped working w/ --checkout. So I need to fix that in the upstream
version (it's funny that no one noticed until now. Most probably pipe
--checkout stdout to a file).
Al
> (Three runs of bmc-config, the first to show a valid exit code, then
> the two with --filename and simple file redirect, then a diff to show
> the lack of prefix)
>
>
> # bmc-config --version
> bmc-config - 0.7.16
> Copyright (C) 2003-2008 FreeIPMI Core Team
> This program is free software; you may redistribute it under the terms
> of
> the GNU General Public License. This program has absolutely no
> warranty.
> address@hidden zen]# echo $?
> 0
>
>
> # bmc-config --checkout --always-prefix > foo1
>
>
> # echo $?
> 1
>
>
> # bmc-config --checkout --always-prefix --filename foo2
>
>
> # echo $?
> 1
>
>
>
>
> # diff foo1 foo2
> 1,476c1,476
> < localhost: #
> < localhost: # Section UserX Comments
> < localhost: #
> < localhost: # In the following User sections, users should
> configure usernames, passwords,
> [...]
>
>
> System details it was tested on:
>
>
> # bmc-config -V
> bmc-config - 0.7.16
> Copyright (C) 2003-2008 FreeIPMI Core Team
> This program is free software; you may redistribute it under
> the terms of
> the GNU General Public License. This program has absolutely
> no warranty.
>
>
> # uname -a
> Linux blackhol3 3.5.4-3.el6xen.x86_64 #1 SMP Sat Sep 29
> 15:16:26 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
>
>
> # cat /etc/redhat-release
> CentOS release 6.3 (Final)
>
>
> # bash --version
> GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
>
>
> This is free software; you are free to change and redistribute
> it.
> There is NO WARRANTY, to the extent permitted by law.
>
>
> Happy to answer any q's, etc., and thanks again.
>
>
> dan
>
> ^..^
>
>
>
>
>
>
>
> _______________________________________________
> Freeipmi-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/freeipmi-devel
--
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory