wsmancli and returning exit zero

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

wsmancli and returning exit zero

Kent Baxley
Hi list,

I was wondering if there was a reason behind wsmancli exiting with a
zero even though we do things such as fail to connect.  The version we
are based off of is 2.3.0.

For example:

# wsman enumerate
http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData
-h 10.0.0.30 -P 16992 -u admin -p passw0rd1
Connection failed. response code = 0
Couldn't connect to server

# echo $?
0

What I'm trying to do is bash script some wsman commands that will set
up the KVM/VNC capabilities on a few Intel NUCs with AMT support.
There have been occasions where, due to possible flakiness on the AMT,
I can't successfully connect the first time to the AMT.  In most
cases, if I re-run the command by hand, I can connect and get the
wsman command to work.  However, since, wsman returns zero after a
failed connection my script will just move on to the next command
which leaves me with a half-configured AMT or one that doesn't get
configured at all.  I've really got no way to bail out if something
goes wrong.

If it is 'correct' for wsman to return zero in a case like this, has
anyone scripted wsman before so that it will know to bail out or
re-try if a connection fails?

Thanks!




--
Kent Baxley
Field Engineer, Canonical
[hidden email]

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: wsmancli and returning exit zero

Klaus Kaempf
* Kent Baxley <[hidden email]> [Jan 30. 2014 15:25]:
> Hi list,
>
> I was wondering if there was a reason behind wsmancli exiting with a
> zero even though we do things such as fail to connect.  The version we
> are based off of is 2.3.0.

It's a bug.

Can you add a respective issue report to https://github.com/Openwsman/wsmancli/issues
please ?

Thanks,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: wsmancli and returning exit zero

Kent Baxley
On Thu, Jan 30, 2014 at 2:39 PM, Klaus Kaempf <[hidden email]> wrote:

> * Kent Baxley <[hidden email]> [Jan 30. 2014 15:25]:
>> Hi list,
>>
>> I was wondering if there was a reason behind wsmancli exiting with a
>> zero even though we do things such as fail to connect.  The version we
>> are based off of is 2.3.0.
>
> It's a bug.
>
> Can you add a respective issue report to https://github.com/Openwsman/wsmancli/issues
> please ?
>
> Thanks,
>
> Klaus

Done:

https://github.com/Openwsman/wsmancli/issues/2

Thanks!


> --
> SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
> Maxfeldstraße 5, 90409 Nürnberg, Germany



--
Kent Baxley
Field Engineer, Canonical
[hidden email]

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel