node-pool update --node-defined-tags - KeyError: 'node_config_details'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
When trying to update node-tags the following error is thrown: KeyError: 'node_config_details'
Complete debug output:
oci ce node-pool update --node-pool-id ocid1.nodepool.oc1.{REGION}.{ID} --node-defined-tags '{"Cloud2": {"Service":"oke","Ambiente": "QA","Project": "Project"}}'
DEBUG:oci_cli.cli_metrics: 2022-05-23 15:11:02.207162: Metrics is not enabled
Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29
System name: Linux
System release : 5.10.102.1-microsoft-standard-WSL2
System version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
env OCI_PYTHON_SDK_NO_SERVICE_IMPORTS is set
Traceback (most recent call last):
File "/home/devwebcl/.local/bin/oci", line 8, in <module>
sys.exit(cli())
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/devwebcl/.local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/devwebcl/.local/lib/python3.8/site-packages/oci_cli/json_skeleton_utils.py", line 78, in wrapped_call
func(ctx, *args, **kwargs)
File "/home/devwebcl/.local/lib/python3.8/site-packages/oci_cli/cli_util.py", line 843, in wrapped_call
func(ctx, *args, **kwargs)
File "/home/devwebcl/.local/lib/python3.8/site-packages/services/container_engine/src/oci_cli_container_engine/containerengine_cli_extended.py", line 369, in update_node_pool
kwargs['node_config_details']['definedTags'] = cli_util.parse_json_parameter("node_defined_tags",
KeyError: 'node_config_details'
Looking the source code I see there is no initialization of node_config_details (missing: kwargs['node_config_details'] = {} ):
The workaround is to set the size parameter: --size
, because this parameter initializes the node_config_details array, however, this has an impact by changing the size (although it can be the same, but adds unnecessary overhead).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in services/container_engine/src/oci_cli_container_engine/containerengine_cli_extended.py at update_node_pool, where node_config_details is accessed while handling node_defined_tags. Reproduce the reported node-pool update without --size and verify that defined tags can be updated without a KeyError or unnecessary size change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100