13 Replies Latest reply on Oct 17, 2013 11:20 AM by Justin Crowe

    Need to change IP of target being deployed to

    Justin Crowe

      Have a need to change Windows IP address of a target server's second NIC that we are deploying to however the RSCD agent is bound to NIC1. The IP change is executed through a vbscript due to logic needed based on name of the server.  I have created a BLPackage with the script as an included file.  I have added an external command to execute the script.  The script executes correctly, however the job seems to hang.  Logs show that the execution completed correctly and with an exit code 0 but the job continues until an eventual time out.  I am open to any suggestions.  I have a need to keep the job based in BSA for auditing purposes.  Any help or suggestions would be greatly appreciated.

        • 1. Re: Need to change IP of target being deployed to
          Mike Jones

          When the script has completed and the job is in the hung state can you get back to the server through BSA ?

           

          If yes you might want to try executing the vbs script as a post command on the blpackage deploy job

          • 2. Re: Need to change IP of target being deployed to
            Justin Crowe

            Hey Mike, thanks for reply. I tried that with the same results. I never lose connection to the host.

            • 3. Re: Need to change IP of target being deployed to
              Siddu angadi

              can you paste the external command here?

               

              Did you try putting exit code end of the external command?

               

              Thanks

              Siddu

              • 5. Re: Need to change IP of target being deployed to
                Justin Crowe

                Thanks Siddu. The command is "cscript setipaddress.vbs".  I am not looking for a return code.  I have run a number of packages like this over the years and the issue seems to be directly related to a change to the ip stack that causes the job to time out.

                • 6. Re: Need to change IP of target being deployed to
                  Mike Jones

                  Justin,

                   

                  I agree  think it is the IP stack change that causes the issue

                   

                  Therefore if you execute the vbs script as a post job item rather than a custom command it should work fine

                  • 7. Re: Need to change IP of target being deployed to
                    Siddu angadi

                    you can do more thing.

                     

                    create bat file ( which will basically trigger VBScript and exit) and copy that bat file into c:/temp directory.

                     

                    Execute that bat file through external command of BLPackage. It should resolve your issue.

                     

                    Thanks

                    Siddu

                    • 8. Re: Need to change IP of target being deployed to
                      Justin Crowe

                      Thanks Siddu.  I created a batch file that called the VBS and then exit 0 after the vbs call.  The batch file and the vbs executes and completes successfully however the package in BL shows failure.  Here is the logs from the job run…

                       

                      Info Oct 17, 2013 10:39:04 AM Deploy Apply Job (Pre-Execute):SetIPAddressing; Server:05868D101;  PkgID:"31eea671-3329-4525-8fc5-5cd6abf07c65-309234.7"; UUID:a87e276905763d3b88e54407bf2320b7

                      Info Oct 17, 2013 10:39:04 AM Started running the deploy step job 'SetIPAddressing->SetIPAddressing' on application server 'dkhm1633'(17) against target server '05868D101'

                      Info Oct 17, 2013 10:39:05 AM Deployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.

                      Info Oct 17, 2013 10:39:05 AM Package "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) started

                      Info Oct 17, 2013 10:39:19 AM Bldeploy "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) started using file c:\tmp\30a67ba3d68b34a4a2123cdfc1e9f56b\bldeploy.xml with rollback directory C:\Program Files\BladeLogic\RSC
                      Transactions\a87e276905763d3b88e54407bf2320b7

                      Info Oct 17, 2013 10:39:19 AM Starting apply

                      Info Oct 17, 2013 10:39:19 AM Processing asset BLPACKAGE

                      Info Oct 17, 2013 10:39:19 AM Processing asset DIR

                      1 C:/setIPAddress

                      Info Oct 17, 2013 10:39:19 AM Processing asset FILE

                      1.1 C:/setIPAddress/setIPaddress.bat

                      Info Oct 17, 2013 10:39:20 AM Creation Time: Using DST Time.

                      Info Oct 17, 2013 10:39:20 AM Modified Time: Using DST Time.

                      Info Oct 17, 2013 10:39:20 AM Processing asset FILE

                      2 C:/SetIPAddressing.vbs

                      Info Oct 17, 2013 10:39:20 AM Creation Time: Using DST Time.

                      Info Oct 17, 2013 10:39:20 AM Modified Time: Using DST Time.

                      Info Oct 17, 2013 10:39:20 AM Processing asset EXTERNALCMD

                      3 SetIPAddressing

                      Info Oct 17, 2013 10:39:20 AM Executing command: "cd\

                      3 SetIPAddressing

                      Info Oct 17, 2013 10:39:20 AM cd SETIPADDRESS

                      Info Oct 17, 2013 10:39:20 AM SetIPAddress.bat"

                      Info Oct 17, 2013 10:39:20 AM  Microsoft (R) Windows Script Host Version 5.7

                      3 SetIPAddressing

                      Info Oct 17, 2013 10:39:20 AM Copyright (C) Microsoft Corporation. All rights reserved.

                      Info Oct 17, 2013 10:39:20 AM Package "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) initialized, entering wait queue for processing

                      Info Oct 17, 2013 10:39:20 AM Package "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) processing instructions

                      Info Oct 17, 2013 10:39:23 AM Apply Succeeded

                      Info Oct 17, 2013 10:39:23 AM Registering DDA plugin

                      Info Oct 17, 2013 10:39:23 AM Registered DDA plugin

                      Info Oct 17, 2013 10:39:23 AM Initializing plugin globals

                      Info Oct 17, 2013 10:39:23 AM Initializing Plugin object

                      Warning Oct 17, 2013 10:40:36 AM Failed to receive a heartbeat within 90 seconds.

                      Info Oct 17, 2013 10:42:23 AM Deployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.

                      Info Oct 17, 2013 10:42:24 AM Package "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) started

                      Error Oct 17, 2013 10:42:38 AM Failed to create configuration file c:\tmp\30a67ba3d68b34a4a2123cdfc1e9f56b\a87e276905763d3b88e54407bf2320b7.cfg

                      Error Oct 17, 2013 10:42:38 AM Configuration initialization on parse command line failed

                      Error Oct 17, 2013 10:42:38 AM Failed to create configuration file c:\tmp\30a67ba3d68b34a4a2123cdfc1e9f56b\a87e276905763d3b88e54407bf2320b7.cfg

                      Error Oct 17, 2013 10:42:38 AM Failed to create configuration file c:\tmp\30a67ba3d68b34a4a2123cdfc1e9f56b\a87e276905763d3b88e54407bf2320b7.cfg

                      Error Oct 17, 2013 10:42:38 AM Failed to create configuration file c:\tmp\30a67ba3d68b34a4a2123cdfc1e9f56b\a87e276905763d3b88e54407bf2320b7.cfg

                      Warning Oct 17, 2013 10:42:38 AM Deploy failed. Cleaning up staging area.

                      Warning Oct 17, 2013 10:42:38 AM Deploy failed. Cleaning up staging area.

                      Info Oct 17, 2013 10:42:38 AM Package "SetIPAddressing" UUID(a87e276905763d3b88e54407bf2320b7) completed. exitCode = -4001 (Deployment failed to process)

                      Error Oct 17, 2013 10:42:42 AM APPLY failed for server 05868D101. Exit code = -4001

                      Info Oct 17, 2013 10:42:42 AM The job 'SetIPAddressing->SetIPAddressing' has failed on server 05868D101

                      • 10. Re: Need to change IP of target being deployed to
                        Mike Jones

                        justin

                         

                        At the risk of repeating myself 

                         

                        Execute the vbs/bat as a post command rather than in the package directly

                        • 11. Re: Need to change IP of target being deployed to
                          Justin Crowe

                          The command executes and the IP address is changed, but the job is hanging sitting at step 4/5.

                          • 12. Re: Need to change IP of target being deployed to
                            Edwin Lindeman

                            Try this: In the Deploy Job go to the Job Options Tab. Under the Reboot Options choose 'Ignore item defined reboot setting and reboot at end of job' Or 'Use item defined reboot setting and reboot at end of job' That should allow the job to wait to the machine is back on line and reconnect to the agent to end the job with success.

                            • 13. Re: Need to change IP of target being deployed to
                              Justin Crowe

                              Rohit - that helped.  I added a sleep of 15 seconds in VBS.  Executed script, but with start in front which simply executes the script without waiting until the process finishes.  I check for error on script execution and exit with that error code.  Works perfectly.  Thanks a lot guys for the responses.  Appreciate it greatly!