8 Replies Latest reply on Jul 13, 2018 12:01 PM by Matthew Ragland

    I am trying to refresh or update the server property using blcli command.

    Dhungel Sagar

      I have this on my script:

       

      #!/bin/nsh

      IP_ADDRESS=$1

      blcli_execute Utility updateServersStatus ${IP_ADDRESS}

       

      I got this command from BMC docs and id throwing error saying:

       

      Info 06/29/2018 10:37:43 JobRun Log Settings: JobRun Limit = 1000000, Per Target Log Limit = 100000, Per Target Log Level = AllInfo

      Info 06/29/2018 10:37:43 Started running the job 'USP' with priority 'NORMAL' on application server 'appserver_job_01'(2,024,300)

      Info 06/29/2018 10:37:45 Executing work item NSH Script Job:USP;  on application server: appserver_job_01

      Error 06/29/2018 10:37:46 Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'Utility.updateServersStatus' but with mismatching arguments.

      Info 06/29/2018 10:37:46 Exit Code 1

      Info 06/29/2018 10:37:46 Execution Override not enabled for job 'USP' .

      Info 06/29/2018 10:37:46 Full path to job 'USP' : 'Jobs/MetLife Consumers/Deployment Services/Automated Server Provisioning/Vintage 201801 DEV/NSH Script Jobs'

      Info 06/29/2018 10:37:46 Job 'USP' was manually executed by User:Role 'sdhungel@METNET.NET':'BLAdmins'.

      Info 06/29/2018 10:37:46 Debug mode is not enabled for job 'USP' .

      Error 06/29/2018 10:37:46 The job 'USP' has failed

        • 1. Re: I am trying to refresh or update the server property using blcli command.
          Bill Robinson

          why are you doing this w/ a blcli command and not a usp job ?

           

          Error 06/29/2018 10:37:46 Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: Found command 'Utility.updateServersStatus' but with mismatching arguments.

          have you looked at the blcli reference ?  what inputs does it take ?  seems like you have not provided the right input.

          • 2. Re: I am trying to refresh or update the server property using blcli command.
            Dhungel Sagar

            When adding the server to BSA most of the properties are not updated as the logo of the OS is not shown and rscd agent version was not showing and after adding server to BSA it is setting the server properties and is failing the provision. So I want to add the process to refresh or update the server property to that IP in a AO workflow.

            • 3. Re: I am trying to refresh or update the server property using blcli command.
              Bill Robinson
              When adding the server to BSA most of the properties are not updated

              how are you adding the server to bsa ?

               

              as the logo of the OS is not shown and rscd agent version was not showing

              was the agent running and accessible when you added the server ?

               

              and after adding server to BSA it is setting the server properties and is failing the provision

              provision of what ?  normally you install the os (provision), then the agent is installed, then you add it to bsa ?

               

              So I want to add the process to refresh or update the server property to that IP in a AO workflow.

              what else is the workflow doing ? 

              • 4. Re: I am trying to refresh or update the server property using blcli command.
                Dhungel Sagar

                This started to happen a week ago and after searching the IP in BSA it wont have the OS logo and once verify the IP it will show the logo as well as all the properties. Thats why I want to add a process to verify in our AO workflow to verify the server after adding to BSA.

                 

                We have rscd agent installed in the template we use to provision the instances. All we need at this point is how to automate the verify part in a AO workflow.

                • 5. Re: I am trying to refresh or update the server property using blcli command.
                  Bill Robinson
                  This started to happen a week ago

                  so whatever process you were using to add servers into bsa was working fine ?  what was that process ?  what would have changed that stopped it from working ?

                   

                  when you add a server to bsa, if the agent is available, the various intrinsic properties including the OS, should be updated.  if that is not happening when the server is added then you have some problem in your env.  and since you said 'this started to happen a week ago' it seems like something changed in your env.  so you can put in a bandaid w/o really understanding what broke and hope nothing else breaks, or you can try and figure out why this no longer working.

                  • 6. Re: I am trying to refresh or update the server property using blcli command.
                    Dhungel Sagar

                    Nothing was changed from how we were doing in past vs now. I think this is a bug and now I can't reproduce the issue. I just want to run the verify step in the AO workflow after adding server to BSA. Muthu seems to knew this issue and recommend doing this as other BMC customers is doing the same. I just need a working blcli command to run the USP job.

                    • 7. Re: I am trying to refresh or update the server property using blcli command.
                      Bill Robinson

                      Nothing was changed from how we were doing in past vs now.

                      if 'it was working' and now it's not that seems unlikely.

                       

                      I think this is a bug and now I can't reproduce the issue.

                      seems like you are reproducing the issue - you aren't getting the properties update.  so if you want to figure that out you need to walk through the process of how a server is added and why, when the server is added, the appserver can't talk to the agent.

                       

                      I just want to run the verify step in the AO workflow after adding server to BSA.

                      ok.

                       

                      Muthu seems to knew this issue and recommend doing this as other BMC customers is doing the same.

                      really? i wasn't aware of needing to run a verify after adding a server.  that is normally not needed.

                       

                      I just need a working blcli command to run the USP job

                      have you looked up what args are required for that command in the blcli help ?  it seems like you aren't using the right args based on the error you are getting.
                      • 8. Re: I am trying to refresh or update the server property using blcli command.
                        Matthew Ragland

                        Sagar,

                         

                        blcli_execute Utility updateServersStatus requires 4 input parameters, not 1. Here are the requirements:

                         

                        Variable Name

                        Variable TypeDescription
                        serversListcom.bladelogic.om.infra.cli.helper.StringListList of servers to update. This list must be comma-delimited, for example, server 1,server2,server3.The agent status is updated for each server in the list.
                        threadPoolSizeIntegerMaximum number of threads to use for updating servers.
                        updateTimeoutValueLongMaximum time to wait for each individual server update. Express this time value in milliseconds.
                        updateAllPropertiesBooleanTrue to update all properties; false to update only the agent status property.

                         

                        Thus, your command should look something like this:
                        blcli_execute Utility updateServersStatus "${IP_ADDRESS}" 10 10000 true