mistral: not able to populate openstack actions from mistral-extra

Bug #1957081 reported by olmy0414
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

I am trying to import openstack actions to DB, using "mistral-db-manage --config-file /etc/mistral/mistral.conf populate", but in action list I can see only few std.* actions

First of all, in mistral ubuntu containers there is no mistral-extra library.
I tried to use centos containers with mistral-extra installed, but no luck - I still don`t see openstack actions after executing mistral-db-manage populate.

**Environment**:
* OS: Ubuntu 20.04.3 LTS
* Kernel: 5.4.0-89-generic
* Docker version: 20.10.8
* Kolla version: 12.2.0
* Container type: ubuntu/binary
* Openstack version: wallaby

Revision history for this message
Evgeny Zhuravlev (ezhuravlev) wrote :

as WA, it seems to need manual action here
1. login inside docker container with mistral_api
2. install mistral-extra with pip
 # pip3 install mistral-extra
3. restart mistral_api container
4. populate actions using mapping file
#~ mistral-db-manage --config-file /etc/mistral/mistral.conf --openstack_actions_mapping_path /var/lib/kolla/venv/lib/python3.8/site-packages/mistral_extra/actions/openstack/mapping.json populate_actions
5. execute 'populate' action with the same parameters as in step 4.

In my case, installation of the mistral-extra package was required in all of the mistral_* containers (not sure it is necessary for all)
Here the simple script doing all work :)

##########
docker exec -itu root mistral_api pip3 install mistral-extra; \
docker exec -itu root mistral_engine pip3 install mistral-extra; \
docker exec -itu root mistral_executor pip3 install mistral-extra; \
docker exec -itu root mistral_event_engine pip3 install mistral-extra; \
docker restart mistral_api mistral_engine mistral_executor mistral_event_engine
sleep 10; \
docker exec -itu root mistral_api mistral-db-manage --config-file /etc/mistral/mistral.conf --openstack_actions_mapping_path /var/lib/kolla/venv/lib/python3.8/site-packages/mistral_extra/actions/openstack/mapping.json populate_actions; \
docker exec -itu root mistral_api mistral-db-manage --config-file /etc/mistral/mistral.conf --openstack_actions_mapping_path /var/lib/kolla/venv/lib/python3.8/site-packages/mistral_extra/actions/openstack/mapping.json populate
#########
After that our workflows starts to use openstac.actions like keystone.project_list etc..

Hope it will help.

Revision history for this message
Evgeny Zhuravlev (ezhuravlev) wrote :

sorry, one string without ;\
fixed version
###
docker exec -itu root mistral_api pip3 install mistral-extra; \
docker exec -itu root mistral_engine pip3 install mistral-extra; \
docker exec -itu root mistral_executor pip3 install mistral-extra; \
docker exec -itu root mistral_event_engine pip3 install mistral-extra; \
docker restart mistral_api mistral_engine mistral_executor mistral_event_engine; \
sleep 10; \
docker exec -itu root mistral_api mistral-db-manage --config-file /etc/mistral/mistral.conf --openstack_actions_mapping_path /var/lib/kolla/venv/lib/python3.8/site-packages/mistral_extra/actions/openstack/mapping.json populate_actions; \
docker exec -itu root mistral_api mistral-db-manage --config-file /etc/mistral/mistral.conf --openstack_actions_mapping_path /var/lib/kolla/venv/lib/python3.8/site-packages/mistral_extra/actions/openstack/mapping.json populate
###

Revision history for this message
Jay Jahns (jayjahns) wrote :

Hi - we ran into this as well, on 2023.2. mistral-extra was not present in any of the mistral containers. We added an override in our environment to install it inside of mistral-base dockerfile.

Also - it looks like the populate_actions and populate need to be ran on every mistral-api container in the environment, if there are multiple control nodes.

The changes do not reflect until the containers are restarted, and the database is not updated with these actions, so once this is configured the file has to essentially exist in order to continue to work.

Revision history for this message
Jay Jahns (jayjahns) wrote :

Add to this - the mapping.json has to exist in all mistral containers, and if you do any updates to the mapping.json using what is in tools in the repository, they don't propagate correctly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.