8.3.7.1 Running patchmgr (and dbnodeupdate Orchestration) Using sudo

You can run patchmgr (which is packaged in dbserver.patch.zip) using sudo to perform any of patchmgr's functionalities, such as patching cells, patching RDMA Network Fabric switches, or orchestrating dbnodeupdate.sh execution.

Patchmgr is packaged in dbserver.patch.zip. Perform the following steps to set up the /etc/sudoers file for running patchmgr using sudo:

  1. Log in as the root user and edit /etc/sudoers using visudo.
    # visudo
  2. Add the following entry to the bottom of the sudoers file to allow non-root users, such as the oracle user, to run patchmgr as root.

    Note:

    The first field in the line specifies the non-root user who is granted sudo access for the patchmgr command. The line below uses the oracle user as an example. You can specify a different user if necessary.
    oracle  ALL=(ALL)    NOPASSWD:SETENV: /u01/stage/patch/dbserverpatch/patchmgr
    
  3. As root, create the /u01/stage/patch/dbserverpatch directory and unzip dbserver.patch.zip:
    # mkdir -p /u01/stage/patch/dbserverpatch/
    # cp dbserver.patch.zip /u01/stage/patch/dbserverpatch/
    # cd /u01/stage/patch/dbserverpatch/
    # unzip dbserver.patch.zip
    
  4. Move everything under the /u01/stage/patch/dbserverpatch/dbserver_patch_x.yymmdd directory to /u01/stage/patch/dbserverpatch/.
    # mv /u01/stage/patch/dbserverpatch/dbserver_patch_x.yymmdd/* /u01/stage/patch/dbserverpatch/
    

Note:

  • Patchmgr expects root SSH equivalence on all database nodes that will be updated, even when run using sudo.
  • The above setup requires that the entire contents of /u01/stage/patch/dbserverpatch be owned by root.
  • If you update dbserver.patch.zip, then you must place the new version in the same location as specified by sudoers.

To verify that the setup is correct, run patchmgr in prereq check mode as the oracle user:

[oracle]$ cd /u01/stage/patch/dbserverpatch/

[oracle]$ sudo ./patchmgr --dbnodes dbgroup --precheck     \
  --repo http://my-yum-repo/yum/EngineeredSystems/exadata/dbserver/23.1.8.0.0/base/x86_64/  \
  --target_version 23.1.8.0.0.231109