Skip to content

[ci] Use mock LLM for Lightspeed CRC deployment - #110

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
malingatembo:feat/OSPRH-33344-use-mock-llm
Nov 3, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
malingatembo:feat/OSPRH-33344-use-mock-llm

Conversation

@malingatembo

@malingatembo malingatembo commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Deploy Lightspeed with a mock LLM on CRC, run official application tests through test-operator, and collect JUnit results.
Keep the installer and documentation in this repository, preserving Jan’s credential handoff.
Local checks pass; fresh Zuul validation is pending.

Related-Issue: OSPRH-33344

@openshift-ci
openshift-ci Bot requested review from Akrog and umago September 30, 2026 20:21
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@centosinfra-prod-github-app

Copy link
Copy Markdown

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@lpiwowar

lpiwowar commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Nice progress! The lightspeed operator got deployed with the mock LLM server:) 🎉

Just an observation. If we want to continue to use the mock LLM server and we hit problem during running of the tests then the problem might be missing /v1/models endpoint on the server side 2:

INFO     2026-10-07T02:59:37.142725Z  HTTP Request: GET                                                                 
         http://mock-llm-api-server-pod.openstack-lightspeed.svc.cluster.local:8000/v1/models "HTTP/1.1 404 Not Found"  
         category=uncategorized                                                                                         
ERROR    2026-10-07T02:59:37.145884Z  ogx.providers.utils.inference.openai_mixin:580 list_provider_model_ids() failed   
         category=providers::utils error=Error code: 404 - {'detail': 'Not Found'} provider=OpenAIInferenceAdapter      
WARNING  2026-10-07T02:59:37.147718Z  ogx.core.routing_tables.models:102 Model refresh skipped                          
         category=core::routing_tables provider_id=provider-default-model                                               
INFO     2026-10-07T02:59:37.358187Z  ogx.core.stack:880 starting registry refresh task   category=core                 
         interval_seconds=300                

@umago

umago commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Nice progress! The lightspeed operator got deployed with the mock LLM server:) 🎉

Just an observation. If we want to continue to use the mock LLM server and we hit problem during running of the tests then the problem might be missing /v1/models endpoint on the server side 2:

INFO     2026-10-07T02:59:37.142725Z  HTTP Request: GET                                                                 
         http://mock-llm-api-server-pod.openstack-lightspeed.svc.cluster.local:8000/v1/models "HTTP/1.1 404 Not Found"  
         category=uncategorized                                                                                         
ERROR    2026-10-07T02:59:37.145884Z  ogx.providers.utils.inference.openai_mixin:580 list_provider_model_ids() failed   
         category=providers::utils error=Error code: 404 - {'detail': 'Not Found'} provider=OpenAIInferenceAdapter      
WARNING  2026-10-07T02:59:37.147718Z  ogx.core.routing_tables.models:102 Model refresh skipped                          
         category=core::routing_tables provider_id=provider-default-model                                               
INFO     2026-10-07T02:59:37.358187Z  ogx.core.stack:880 starting registry refresh task   category=core                 
         interval_seconds=300                

Nice find!

Maybe we can quickly add the v1/models to the mocked server then ? Even part of this work, should be straight forward

@centosinfra-prod-github-app

Copy link
Copy Markdown

@lpiwowar

lpiwowar commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

This is amazing! 🎉 -> https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/logs/df8/rdoproject.org/df89eec2e65145959fed02b30b506d5d/controller/ci-framework-data/logs/pre_tests_02_run_lightspeed_tests.log

We are not running the tests via test-operator though, right? I'm not sure what to think at the moment of it. If it works it works but also the ci-framework part is a bit complicated at the moment. Probably something to talk about:).

In this openstack-k8s-operators/lightspeed-tests#12 it is described how to run the tests using the tests operator. Running the tests using that configuration should be just about passing it via the corresponding ci-framework params (an example of AnsibleTest config in zuul.yaml)

@centosinfra-prod-github-app

Copy link
Copy Markdown

@centosinfra-prod-github-app

Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/ci-framework for 4222,2d1db6134f13b845d950bbce4ed1a19c8bfc7868

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@centosinfra-prod-github-app

Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/ci-framework#4222 is needed.

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome:)

Notes from the meeting. The following two things can be done as part of next set of tickets:

  • Ticket no. 1: Connect it to OpenAI using the creds from Jan
  • Ticket no. 2: Improve the tests results gathering (make sure that they are in separate folder here)

We still need a cleanup on the side of the ci-framework PR and move the variables for the test-operator role here (ref).

BUT IT WORKS and it is AWESOME!:) Hopefully the cleanup will suffice, let's see 🤞

Comment thread zuul.d/jobs.yaml Resolved
Comment thread zuul.d/jobs.yaml Resolved
Comment thread zuul.d/jobs.yaml Resolved
@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

1 similar comment
@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just couple of comments from the meeting:). Overall it looks really good! 👍 Tests are running. These are just comments related to the polishing of the code.

Comment thread zuul.d/jobs.yaml
memory: 2Gi
# Allow bootstrap to save parameters before runner and PVC facts exist.
# The collector supplies those facts when it creates this Pod.
cifmw_test_operator_log_pod_definition:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the meeting (non-blocking): This has been added by AI. We need to understand why.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So can we remove this? 👀

Comment thread zuul.d/jobs.yaml Resolved
Comment thread zuul.d/jobs.yaml Outdated
Comment on lines +32 to +33
cifmw_test_operator_ansibletest_ansible_git_repo: https://github.com/malingatembo/lightspeed-tests
cifmw_test_operator_ansibletest_ansible_git_branch: feat/OSPRH-33344-ci-test-runner

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): This needs to be updated before we merge.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs to be resolved! Important ❗

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved: now uses official lightspeed-tests repo. The temp fork setting and #17 dependency is now removed. Reviewing proposed fix in lightspeed-test official repo. openstack-k8s-operators/lightspeed-tests#23

@lpiwowar

Copy link
Copy Markdown
Collaborator

I just want to say that this is pretty much done. We can build on top of it and keep improving it. There are couple of comments on the ci-framework part as well but we are almost there:)

@centosinfra-prod-github-app

Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/ci-framework#4222 is needed.

@malingatembo

Copy link
Copy Markdown
Contributor Author

recheck

@elfiesmelfie

elfiesmelfie commented Oct 28, 2026 •

Copy link
Copy Markdown

I left a comment on openstack-k8s-operators/ci-framework#4222 (review), but I'd like to re-iterate here.

You can include the hook definition in this repo.
There might be complications if it references secrets though.

If you can manage having the hook in the lightspeed-operator repo, I would highly recommend it, since you can then guard and test against unexpected changes to ci-framework, and also make sure that new changes to the hook playbook are always tested

(EDIT: ) You can also avoid some testing complexity that would be required with Depends-On: when you make changes

@lpiwowar lpiwowar left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only bunch of non-blocking comments. There is one final thing that needs to be done which is the removal of the dependency on the lightspeed-tests PR (all the other my comments can be ignored for now -- let's just focus on merging it and we can polish later). We need to understand [1][2]:

  • Is this actually needed? If yes, then keep the PR minimal and keep there only the necessary stuff. If no, just remove the two lines and that is it:).

Once that is resolved [1] I would just merge this and we can keep on improving this and potentially do the playbook migration thing Emma suggested:).

[1] https://github.com/openstack-k8s-operators/lightspeed-operator/pull/110/changes#r4358179397
[2] openstack-k8s-operators/lightspeed-tests#17

Comment thread zuul.d/jobs.yaml
type: playbook

cifmw_run_tests: true
cifmw_test_operator_fail_on_test_failure: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking): Is this really set to false by default?

Comment thread zuul.d/jobs.yaml
type: ansibletest

cifmw_test_operator_namespace: openstack
cifmw_test_operator_privileged: false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking): Is this really set to true by default?

Comment thread zuul.d/jobs.yaml

cifmw_test_operator_namespace: openstack
cifmw_test_operator_privileged: false
cifmw_test_operator_selinux_level: s0:c478,c978

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread zuul.d/jobs.yaml
Comment on lines +28 to +29
cifmw_test_operator_ansibletest_name: ansibletest
cifmw_test_operator_ansibletest_image: quay.io/podified-antelope-centos9/openstack-ansible-tests

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking): Aren't the defaults enough here? These values equal to the default values in the test-operator role.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll keep these image settings for now until i have verified the inherited image selection. Will be done in follow up

Comment thread zuul.d/jobs.yaml
cifmw_test_operator_selinux_level: s0:c478,c978
cifmw_test_operator_ansibletest_name: ansibletest
cifmw_test_operator_ansibletest_image: quay.io/podified-antelope-centos9/openstack-ansible-tests
cifmw_test_operator_ansibletest_image_tag: current-podified

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment thread zuul.d/jobs.yaml Outdated
Comment on lines +32 to +33
cifmw_test_operator_ansibletest_ansible_git_repo: https://github.com/malingatembo/lightspeed-tests
cifmw_test_operator_ansibletest_ansible_git_branch: feat/OSPRH-33344-ci-test-runner

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs to be resolved! Important ❗

Comment thread zuul.d/jobs.yaml
cifmw_test_operator_ansibletest_ansible_playbook_path: playbooks/run_lightspeed_tests.yaml
cifmw_test_operator_ansibletest_ansible_inventory: |
localhost ansible_connection=local ansible_python_interpreter=python3
cifmw_test_operator_ansibletest_debug: false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking): The default value is false.

Comment thread zuul.d/jobs.yaml
memory: 2Gi
# Allow bootstrap to save parameters before runner and PVC facts exist.
# The collector supplies those facts when it creates this Pod.
cifmw_test_operator_log_pod_definition:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So can we remove this? 👀

@lpiwowar

lpiwowar commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Three things:

  1. Let's remove the documentation changes (separate PR -- it needs a bit of polishing).
  2. Let's squash the commits.
  3. Since you've done the move of the playbooks into this repository you might want to propose a PR into ci-framework that removes the playbooks there (last thing)

Then I think we can merge this and improve it. Currently there are two new test failures related to RAG but I think we can deal with it as a separate problem. Good news is that we have a job that runs the tests:) (related PR -> https://github.com/openstack-k8s-operators/lightspeed-tests/pull/23/changes)

Comment thread zuul.d/jobs.yaml
Comment on lines -13 to -21
secrets:
- name: openai_credentials
secret: lightspeed-openai-token
# Creates the token Secret in-cluster before the run (see playbook header).
pre-run: ci/playbooks/create_lightspeed_secret.yml
# cleanup: true so Zuul still attempts the delete when the job is canceled.
post-run:
- name: ci/playbooks/cleanup_lightspeed_secret.yml
cleanup: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We do not want to remove this, and for now, we want to ensure that we are still using the dummy secret in OpenStackLightspeed, since we are using the dummy LLM endpoint only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restored the secrete ref, pre-run setup and cleanup hooks in commit dcb31b5

Keep the deployment hook in the operator repository and use it to install
Lightspeed with a mock LLM. Run the official tests through AnsibleTest,
save the JUnit results and logs, and fail the job when tests fail.

Keep the existing credential setup and cleanup. For the mock endpoint,
the  installer replaces the provider token in the Secret with a dummy value.

Related-Issue: OSPRH-33344
Signed-off-by: malingatembo <tembomalinga@gmail.com>
@malingatembo
malingatembo force-pushed the feat/OSPRH-33344-use-mock-llm branch from 18094d2 to dcb31b5 Compare November 2, 2026 10:43
@malingatembo

Copy link
Copy Markdown
Contributor Author

@elfiesmelfie thank you taking a look and for your suggestion. The deployment hook is now in this repository, and the dependency on #4222 has been removed. Thank you

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

The job works. It is true that some tests are failing but the main goal was to ensure that tests can be executed in the job which is done 🎉 . Now we can work on polishing the job, making the tests green and changing the job to voting:).

@umago umago left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank u Malinga!

@openshift-ci

openshift-ci Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lpiwowar, malingatembo, umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Nov 3, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 337ad3a into openstack-k8s-operators:main Nov 3, 2026
7 checks passed
openshift-merge-bot Bot pushed a commit to openstack-k8s-operators/ci-framework that referenced this pull request Nov 3, 2026
The Lightspeed deployment hook is maintained in lightspeed-operator through
PR #110. Remove the old framework playbook and its README entry so there is
one place to maintain it.

Related-PR: openstack-k8s-operators/lightspeed-operator#110
Related-Issue: #OSPRH-33344
Signed-off-by: malingatembo <tembomalinga@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants