EM12c Release 4: Upgrading Agents with Ease

Now that Enterprise Manager 12cR4 has been out for a little while, more people are getting around to upgrading their agents.  Since the monthly Patch bundles were released we already have a few Agent side patches that we want to apply to our newly upgraded agents.  I’ve written about simplifying your agent patching before, but this feature still seems to fly under the radar.  It’s days like these that I miss running a massive Enterprise Manager with thousands of databases, because this is one of the things that would have made me dance in my cubicle.

Let’s say, you have 100 12.1.0.3.0 agents (50 with Database plug-in, 50 with Middleware plug-in).  In my previous blog on EM patches, I explained the different types of patches available for EM, so I’m not going to go into detail here.   What I'm going to illustrate is how we can upgrade those 100 agents, and patch them with the following patches in one step (current as of today):

  • 12.1.0.4.1 Agent: 18873338
  • 12.1.0.6.1 Database Agent-Side Plug-in:19002534
  • 12.1.0.6.1 Middleware Agent Side Plug-in: 18953219
  • 12.1.0.4.0 JDBC: 18502187,18721761

Apply Pre-Requisite Patches to OMS Servers 

Before staging and applying any Agent patches, be sure to read the readme's completely for each patch.   The Database and Middleware patches often rely on their OMS-side patch, so be sure to apply the OMS pre-requisite patches first.   In this example, applying the OMS Plug-in System patch 18945232 is required.  Not applying the OMS-side patches first can causes patch applications to fail or other various inconsistencies.  

Stage Patches on OMS Servers

First we need to download and stage the 5 patches on our OMS Servers. In case of multi-OMS, they must be staged on each server.   The patches get staged in the $ORACLE_HOME/install/oneoffs directory. During the upgrade or install of a new agent, the patches are picked up from here.  

1.  Download all 5 patches and transfer to your OMS servers.

2.  Create the $ORACLE_HOME/install/oneoffs/12.1.0.4.0/Generic directories on each of your OMS servers

$ cd $ORACLE_HOME/install/oneoffs
$ mkdir –p 12.1.0.4.0/Generic

3.  Stage the zip files in the $ORACLE_HOME/install/oneoffs/12.1.0.4.0/Generic

$ cd 12.1.0.4.0/Generic
$ cp /tmp/12.1.0.4.0_patches/*.zip .
$ ls -l /oracle/em/12.1.0.4/oms/install/oneoffs/12.1.0.4.0/Generic
-rw-r--r-- 1 cllamas dba   516862 Jul 21 08:21 p18502187_111070_Generic.zip
-rw-r--r-- 1 cllamas dba   101566 Jul 21 08:21 p18721761_121040_Generic.zip
-rw-r--r-- 1 cllamas dba 14110135 Jul 21 08:21 p18873338_121040_Generic.zip
-rw-r--r-- 1 cllamas dba    61619 Jul 21 08:21 p18953219_121060_Generic.zip
-rw-r--r-- 1 cllamas dba    13242 Jul 21 08:21 p19002534_121060_Generic.zip

 4.  Repeat on each OMS server.

Upgrade an Agent

Now that we've staged our 5 patches, let’s upgrade an Agent.  Starting with 12.1.0.2, agent upgrades are performed via the Upgrade Console.  

1.  Click Setup / Manage Cloud Control / Upgrade Agents

2.  Click Add to select the Agent(s) you want to upgrade and click OK.

3.  In the Choose Credentials section, you’ll notice it’s only asking for Privileged credentials. This is because the Agent uses its existing connection to upgrade, and you only need to provide credentials for the root.sh steps if required.  If you have a Privileged credential with root capabilities that is not set as your Preferred Credential, you can select Override Privileged Credentials and select or create the credential.  If you don’t have the root credentials, you will be prompted to run root.sh manually as needed.

5.  In the Additional Inputs section, you can add pre-upgrade or post-upgrade scripts or specify alternate paramters or staging location if necessary.

 6.  Click Submit to submit the upgrade procedure.

7.  If you did not provide a root credential, you will receive a warning.  Click OK to proceed. 

8.  Once you submit the procedure, you’ll see the list of targets in the top screen, and the steps of the selected target in the bottom half.   Clicking on any of the links will take you to the specific job output for that step.  As you can see, the Agent Upgrade procedure takes care of starting and stopping the blackouts required to avoid false alarms on the targets. 

Validate Patches 

Once the agent is upgraded, let’s go to the agent and verify what patches were applied.

$ OPatch/opatch lsinventory -oh /scratch/agent/core/12.1.0.4.0
Oracle Interim Patch Installer version 11.1.0.10.4
Copyright (c) 2014, Oracle Corporation.  All rights reserved.

Oracle Home       : /scratch/agent/core/12.1.0.4.0
Central Inventory : /home/oraInventory
   from           : /scratch/agent/core/12.1.0.4.0/oraInst.loc
OPatch version    : 11.1.0.10.4
OUI version       : 11.1.0.12.0
Log file location : /scratch/agent/core/12.1.0.4.0/cfgtoollogs/opatch/opatch2014-07-21_10-32-45AM_1.log

Lsinventory Output file location : /scratch/agent/core/12.1.0.4.0/cfgtoollogs/opatch/lsinv/lsinventory2014-07-21_10-32-45AM.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1):

EM Platform (Agent)                                                  12.1.0.4.0
There are 1 products installed in this Oracle Home.

Interim patches (5) :

Patch  18873338     : applied on Mon Jul 21 08:29:10 PDT 2014
Unique Patch ID:  17759482
Patch description:  "EM-AGENT BUNDLE PATCH 12.1.0.4.1"
   Created on 17 Jun 2014, 09:46:07 hrs PST8PDT
   Bugs fixed:
     18476937, 17438375, 18277098, 17995417, 17579501, 18873338

Patch  18502187     : applied on Mon Jul 21 08:28:55 PDT 2014
Unique Patch ID:  17615617
   Created on 6 May 2014, 06:29:08 hrs PST8PDT
   Bugs fixed:
     6895422, 16479818, 18421945, 13583799

Patch  18721761     : applied on Mon Jul 21 08:28:30 PDT 2014
Unique Patch ID:  17795715
   Created on 27 Jun 2014, 04:34:49 hrs PST8PDT
   Bugs fixed:
     14671238, 8855559, 8563945, 13737031, 13737032, 11807297, 12984377

Patch  10203435     : applied on Fri May 23 23:31:00 PDT 2014
Unique Patch ID:  15915936.1
   Created on 7 Feb 2013, 18:06:13 hrs PST8PDT
   Bugs fixed:
     10203435

Patch  17018143     : applied on Fri May 23 23:30:55 PDT 2014
Unique Patch ID:  17273347
   Created on 7 Feb 2014, 21:45:46 hrs UTC
   Bugs fixed:
     17018143

--------------------------------------------------------------------------------

OPatch succeeded.

Since this Agent only had the DB Plug-in installed at the time of upgrade, it received the 12.1.0.6.1 Database Plug-in patch, but not the Middleware patch.  An Agent with the Middleware Plug-in would have received the Middleware patch and not the Database.

$ $AGENT_HOME/OPatch/opatch lsinventory -oh /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0

Oracle Interim Patch Installer version 11.1.0.10.4
Copyright (c) 2014, Oracle Corporation.  All rights reserved.

Oracle Home       : /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0
Central Inventory : /home/oraInventory
   from           : /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0/oraInst.loc
OPatch version    : 11.1.0.10.4
OUI version       : 11.1.0.12.0
Log file location : /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0/cfgtoollogs/opatch/opatch2014-07-21_08-51-02AM_1.log

Lsinventory Output file location : /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0/cfgtoollogs/opatch/lsinv/lsinventory2014-07-21_08-51-02AM.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1):

Enterprise Manager plug-in for Oracle Database                       12.1.0.6.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch  19002534     : applied on Mon Jul 21 08:32:04 PDT 2014
Unique Patch ID:  17759438
Patch description:  "EM DB PLUGIN BUNDLE PATCH 12.1.0.6.1 (AGENT SIDE)"
   Created on 17 Jun 2014, 09:10:22 hrs PST8PDT
   Bugs fixed:
     19002534, 18308719

--------------------------------------------------------------------------------

OPatch succeeded.

So, with one upgrade step in the console, we successfully upgraded our agent from 12.1.0.3 to 12.1.0.4 and applied the Agent bundle patch, the Database Agent-side Plug-in patch and two JDBC patches.  If you have problems, you can look at the Agent log files, starting with the $AGENT_HOME/cfgtoollogs/agentDeploy logs.  In here you will see the steps taken to upgrade, including applying the oneoff patches, as seen below:

INFO: Mon Jul 21 08:32:20 2014 - ====== Summary ======
INFO: Mon Jul 21 08:32:20 2014 - Following patches were successfully applied to the mentioned homes:
INFO: Mon Jul 21 08:32:20 2014 - 19002534 => /scratch/agent/plugins/oracle.sysman.db.agent.plugin_12.1.0.6.0
INFO: Mon Jul 21 08:32:20 2014 - 18721761 => /scratch/agent/core/12.1.0.4.0
INFO: Mon Jul 21 08:32:20 2014 - 18873338 => /scratch/agent/core/12.1.0.4.0
INFO: Mon Jul 21 08:32:20 2014 - 18502187 => /scratch/agent/core/12.1.0.4.0
INFO: Mon Jul 21 08:32:20 2014 - Following patches were not applied:
INFO: Mon Jul 21 08:32:20 2014 - 18953219
INFO: Mon Jul 21 08:32:20 2014 - Log file location:
/scratch/agent/core/12.1.0.4.0/cfgtoollogs/agentDeploy/applypatchesonapplicablehome2014-07-21_08-31-19.log
INFO: Mon Jul 21 08:32:20 2014 - Apply completed.

As you can see, patch 18953219 was rejected because we do not have the Middleware plug-in installed on this Agent.    After testing on a few agents, you're able to move forward with the rest of the upgrades knowing that they will be patched and ready to go!  

Summary 

Upgrading Agents with the latest and greatest patches is easy if you take the time to stage them in the OMS server.  The added benefit is that any new Agent deploys from the console will get the core Agent patches that you stage.   Plug-in patches will not get applied during Agent deploy as there is no Plug-in deployed at that time.  To always push the most current Plug-in, create a custom Plug-in Update from one of your patched agents using EM CLI, and then import to EM.  After doing this, all new plug-in deployments will include the patches you have tested.  For detailed instructions on how to create a Custom Plug-in Update read this previous blog post.  

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Latest information and perspectives on Oracle Enterprise Manager.

Related Blogs




Search

Archives
« April 2015
SunMonTueWedThuFriSat
   
2
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today