Ansible Lightspeed upgrade fails when upgrading Ansible Automation Platform 2.5 to 2.6
Problem Summary
If you have an existing deployment of Ansible Lightspeed on Ansible Automation Platform 2.5, upgrading to Ansible Automation Platform 2.6 will cause your Ansible Lightspeed on-premise deployment to fail. To avoid this failure, do not upgrade to Ansible Automation Platform 2.6 until a forthcoming patch is released on October 22, 2025.
New deployments of Ansible Lightspeed will work correctly on Ansible Automation Platform 2.6.
If you do encounter any failures with the Ansible Lightspeed deployment while upgrading your Ansible Automation Platform environment, follow the steps below.
Steps to Resolve Ansible Lightspeed Pod Failure:
In order to workaround this issue, the following steps will ask the user to to remove the failing data in the lightspeed database (without deleting the database itself).
Example error shown in pod below upon a failing upgrade of Ansible Lightspeed:
RuntimeError: Failed to get new content type for a dabpermission pk=1, obj={'_state': <django.db.models.base.ModelState object at 0x7f4c8612d590>, 'id': 1, 'name': 'Can add team', 'codename': 'add_team', 'content_type_id': 24, 'new_content_type_id': None, 'api_slug': ''}
To resolve the issue, complete the steps below:
Using Openshift Cluster Platform CLI:
- Using Openshift Cluster Platform CLI tools, connect to the 2.5 lightspeed-api pod and run the following command:
oc exec -it {AnsibleLightspeed_Kind_name}-api-{ReplicaSet_Hash-PodHash} -- /bin/bash
e.g: oc exec -it lightspeed-25-api-7667655445-hvbx9 -- /bin/bash
- Activate the Python environment on the pod:
source /var/www/venv/bin/activate
- Then, execute the following command:
wisdom-manage reset_schema
Type yes to reset the lightspeed related pods.
- Finally, restart both the failed lightspeed-api and running lightspeed-chatbot pods.
oc delete pod <failed lightspeed-api pod name>
oc delete pod <running lightspeed-chatbot-api pod name>
e.g: oc delete pod lightspeed-25-api-7667655445-hvbx9
Follow-up e.g: oc delete pod lightspeed-26-chatbot-api-55686cb9cb-44mzd
Using Openshift Operator UI:
-
After upgrading, locate the Pods page on Openshift and search for the {AnsibleLightspeed_Kind_name}.
-
Click on the running lightspeed instance
(e.g: lightspeed-api-7c79cddcbf-ktv28) of {AnsibleLightspeed_Kind_name} -api pod and navigate to the Terminal tab: -
Within the open terminal, type:
source /var/www/venv/bin/activate
And press Enter.
- Next, enter:
wisdom-manage reset_schema
Type yes to continue and press Enter.
- Return back to the Pods page. To complete the upgrade , search for the following pods:
- {AnsibleLightspeed_Kind_name} -api pod
- {AnsibleLightspeed_Kind_name} -chatbot-api pod
select Delete Pod for each api pod.
Upon recreation of pods, the upgrade is complete.
- Log back into your Ansible Automation Platform 2.6 environment. If you’ve configured Ansible Lightspeed intelligent assistant, the chat icon should now appear on the top menu.
If you’re using Ansible Lightspeed on VSCode, the Ansible Extension can now also utilize code generative features upon successfully linking your updated environment in your VSCode settings.
*Note: If the chatbot model server has not been updated yet, update the chatbot secret with the new model according to the Ansible Lightspeed intelligent assistant documentation listed in the Additional Resources section below. Subsequently, wait for the lightspeed-api and lightspeed-chatbot pods to restart with the new chatbot model server configuration.
Additional Resources
- Ansible Lightspeed intelligent assistant documentation
- Ansible Lightspeed documentation
- Ansible Automation Platform 2.6 documentation
- Getting started with Openshift CLI tools