-
Notifications
You must be signed in to change notification settings - Fork 38
Ansible task to query and output Oracle DBID after creation #284
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sahsagar-google The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
FYI The single-instance-on-bms presubmit test failed with the following error: TASK [Gathering Facts] ********************************************************* DBID reporting is needed only for WLM-triggered deployments on GCE. Could you please update the Ansible task to skip BMS? |
could you please provide a sample log entry with the JSON structure that contains the extracted DBID? |
…gic from roles to config db
Here is the output from the oracle-toolkit-install-single-instance-on-bms job PLAY [Get and Log Oracle DBID for All Databases] ******************************* |
@@ -16,10 +16,7 @@ | |||
# Variables used by more than one role | |||
pkg_mgr_lock_timeout: 180 | |||
|
|||
oracle_ver_dir: "{% if free_edition %}{% if oracle_ver[:4] == '23.2' or oracle_ver[:4] == '23.3' %}23c{% else %}{{ oracle_ver[:2] }}ai{% endif %}{% else %}{{ oracle_ver[:6] }}{% endif %}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change this? It gets confusing as we, say, define oracleHome in one file and grid_home in another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vars defined here are lower in precedence from group_vars/all.yml which are applied to all tasks and hosts. So, without moving these variables the tasks are failing citing that the env variables are not available yet.
That could also be because the dependent variables (mentioned here) are not available.
If it is confusing, I could move all related variables to group_vars/all.yml. Please let me know your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if they're lower in precedence, I think they should be available; can you check how we're referencing this in other playbooks? Having removed the environment references from the top-level playbooks, we may not even need to move these references at all.
The change involves modifying the config-db.yml Ansible playbook to capture and log the Oracle DBID after a database is created. This information can help in Day 2 operations such as backup and patching. SQLPlus is used here for the query and PR #280 helps push playbook events to Google Cloud Logging.
Buganizer: b/424254827