While trying to apply 19 OJVM+DBRSU patch, we are getting the following error. We added some debug statements to print the variables and patch_dict variable is coming in as None. It seems like the task_vars[patch_dict] is set to None too. Any idea why are we getting this issue? Thanks for your help.
print("Before try")
try:
print("Inside try")
patch_id = int(db_item["patch_id"])
print(patch_id)
patch_dict = task_vars["patch_dict"]
**print(task_vars["patch_dict"])**
print("Before patch_item")
patch_item = patch_dict[patch_id]
print(patch_item)
patch_item["patch_id"] = patch_id
print(patch_item["patch_id"])
args["patch_item"] = patch_item
print("Last line in try block")
TASK [orapatch : Check OPatch minimum version] ***************************************************************************************************************************************************************************************************************
task path: /apps/stage/ANSIBLE_AUTOMATION/ansible-orapatch-master/roles/orapatch/tasks/main.yml:40
Before try
Inside try
34773489
None
Before patch_item
failed: [db3s11.shared.musw1-ep01-core.np.norton.com] (item={u'patch_db_list': u'DB3S1', u'patch_ojvm': True, u'skip': False, u'run_only_checks': True, u'host': u'db3s11.shared.musw1-ep01-core.np.norton.com', u'patch_only_oh': True, u'oratab_file': u'/etc/oratab', u'oracle_owner': u'oracle', u'patch_db_all': True, u'oracle_home_path': u'/apps/oh/19c/odb', u'build_client_only': False, u'debug': True, u'build_client': False, u'patch_id': 34773489, u'backup_oh': False}) => {
"ansible_loop_var": "item",
"changed": false,
"item": {
"backup_oh": false,
"build_client": false,
"build_client_only": false,
"debug": true,
"host": ",
"oracle_home_path": "/apps/oh/19c/odb",
"oracle_owner": "oracle",
"oratab_file": "/etc/oratab",
"patch_db_all": true,
"patch_db_list": "",
"patch_id": 34773489,
"patch_ojvm": true,
"patch_only_oh": true,
"run_only_checks": true,
"skip": false
},
"msg": "Patch '34773489'not found!'NoneType' object has no attribute 'getitem'"
}
TASK [orapatch : [SYSTEM] End logger session] ****************************************************************************************************************************************************************************************************************
task path: /apps/stage/ANSIBLE_AUTOMATION/ansible-orapatch-master/roles/orapatch/tasks/main.yml:154
While trying to apply 19 OJVM+DBRSU patch, we are getting the following error. We added some debug statements to print the variables and patch_dict variable is coming in as None. It seems like the task_vars[patch_dict] is set to None too. Any idea why are we getting this issue? Thanks for your help.
TASK [orapatch : Check OPatch minimum version] ***************************************************************************************************************************************************************************************************************
task path: /apps/stage/ANSIBLE_AUTOMATION/ansible-orapatch-master/roles/orapatch/tasks/main.yml:40
Before try
Inside try
34773489
None
Before patch_item
failed: [db3s11.shared.musw1-ep01-core.np.norton.com] (item={u'patch_db_list': u'DB3S1', u'patch_ojvm': True, u'skip': False, u'run_only_checks': True, u'host': u'db3s11.shared.musw1-ep01-core.np.norton.com', u'patch_only_oh': True, u'oratab_file': u'/etc/oratab', u'oracle_owner': u'oracle', u'patch_db_all': True, u'oracle_home_path': u'/apps/oh/19c/odb', u'build_client_only': False, u'debug': True, u'build_client': False, u'patch_id': 34773489, u'backup_oh': False}) => {
"ansible_loop_var": "item",
"changed": false,
"item": {
"backup_oh": false,
"build_client": false,
"build_client_only": false,
"debug": true,
"host": ",
"oracle_home_path": "/apps/oh/19c/odb",
"oracle_owner": "oracle",
"oratab_file": "/etc/oratab",
"patch_db_all": true,
"patch_db_list": "",
"patch_id": 34773489,
"patch_ojvm": true,
"patch_only_oh": true,
"run_only_checks": true,
"skip": false
},
"msg": "Patch '34773489'not found!'NoneType' object has no attribute 'getitem'"
}
TASK [orapatch : [SYSTEM] End logger session] ****************************************************************************************************************************************************************************************************************
task path: /apps/stage/ANSIBLE_AUTOMATION/ansible-orapatch-master/roles/orapatch/tasks/main.yml:154