oracle / oracle/oci-cli

Cannot enable cross region replication

Open
#834 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have a volume group for which I want to enable cross region replication:

oci bv volume-group update --force --volume-group-id ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a --volume-group-replicas '[{"availabilityDomain": "vuTf:EU-FRANKFURT-1-AD-1","displayname": "ams2fra"}]' --region eu-amsterdam-1 --debug

The command returns the following:

DEBUG:oci_cli.cli_util:Config File: dict_keys(['log_requests', 'additional_user_agent', 'pass_phrase', 'tenancy', 'user', 'fingerprint', 'key_file', 'region'])
DEBUG:oci_cli.cli_util:region: Environment Variable or Parameter
DEBUG:oci.base_client.139871058036064:Endpoint: https://iaas.eu-amsterdam-1.oraclecloud.com/20160918
INFO:oci.base_client.139871058036064: 2024-08-07 08:00:43.680427: Request: PUT https://iaas.eu-amsterdam-1.oraclecloud.com/20160918/volumeGroups/ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a
Not using Expect header...
send: b'PUT /20160918/volumeGroups/ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a HTTP/1.1\r\nuser-agent: Oracle-PythonSDK/2.131.0 (python 3.12.4; x86_64-Linux) Oracle-PythonCLI/3.45.1\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nconnection: keep-alive\r\ncontent-type: application/json\r\nopc-client-retries: true\r\nopc-client-info: Oracle-PythonSDK/2.131.0\r\nopc-request-id: 0F3CE700D8454530902A7E0DC441462E\r\nContent-Length: 103\r\ndate: Wed, 07 Aug 2024 08:00:43 GMT\r\nhost: iaas.eu-amsterdam-1.oraclecloud.com\r\nx-content-sha256: m0t13amuv3B+Dw4CcEeAfLlxIncodo8ai1fCSXvnU3g=\r\nauthorization: Signature algorithm="rsa-sha256",headers="date (request-target) host content-length content-type x-content-sha256",keyId="ocid1.tenancy.oc1..aaaaaaaafvbrqwizb2l62d7o46h622ibhfp2at56cfjxak7x3jqgh42ligrq/ocid1.user.oc1..aaaaaaaabxenkv4e3ntvwuk2cdqw23fwno4tmjhhxwfjomgwntznasvxedja/df:35:b7:21:9e:cd:db:04:6b:95:64:96:a2:12:65:8b",signature="Hy9io+gxz98IJaepVo69rqTcUvJM3ZX02LRNSpB4mrl8TL1ovnxL1OwjdTKIdXbpaUJ77l2OOMFcoMGlNMlIQKKS9G7/cYfcojj4ukKDM5Nm/9ydEve/ZaegpSTEqOQUVirC0ctZ4kgUlPtyhwNLOjXt40uLjD8OFkj5T/iG5j4qLc7EsCjWqgWGKqMdJvu87eIoP1vG0kpRXwD5mYzLmrgGxYq26yVIjmlrXvGa8kIY5+JSKYYxS9DZCoRb63rrgvVBbXhHcooHe/RD8xW3NZLy0pFC6r9Pv1+dZt9awe0JYZ4aV64sWSap/i0dpZeOtudylBqmIlZSR+kf4ByETw==",version="1"\r\n\r\n{"volumeGroupReplicas": [{"availabilityDomain": "vuTf:EU-FRANKFURT-1-AD-1", "displayname": "ams2fra"}]}'
reply: 'HTTP/1.1 500 Internal Server Error\r\n'
header: Date: Wed, 07 Aug 2024 08:00:44 GMT
header: opc-request-id: 0F3CE700D8454530902A7E0DC441462E/8B6D786DE251D435C865D6555BEFFA70/C03613C6B1DA1F87FEA53475F65E98FA
header: Content-Type: application/json
header: X-Content-Type-Options: nosniff
header: Strict-Transport-Security: max-age=31536000; includeSubDomains;
header: Content-Length: 69
DEBUG:oci.base_client.139871058036064: 2024-08-07 08:01:09.302390: time elapsed for request 0F3CE700D8454530902A7E0DC441462E: 25.62190629998804
DEBUG:oci.base_client.139871058036064: 2024-08-07 08:01:09.302539: Response status: 500
DEBUG:oci.base_client.139871058036064: 2024-08-07 08:01:09.302675: python SDK time elapsed for deserializing: 5.627982318401337e-06
INFO:oci.base_client.139871058036064: 2024-08-07 08:01:11.195939: Request: PUT https://iaas.eu-amsterdam-1.oraclecloud.com/20160918/volumeGroups/ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a
Not using Expect header...
send: b'PUT /20160918/volumeGroups/ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a HTTP/1.1\r\nuser-agent: Oracle-PythonSDK/2.131.0 (python 3.12.4; x86_64-Linux) Oracle-PythonCLI/3.45.1\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nconnection: keep-alive\r\ncontent-type: application/json\r\nopc-client-retries: true\r\nopc-client-info: Oracle-PythonSDK/2.131.0\r\nopc-request-id: 586ED009A26647CBBF7FEDC71D7F6854\r\nContent-Length: 103\r\ndate: Wed, 07 Aug 2024 08:01:11 GMT\r\nhost: iaas.eu-amsterdam-1.oraclecloud.com\r\nx-content-sha256: m0t13amuv3B+Dw4CcEeAfLlxIncodo8ai1fCSXvnU3g=\r\nauthorization: Signature algorithm="rsa-sha256",headers="date (request-target) host content-length content-type x-content-sha256",keyId="ocid1.tenancy.oc1..aaaaaaaafvbrqwizb2l62d7o46h622ibhfp2at56cfjxak7x3jqgh42ligrq/ocid1.user.oc1..aaaaaaaabxenkv4e3ntvwuk2cdqw23fwno4tmjhhxwfjomgwntznasvxedja/df:35:b7:21:9e:cd:db:04:6b:95:64:96:a2:12:65:8b",signature="Q8ZyaSobN6+s9b0zwE5ski9BbQUVyg5v1cU07ASHuFhTHO5Cxq8SZZ72snzC348+D93wwuoga5ojh3cxoZkIOzvgF46QDINCtm6TGOooEGIlGUPqmuil6aVqeQfxCJ8BcVP1O6JgRS3GxgssLUge21CdOqIMtc2wpFR/YZBnS49zt5yA4MJR6UZxMNvJvgHxt93aAWp7/iBvp74+m1dtYmS9HSc7oqkflG9d4PpKAeyYPmGRyTcSj3otPHU2ROeoRK06zmXQqRkgzzzzybiepoGOkgM+s/O9VIxYoXKMnZ4gfWAgdYVNRWoepE1vn1q/PMSQewFaJub72tVp8Me8tA==",version="1"\r\n\r\n{"volumeGroupReplicas": [{"availabilityDomain": "vuTf:EU-FRANKFURT-1-AD-1", "displayname": "ams2fra"}]}'
reply: 'HTTP/1.1 500 Internal Server Error\r\n'

for several minutes and then stops with the following error message:

    raise exceptions.TransientServiceError(
oci.exceptions.TransientServiceError: {'target_service': 'blockstorage', 'status': 500, 'code': 'InternalError', 'opc-request-id': '2A034273EB9C4900ABF83605745F79A4/A99916F019AD8B45D648DC2DB4977CDA/96D0D1A4E020E36FEDADC3D2246E5F38', 'message': 'Internal Server Error', 'operation_name': 'update_volume_group', 'timestamp': '2024-08-07T08:05:16.095569+00:00', 'client_version': 'Oracle-PythonSDK/2.131.0', 'request_endpoint': 'PUT https://iaas.eu-amsterdam-1.oraclecloud.com/20160918/volumeGroups/ocid1.volumegroup.oc1.eu-amsterdam-1.abqw2ljrf5trtq6v2u6a5allekc5kfmlnqogxkplyiy7fgungzzp6igote7a', 'logging_tips': 'To get more info on the failing request, refer to https://docs.oracle.com/en-us/iaas/tools/python/latest/logging.html for ways to log the request/response details.', 'troubleshooting_tips': "See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_500__500_internalerror for more information about resolving this error. Also see https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/UpdateVolumeGroup for details on this operation's requirements. If you are unable to resolve this blockstorage issue, please contact Oracle support and provide them this full error message."}>

Affected version:

$ oci -v
3.45.1

Using the web console I'm able to do it.

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

Start with the oci bv volume-group update command and the UpdateVolumeGroup API requirements, then compare the failing request and its 500 response with the successful web-console operation. Done means the CLI can enable cross-region replication or reports a useful, actionable error instead of retrying Internal Server Error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.