Add independent log level fields for llama-stack and lightspeed-service-api#100
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @k-pavlo. Thanks for your PR. I'm waiting for a openstack-lightspeed member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
dcf2b68 to
1d21c4f
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
lpiwowar
left a comment
There was a problem hiding this comment.
Couple of comments but overall I like the new structure for configuring the log level!!:) ➕
f430f24 to
98e7be2
Compare
|
/test openstack-lightspeed-kuttl-4-18 |
Sorry @Sulhan12, I didn't quite get what you mean. Could you please expand this. |
It looks like a bot. Ignore it |
umago
left a comment
There was a problem hiding this comment.
Just looked into it. Thanks Pavlo
7196b57 to
58db421
Compare
lpiwowar
left a comment
There was a problem hiding this comment.
/lgtm
Nice PR! Thank you 🎉
|
Missed the comment from @umago . Overall LGTM. But waiting for the commit squash. |
lpiwowar
left a comment
There was a problem hiding this comment.
If we are adding the dataverse exporter log config as part of this PR one small change probably needed on the side of the KUTTL tests (reason for their failure) but then it should be good :) 🤞
Add a logging subsection to the OpenStackLightspeed CRD with three
configurable log level fields for independent control of each container.
Changes:
- Add LoggingConfig struct with three fields:
- ogxLogLevel: Controls OGX/llama-stack container
- Supports standard levels (DEBUG, INFO) OR fine-grained syntax
("core=debug,providers=info")
- Defaults to "all=info" if empty
- lightspeedStackLogLevel: Controls lightspeed-service-api container
- Enum: DEBUG, INFO, WARNING, ERROR, CRITICAL
- Defaults to INFO
- dataverseExporterLogLevel: Controls dataverse exporter sidecar
- Enum: DEBUG, INFO, WARNING, ERROR, CRITICAL
- Defaults to INFO
- Embed LoggingConfig under 'logging:' subsection in CRD spec
- Update KUTTL tests to verify environment variables and container args
Independent fields enable targeted debugging without flooding logs from
all containers. Fine-grained OGX logging supports component-level control
for troubleshooting specific subsystems.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
/retest |
| // +kubebuilder:default="INFO" | ||
| // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Dataverse Exporter Log Level" | ||
| // Log level for the dataverse exporter sidecar container. Supports standard Python log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL. | ||
| DataverseExporterLogLevel string `json:"dataverseExporterLogLevel,omitempty"` |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k-pavlo, lpiwowar, umago The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm Thank you!:) 🎉 Nice we have all the app containers covered! |
dbe8c44
into
openstack-lightspeed:lcore-migration
Summary
Adds a
loggingsubsection to the OpenStackLightspeed CRD with three configurable log level fields for independent control of logging in OGX/llama-stack, lightspeed-service-api, and dataverse exporter containers.Changes
LoggingConfigstruct with three independent log level fields:ogxLogLevel: Controls OGX/llama-stack container loggingDEBUG,INFO,WARNING,ERROR,CRITICAL) OR fine-grained component syntax ("core=debug,providers=info")"all=info"if emptylightspeedStackLogLevel: Controls lightspeed-service-api container loggingDEBUG,INFO,WARNING,ERROR,CRITICALINFOdataverseExporterLogLevel: Controls dataverse exporter sidecar container loggingDEBUG,INFO,WARNING,ERROR,CRITICALINFOLoggingConfigasloggingsubsection inOpenStackLightspeedCorespecLLAMA_STACK_LOGGINGandOGX_LOGGINGenv vars for compatibilityLIGHTSPEED_STACK_LOG_LEVELenv var--log-levelflag with configurable value (previously hardcoded to INFO)getOGXLogLevel()with validation usingslices.Contains()instance.Spec.Logging.*fieldsStructure
ogxLogLevelhas fine-grained control as the OGX/llama-stack runtime supports component-level logging control (e.g.,"core=debug,providers=info,agents=warning"), which is invaluable for debugging specific subsystems without flooding logs. The unrestricted string field supports both simple usage ("DEBUG") and advanced troubleshooting scenarios.lightspeedStackLogLevelanddataverseExporterLogLeveluse enums to ensure only valid Python log levels are specified, with kubebuilder default of "INFO".Testing
KUTTL Tests
Updated KUTTL tests to verify logging configuration:
ogxLogLevel: DEBUG,lightspeedStackLogLevel: WARNING,dataverseExporterLogLevel: DEBUG)LLAMA_STACK_LOGGING=all=debug,OGX_LOGGING=all=debug,LIGHTSPEED_STACK_LOG_LEVEL=WARNING)--log-level DEBUG)ogxLogLevel: "core=debug,providers=info")Manual Testing
Manually deployed operator and tested all scenarios:
Standard log levels -
ogxLogLevel: DEBUG,lightspeedStackLogLevel: WARNING,dataverseExporterLogLevel: DEBUG:Independent control -
ogxLogLevel: INFO,lightspeedStackLogLevel: DEBUG,dataverseExporterLogLevel: ERROR:Fine-grained component logging -
ogxLogLevel: "core=debug,providers=info":Dynamic updates: Patching the CR triggers operator reconciliation and updates all container log levels correctly
Example Usage
Basic configuration:
Advanced troubleshooting with component-level logging: