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?
I just tried recreating the steps and got a return code of “1”. A couple of questions to ask:
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.)
I am currently looking into whether a new version of RACADM exists that alleviates your current issue. Just wanted to give you an update.
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.
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,
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.