Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in log-analytics storage purge-storage-data #661

Closed
kk-hiraskar opened this issue Jun 21, 2024 · 4 comments
Closed

Error in log-analytics storage purge-storage-data #661

kk-hiraskar opened this issue Jun 21, 2024 · 4 comments

Comments

@kk-hiraskar
Copy link

I am purging logs using OCI CLI

oci log-analytics storage purge-storage-data     --compartment-id "$MONITORING_COMPARTMENT_OCID"    \
 --namespace-name "$TENANCY_NAME"     --purge-query-string "\"log group\"=\"${STACK_NAME}\""     \
 --time-data-ended "$(date +%Y-%m-%d -d '+1 day')"     --wait-for-state SUCCEEDED --wait-for-state FAILED \
 --wait-interval-seconds 10

This is purging logs, I can confirm it from web console, but however this command return error as,

Action completed. Waiting until the work request has entered state: ('SUCCEEDED', 'FAILED')
Encountered error while waiting for work request to enter the specified state. Outputting last known resource state
{
  "opc-work-request-id": "ocid1.loganalyticsstorageworkrequest.oc1.phx.amaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwzndq"
}
TypeError: get_storage_work_request() missing 1 required positional argument: 'namespace_name'

due to this error, seems command is not waiting until mentioned logs are purged.
And early exiting with error.
However purge is happening.

@kk-hiraskar
Copy link
Author

I have verified namespace is provided correctly --namespace-name "$TENANCY_NAME" & this variable will not be blank, it is holding tenancy name, which is also same as object storage namespace.

@kk-hiraskar
Copy link
Author

This is web console, where purge requests are showing success.. and logs are purged also as per the query submitted.
image

@adizohar
Copy link
Member

Hi KK,
This repo is for Python SDK not OCI CLI
Please close the ticket and open the issue at the OCI CLI area - https://github.com/oracle/oci-cli/issues
Thank you

@kk-hiraskar
Copy link
Author

Thanks..


Ref: oracle/oci-cli#818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants