Skip to content

Commit

Permalink
Suppress useless error when starting a GI-managed DB
Browse files Browse the repository at this point in the history
Starting an already running GI-managed DB with "srvctl start database" raises the error PRCC-1014 and some follow-ups. srvctl gives exit code 2 in this case. This error can safely be ignored.
  • Loading branch information
duhlig authored Jul 4, 2019
1 parent ab87f3c commit b466f10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oracle_db
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,9 @@ def start_db (module,msg, oracle_home, db_name, db_unique_name, sid):
db_name = db_unique_name
command = '%s/bin/srvctl start database -d %s' % (oracle_home,db_name)
(rc, stdout, stderr) = module.run_command(command)
if rc != 0:
if rc == 2 and 'PRCC-1014' in stdout: #<-- DB is already running
module.exit_json(msg='DB %s was already running' % db_name, changed=False)
elif rc != 0:
msg = 'Error - STDOUT: %s, STDERR: %s, COMMAND: %s' % (stdout, stderr, command)
module.fail_json(msg=msg, changed=False)
else:
Expand Down

0 comments on commit b466f10

Please sign in to comment.