oracle / oracle/oci-cli

Error when updating freeform tags of block volume with the same values.

Open
#692 0 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

The expected behaviour when using the update command on tags of resources is that the new tags will replace the old ones. For resources such as compute, network, filesystems, mount targets etc this works fine, even if the new tags are identical to the old ones.

In the case of a block volume an update with the same tags as the already existing freeform tags fails with:

$ oci bv volume update --region fra --volume-id ocid1.volume.oc1.eu-frankfurt-1.abth... --freeform-tags '{"vol1":"2","c":"d","a":"c"}' --force
ServiceError:
{
"client_version": "Oracle-PythonSDK/2.105.0, Oracle-PythonCLI/3.29.2",
"code": "InvalidParameter",
"logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
"message": "Parameters are invalid or incorrectly formatted. Update volume requires at least one parameter to update.",
"opc-request-id": "23EDBBD890034139AC7DD1C3CB9592A3/673B95C3504E1555453F71D9CE04D500/869883A251719144C7740AE2FDACB7F3",
"operation_name": "update_volume",
"request_endpoint": "PUT https://iaas.eu-frankfurt-1.oraclecloud.com/20160918/volumes/ocid1.volume.oc1.eu-frankfurt-1.abtheljre2hbodfc7rjndfw7evdh5grn2vzbfvrrx2cackwwv44ebld75zwa",
"status": 400,
"target_service": "blockstorage",
"timestamp": "2023-07-06T22:23:03.473015+00:00",
"troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message."
}

The same command with a minor change in the tags works well:
$ oci bv volume update --region fra --volume-id ocid1.volume.oc1.eu-frankfurt-1.abth... --freeform-tags '{"vol1":"2","c":"d","a":"b"}' --force
{
"data": {
...
"freeform-tags": {
"a": "b",
"c": "d",
"vol1": "2"
},
...

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 at the OCI CLI block-volume volume update command and reproduce the two commands shown with identical and changed freeform tags. Trace the command path used by oci bv volume update; done means an update with tags identical to the existing tags succeeds like the equivalent updates for other resources. No source file or test is named, so locating the relevant implementation and tests is part of the work.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.