4 Replies Latest reply on Jun 19, 2019 12:31 PM by Harry Lugo

    Automated Windows Patching of Control-M Server

    Harry Lugo
      Share:|

      Currently running Control-M 9.0.00.400\E.M. 9.0.00.500.

      Windows Server 2016, Database on MSSQL

      We do not have High Availability. The HA with MSSQL would cause Weird Lock ups when changing nodes, so we did away with it. We just restore the VM from backup in case of issue.

       

      Up till now we have done Manual monthly patching of the OS, but have now been instructed that the patching needs to be handled using SolarWinds Patch Manager.

      In our designs I incorporated a Global Quantitative Resource that I can set to 0 in order to stop all jobs gracefully.

       

      My Thought was to write a script that SolarWinds Patch Manager can execute to set the CONTORLM QR to 0, then check to see if any jobs are running. If no job is running Apply Patches, Reboot as many times as needed for the OS Patches, then restore the CONTROLM QR to 100, (We don't have more that 50 jobs executing at a time.) and let the Scheduler resume function.

      If jobs are running sleep for 5 Minutes and Check again. The Sleep cycle would run 3 times. If a job is still running the script would end emailing the Server team and Operations teams and prevent patching.

       

      My 1 cavoite is I don't know how SolarWinds reacts to the scripts saying "Don't Patch?"

       

      Does anyone know if Control-M have a Maintenance Mode I am not aware of, or more specific how do others handle Automated OS Patch for those who run on Windows.

        • 1. Re: Automated Windows Patching of Control-M Server
          Mark Francome

          Not maint mode as such but Workload Policies can be very handy for such scenarios. BMC have a short guide here with video -

           

          How to skip jobs to be submitted with a workload policy in Control-M? - INCLUDES VIDEO

           

          I am not familiar with SolarWinds but if you refresh the Agent display in the CCM then it will list what levels the Agents (and everything else) is on and that would help you see what's what.

          1 of 1 people found this helpful
          • 2. Re: Automated Windows Patching of Control-M Server
            Paul Robins

            You can 'Pause' the Control-M/Server which stops it submitting new jobs. This is equivalent to the zOS 'quiesce' feature.

            This can be invoked with the ctm_pause utility but does not seem to be available via the Automation API.

            To stop Control-M/Server from submitting jobs, from a command line, do one of the following:

            • To pause Control-M/Server, type ctm_pause Y.

            • To resume Control-M/Server job submission, type ctm_pause N.

             

            We are using HA successfully with MSSQL 2014 in AlwaysOn mode so that's our current approach to patching. Although there are some issues with Self Service and BIM running from secondary with EM v 9.0.00.500.

             

            Cheers,

            Paul.

            2 of 2 people found this helpful
            • 3. Re: Automated Windows Patching of Control-M Server
              Adriano Gomes

              Hi Harry Lugo

               

              Along with ctm_pause which will immediately avoid new jobs to be submitted as suggested by Paul Robins, prior triggering the command, you have to make sure no jobs are running/executing on CTMServer Host, which is very rare. You should not worry about All the remaining executing jobs from other boxes as CTM Server will query them from agents after patching and restarts  resumed.

               

              This command will help you to look for Executing jobs

              ctmpsm -LISTJOB EXECUTING

               

              As Patching operations may require multiples Windows System restarts and it depends petty much on the patch packages and dependency determined by Solarwinds Configuration Management tool, I would add to the pre-script the following :

               

              1) If CTM resides on the same host as MSSQL Server, make the Control-M Server, CTMCA and MSSQL Server windows service startup  "manual"/demand

               

              ctm_pause Y

              sc config "ControlM_Configuration_Agent" start=demand

              sc config "ControlM_Server" start=demand

              sc stop "ControlM_Configuration_Agent"

              sc stop "ControlM_Server"

               

              After patching - Post Script

               

              sc config "ControlM_Configuration_Agent" start=auto

              sc config "ControlM_Server" start=auto

              sc start "ControlM_Configuration_Agent"

              sc start "ControlM_Server"

              ctm_pause N

               

              This will make sure during rebooting Windows System will not attempt to start Control_M Server services on every boot and also speed up bootings and safeguard Control-m itself to be exposed to multiples restarts even if its set to PAUSE Y mode.

               

              I hope that it helps you.

               

              A>Gomes

              2 of 2 people found this helpful
              • 4. Re: Automated Windows Patching of Control-M Server
                Harry Lugo

                ARRRR.. So Much Good information, especially your input Adriano Gomes, with regards to no affecting Control-M with Multiple Reboots.

                 

                With Regards to our use, It's not best practice but we actually do use the local agent on the Control-M server box, thus the need to make sure no jobs local to the server are running when we go to patch.

                As my restriction is that we have to use SolarWinds Patch Manager, I'm awaiting feedback from the admin, but I does look like while the application can run a script, it can not react to it's output.

                 

                As I figure out how I will proceed I will provide updates.