Start a Conversation

Unsolved

This post is more than 5 years old

GU

29786

March 1st, 2012 10:00

RACADM - Return Code is 0 when command FAILS due to remote racadm being disabled

I have a few scripts that perform various racadm commands against a list of DRACs and log success/faulure of each command on each DRAC based on the return code of each command that is run.

I recently used this script to create a new user on a large number of DRACs.  My log reported the user was suuccessfully created on all of them (based on return code = 0 for all of them.)  But I later noticed a few DRACs that did not have the new user configured on them.  I ran the racadm command against one of them and got "ERROR: The Remote RACADM interface is disabled."  and got a return code of 0.

Why does racadm providing a return code of 0 for this particular error?

March 7th, 2012 11:00

Hi gnelson,

I just tried recreating the steps and got a return code of “1”. A couple of questions to ask:

  1. What version of racadm is used?  You can get this by running racadm without arguments and it should show you a header with version information.

  2. How is the return code acquired?   Can you try echoing the return code after racadm
    like this “racadm … ; echo $?”

regards,

steve

March 8th, 2012 10:00

March 8th, 2012 10:00

I'm using racadm version 6.5.0 (Build 857.)

I have a PowerShell script which takes a list of DRACs and performs various racadm commands against all of the DRACs.  I have a log file that I report on the success/failure of each command on each DRAC.  To find out if each command was successful or not I check the $LastExitCode variable.

I was not sure if it was an issue with my PowerShell script, so I also tried to manually run racadm on one of the DRACs that had remote racadm disabled.  As you can see from the screen shot, when I get an error that remote racadm is dsiabled, I get a return code of 0.  (I also wanted to illustrate an example of when I do get a return codeother than 0, to verify I dont always get 0 no matter what, so for the first command I supplied an invalid password and got a return code of 1.)

March 13th, 2012 14:00

Hi,

I am currently looking into whether a new version of RACADM exists that alleviates your current issue. Just wanted to give you an update.

thx,steve

March 14th, 2012 07:00

Hi gnelson,

Version 7 of the RACADM environment is available at the following link.  Please try this version to see if it fixes your issue.

 

If it does not fix your issue, it is suspected that something in your environment, such as if a server is not in a ready state or a network issue, may be the cause.

Best Regards,

steve

March 15th, 2012 10:00

Steve,

I installed version 7 of racadm, and I now get a return code of 1 when a command fails if remote racadm is disabled.  (I was also glad to see that its release date was after my original posting, because I was sure I was using the most recent version at the time...)

Thankx for your help with this,

Geoff

March 19th, 2012 09:00

Geoff,

Glad I was able to help!

Yes, we just had our new 12G / (Lifecycle Controller 2) server launch so we published a lot of new docs and software.

Please let us know if you have any other questions.

thx,steve

No Events found!

Top