В настоящее время я использую StackStorm на microk8s и следовал инструкциям по настройке из официальной документации. Однако я столкнулся с проблемой при попытке установить пакеты, в частности пакет ‘rabbitmq’.
Команда, которую я использовал для установки пакета, выглядит так: kubectl exec -it stackstorm-ha-1715676993-st2client-7595ccbd6-hnk89 --namespace default -- st2 pack install rabbitmq. Однако в процессе установки я получаю ошибки. Эти ошибки, кажется, возникают на разных этапах - иногда на этапе ‘install_pack_requirements’, а иногда на этапе ‘register_pack’.
Я проверил директорию /opt/stackstorm/packs, она существует и доступна для записи. Несмотря на это, установка пакетов не удается. Эта проблема не ограничивается пакетом ‘rabbitmq’ - я пробовал другие пакеты и столкнулся с той же проблемой.
Я также пытался установить пакеты напрямую через веб-интерфейс, но, к сожалению, там я также столкнулся с похожими ошибками.
Я был бы признателен за любые рекомендации или предложения о том, что может вызывать эту проблему и как ее решить.
1 случай с ‘install_pack_requirements’.
st2 pack install rabbitmq
For the "rabbitmq" pack, the following content will be registered:
actions | 3
rules | 0
sensors | 1
aliases | 0
triggers | 0
Installation may take a while for packs with many items.
[ succeeded ] init_task
[ succeeded ] download_pack
[ succeeded ] make_a_prerun
[ succeeded ] get_pack_dependencies
[ succeeded ] check_dependency_and_conflict_list
[ failed ] install_pack_requirements
id: 664335cbc55d80a70cc4428e
action.ref: packs.install
parameters:
packs:
- rabbitmq
status: failed
start_timestamp: Tue, 14 May 2024 09:58:35 UTC
end_timestamp: Tue, 14 May 2024 09:58:40 UTC
log:
- status: requested
timestamp: '2024-05-14T09:58:35.405000Z'
- status: scheduled
timestamp: '2024-05-14T09:58:35.568000Z'
- status: running
timestamp: '2024-05-14T09:58:35.619000Z'
- status: failed
timestamp: '2024-05-14T09:58:40.038000Z'
result:
errors:
- message: Execution failed. See result for details.
result:
exit_code: 1
result: None
stderr: "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Setting up virtualenv for pack "rabbitmq" (None)
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 395, in <module>
obj.run()
File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 214, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 93, in run
setup_pack_virtualenv(
File "/opt/stackstorm/st2/lib/python3.8/site-packages/st2common/util/virtualenvs.py", line 95, in setup_pack_virtualenv
raise Exception(msg)
Exception: Pack "rabbitmq" is not installed. Looked in: /opt/stackstorm/packs
"
stdout: ''
task_id: install_pack_requirements
type: error
output:
conflict_list: []
message: ''
packs_list:
- rabbitmq
warning_list: null
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+
| id | status | task | action | start_timestamp |
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+
| 664335cb594a9b7ac2e9a836 | succeeded (1s elapsed) | init_task | core.noop | Tue, 14 May 2024 09:58:35 UTC |
| 664335cce6edd4837a15fa30 | succeeded (1s elapsed) | download_pack | packs.download | Tue, 14 May 2024 09:58:36 UTC |
| 664335cee6edd4837a15fa3f | succeeded (0s elapsed) | make_a_prerun | packs.virtualenv_prerun | Tue, 14 May 2024 09:58:38 UTC |
| 664335cee6edd4837a15fa4e | succeeded (0s elapsed) | get_pack_dependencies | packs.get_pack_dependencies | Tue, 14 May 2024 09:58:38 UTC |
| 664335cfe6edd4837a15fa5d | succeeded (1s elapsed) | check_dependency_and_confli | core.noop | Tue, 14 May 2024 09:58:38 UTC |
| | | ct_list | | |
| 664335cfe6edd4837a15fa6c | failed (0s elapsed) | install_pack_requirements | packs.setup_virtualenv | Tue, 14 May 2024 09:58:39 UTC |
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+
2 случай с другим элементом:
microk8s kubectl exec -it ${ST2CLIENT} --namespace default -- st2 pack install rabbitmq
Defaulted container "st2client" out of: st2client, generate-st2client-config (init)
For the "rabbitmq" pack, the following content will be registered:
actions | 3
rules | 0
sensors | 1
aliases | 0
triggers | 0
Installation may take a while for packs with many items.
[ succeeded ] init_task
[ succeeded ] download_pack
[ succeeded ] make_a_prerun
[ succeeded ] get_pack_dependencies
[ succeeded ] check_dependency_and_conflict_list
[ succeeded ] install_pack_requirements
[ succeeded ] get_pack_warnings
[ failed ] register_pack
id: 66433d4d2d96ea37337dd982
action.ref: packs.install
parameters:
packs:
- rabbitmq
status: failed
start_timestamp: Tue, 14 May 2024 10:30:37 UTC
end_timestamp: Tue, 14 May 2024 10:30:45 UTC
log:
- status: requested
timestamp: '2024-05-14T10:30:37.492000Z'
- status: scheduled
timestamp: '2024-05-14T10:30:37.614000Z'
- status: running
timestamp: '2024-05-14T10:30:37.661000Z'
- status: failed
timestamp: '2024-05-14T10:30:45.076000Z'
result:
errors:
- message: Execution failed. See result for details.
result:
exit_code: 1
result: None
stderr: "st2.actions.python.St2RegisterAction: DEBUG Calling client method "register" with kwargs "{'types': ['all'], 'packs': ['rabbitmq']}"
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 395, in <module>
obj.run()
File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 214, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/register.py", line 76, in run
result = self._run_client_method(
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/register.py", line 155, in _run_client_method
result = method(**method_kwargs)
File "/opt/stackstorm/st2/lib/python3.8/site-packages/st2client/models/core.py", line 45, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/lib/python3.8/site-packages/st2client/models/core.py", line 684, in register
self.handle_error(response)
File "/opt/stackstorm/st2/lib/python3.8/site-packages/st2client/models/core.py", line 218, in handle_error
response.raise_for_status()
File "/opt/stackstorm/st2/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request
MESSAGE: Pack "rabbitmq" not found on disk: Directory "/opt/stackstorm/packs/rabbitmq" doesn't exist for url: http://stackstorm-ha-1715676993-st2api:9101/v1/packs/register
"
stdout: ''
task_id: register_pack
type: error
output:
conflict_list: []
message: Successfully installed packs
packs_list:
- rabbitmq
warning_list: []
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+
| id | status | task | action | start_timestamp |
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+
| 66433d4de6edd4837a15fd8f | succeeded (1s elapsed) | init_task | core.noop | Tue, 14 May 2024 10:30:37 UTC |
| 66433d4e594a9b7ac2e9ab87 | succeeded (1s elapsed) | download_pack | packs.download | Tue, 14 May 2024 10:30:38 UTC |
| 66433d4f594a9b7ac2e9ab96 | succeeded (1s elapsed) | make_a_prerun | packs.virtualenv_prerun | Tue, 14 May 2024 10:30:39 UTC |
| 66433d50594a9b7ac2e9aba5 | succeeded (0s elapsed) | get_pack_dependencies | packs.get_pack_dependencies | Tue, 14 May 2024 10:30:40 UTC |
| 66433d51594a9b7ac2e9abb4 | succeeded (0s elapsed) | check_dependency_and_confli | core.noop | Tue, 14 May 2024 10:30:41 UTC |
| | | ct_list | | |
| 66433d51594a9b7ac2e9abc3 | succeeded (2s elapsed) | install_pack_requirements | packs.setup_virtualenv | Tue, 14 May 2024 10:30:41 UTC |
| 66433d53594a9b7ac2e9abd2 | succeeded (1s elapsed) | get_pack_warnings | packs.get_pack_warnings | Tue, 14 May 2024 10:30:43 UTC |
| 66433d54594a9b7ac2e9abe1 | failed (0s elapsed) | register_pack | packs.load | Tue, 14 May 2024 10:30:44 UTC |
+--------------------------+------------------------+-----------------------------+-----------------------------+-------------------------------+