Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix post-install DB opatch issues #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions roles/rac-db-setup/tasks/rac-db-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,6 @@
dest: "{{ install_unzip_path }}/db_install.rsp"
tags: rac-db,rac-db-response

- name: rac-db-install | Update DB OPatch
unarchive:
src: "{{ swlib_path }}/{{ item.patchfile }}"
dest: "{{ oracle_home }}"
remote_src: yes
with_items:
- "{{ opatch_patches }}"
when:
- item.release == oracle_ver
- item.category == "OPatch"
- oracle_rel != "base"
become: yes
become_user: "{{ oracle_user }}"
tags: rac-db,update-opatch-db

- name: rac-db-install | Set installer command
set_fact:
installer_command: "{{ runinstaller_loc }}/runInstaller -silent -waitforcompletion -responseFile {{ install_unzip_path }}/db_install.rsp {{ rel_patch | default('') }} {{ prereq_option }}"
Expand All @@ -137,6 +122,21 @@
- "{{ install_rac_db }}"
tags: rac-db,rac-db-install

- name: rac-db-install | Update DB OPatch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, the task block rac-db-install | Update DB OPatch has been moved in this PR after the task rac-db-install | Set installer command.

Upon eyeballing the pre & post blocks, it seems the content is same. Does the new ordering have any functionality effect?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed the order does matter.

Unlike the GI install, the DB install is out of place, and runInstaller actually clobbers existing content in the ORACLE_HOME, including the OPatch executable. Therefore we need to update OPatch after the install has completed, but before invoking it to apply one-off patches

unarchive:
src: "{{ swlib_path }}/{{ item.patchfile }}"
dest: "{{ oracle_home }}"
remote_src: yes
with_items:
- "{{ opatch_patches }}"
when:
- item.release == oracle_ver
- item.category == "OPatch"
- oracle_rel != "base"
become: yes
become_user: "{{ oracle_user }}"
tags: rac-db,update-opatch-db

- name: rac-db-install | Apply one-off and OJVM patches
become: yes
become_user: "{{ oracle_user }}"
Expand All @@ -153,8 +153,8 @@
- name: rac-db-install | opatch output
debug:
msg:
- "{{ apply_oneoff.cmd }}"
- "{{ apply_oneoff.stdout_lines }}"
- "{{ item.cmd }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this task rac-db-install | opatch output may be backed out, as a recent PR for EL8.5 fixed it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I will merge into current HEAD once approved.

- "{{ item.stdout_lines }}"
with_items: "{{ apply_oneoff.results }}"
when: item.changed
tags: rac-db,rac-db-install,opatch
Expand Down