oracle / oracle/oci-cli

All forms of osmh update-all-packages fail

Open
#924 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

% oci -v
3.54.1

I can't find an acceptable method to call update-all-packages. See below. I can however execute using raw-request.

This works
oci raw-request --http-method POST --target-uri "https://osmh.us-ashburn-1.oci.oraclecloud.com/20220901/managedInstanceGroups/$GROUP_ID/actions/updateAllPackages" --request-body "$(cat <<EOF
{
  "workRequestDetails":{"displayName":"KSplice only"},
  "updateTypes":["KSPLICE_KERNEL","KSPLICE_USERSPACE"]
}
EOF
)"

Below using OSMH CLI all fail.

Attempt 1
oci os-management-hub managed-instance-group update-all-packages --group-id $GROUP_ID \
--work-request-details '{"displayName":"KSplice only"}' \
--update-types '["KSPLICE_KERNEL", "KSPLICE_USERSPACE"]'

Error: Invalid value for '--update-types': invalid choice: ["KSPLICE_KERNEL", "KSPLICE_USERSPACE"]. (choose from SECURITY, BUGFIX, ENHANCEMENT, OTHER, KSPLICE_KERNEL, KSPLICE_USERSPACE, ALL)
Attempt 2
oci os-management-hub managed-instance-group update-all-packages --group-id $GROUP_ID \
--work-request-details '{"displayName":"KSplice only"}' \
--update-types '["KSPLICE_KERNEL"]'

Error: Invalid value for '--update-types': invalid choice: ["KSPLICE_KERNEL"]. (choose from SECURITY, BUGFIX, ENHANCEMENT, OTHER, KSPLICE_KERNEL, KSPLICE_USERSPACE, ALL)
Attempt 3
oci os-management-hub managed-instance-group update-all-packages --group-id $GROUP_ID \
 --work-request-details '{"displayName":"KSplice only"}' \
--update-types '"KSPLICE_KERNEL"'

Error: Invalid value for '--update-types': invalid choice: "KSPLICE_KERNEL". (choose from SECURITY, BUGFIX, ENHANCEMENT, OTHER, KSPLICE_KERNEL, KSPLICE_USERSPACE, ALL)
Attempt 4
oci os-management-hub managed-instance-group update-all-packages --group-id $GROUP_ID \
--work-request-details '{"displayName":"KSplice only"}'  \
--update-types 'KSPLICE_KERNEL'

Parameter 'update_types' must be in JSON format.

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 by reproducing the oci os-management-hub managed-instance-group update-all-packages invocations shown in the issue and trace the --update-types parameter validation for this command. Compare its accepted input with the working raw-request payload; done means the CLI accepts the documented update types and sends an equivalent request.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.