oracle / oracle/oci-cli

create_backup_from_onprem KeyError: 'connection_timeout'

Open
#611 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

Hello,

I'm getting the error KeyError: 'connection_timeout' when I run the command, could anyone help?

[oracle@m-oracle oci-cli-scripts]$ export ORACLE_UNQNAME=HOMOLDBA
[oracle@m-oracle oci-cli-scripts]$ rm -rf /home/oracle/migrate/onprem_upload
[oracle@m-oracle oci-cli-scripts]$ cd /home/oracle/migrate/bin/oci-cli-scripts/
[oracle@m-oracle oci-cli-scripts]$ ./create_backup_from_onprem --config-file /home/oracle/migrate/config.txt --display-name BACKUP_STANDALONE --availability-domain $AD --edition STANDARD_EDITION --opc-installer-dir /home/oracle/migrate --tmp-dir /home/oracle/migrate/onprem_upload --compartment-id $C --rman-password tkx73A12@@
/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/oci/_vendor/httpsig_cffi/sign.py:10: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from cryptography.hazmat.backends import default_backend # noqa: F401
Connecting to Oracle database
Oracle version is:11.2.0.4.0
Checking the archive log mode of the database
Checking if the database is open
Getting database name and database unique name
Database Id:3877817354 Name:HOMOLDBA UniqueName:HOMOLDBA
Fetching character set
Character Set:WE8MSWIN1252
Fetching national character set
National Character Set:AL16UTF16
Fetching rac mode
Rac mode:FALSE
Traceback (most recent call last):
File "./create_backup_from_onprem", line 8, in
sys.exit(create_backup_from_onprem())
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/oci_cli/scripts/database/dbaas.py", line 280, in create_backup_from_onprem
client = cli_util.build_client('database', 'database', ctx)
File "/home/oracle/migrate/lib/oracle-cli/lib64/python3.6/site-packages/oci_cli/cli_util.py", line 552, in build_client
if ctx.obj['connection_timeout']:
KeyError: 'connection_timeout'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The traceback enters create_backup_from_onprem in oci_cli/scripts/database/dbaas.py and fails in cli_util.py within build_client while accessing connection_timeout. Start by reproducing the command and tracing that context into build_client; done means the command no longer raises this KeyError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, cloud, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.