Closed pavanfhw closed 3 years ago
Just curious...do you have NFS share where the pack is being attempted to be installed? because the only other way is to be done via docker image to my knowledge.
I have a Ceph Shared Filesystem in the paths /opt/stackstorm/packs
and /opt/stackstorm/virtualenvs
on all containers. Should this be enough to install packs using the Kubernetes HA mode?
Yeah, ReadWriteMany
kind of shared storage that you have makes the virtualenvs and pack content shared between all the st2actionrunner
pods which should make the pack install work.
In your specific case, the error is different:
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Some packs might need additional OS-level dependencies for building the virtualenv/requirements. Looks like you need gcc
package to be installed in the st2actionrunner
containers.
Hope that helps.
@armab That was on point. I installed the gcc package on the action runner containers and it got me past that point on the pack installation.
But it could not finish, the packs.load action failed:
id: 601c18a5595ca69c52894996
action.ref: packs.load
context.user: st2admin
parameters:
packs:
- kubernetes
register: all
status: failed (13s elapsed)
start_timestamp: Thu, 04 Feb 2021 15:54:13 UTC
end_timestamp: Thu, 04 Feb 2021 15:54:26 UTC
result:
exit_code: 1
result: None
stderr: "st2.actions.python.St2RegisterAction: DEBUG Calling client method "register" with kwargs "{'types': ['all'], 'packs': ['kubernetes']}"
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 334, in <module>
obj.run()
File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 193, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/register.py", line 82, in run
format_func=format_result)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/register.py", line 150, in _run_client_method
result = method(**method_kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/models/core.py", line 42, in decorate
return func(*args, **kwargs)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/models/core.py", line 563, in register
self.handle_error(response)
File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2client/models/core.py", line 168, in handle_error
response.raise_for_status()
File "/opt/stackstorm/st2/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request
MESSAGE: Failed to register action "/opt/stackstorm/packs/kubernetes/actions/register_tpr.meta.yaml" from pack "kubernetes": RunnerType mistral-v2 is not found. If you are using old and deprecated runner name, you need to switch to a new one. For more information, please see https://docs.stackstorm.com/upgrade_notes.html#st2-v0-9 for url: http://stackstorm-st2api:9101/v1/packs/register
"
stdout: ''
This seems more a problem with the pack being out of date with my stackstorm installation. Is it possible for me to six it mannualy? Editing the action file causing the error:
# cat packs/kubernetes/actions/register_tpr.meta.yaml
---
name: "register_tpr"
pack: "kubernetes"
description: "migrate services"
runner_type: "mistral-v2"
enabled: true
entry_point: "workflows/register_tpr.yaml"
parameters:
payload:
type: "object"
description: "payload object from kubernetes sensor"
Changing the runner type would fix it? If so, how do I get my correct runner type?
Looks like you're using some very old K8s pack version. Check the upstream version: https://github.com/StackStorm-Exchange/stackstorm-kubernetes/blob/master/actions/workflows/register_tpr.yaml Mistral was deprecated since that an replaced with the Orquestra workflow engine.
@armab Using the github repo url instead of the pack name the installation worked. Thank you for your help!
Thanks for reporting.
What you're saying signalizes that StackStorm Exchange index is unsync with the latest release for the K8s pack. Created an issue for that: https://github.com/StackStorm-Exchange/stackstorm-kubernetes/issues/46 so we can fix that pack later.
I was able to install the slack package in my stackstorm-ha.
This contradicts the documentation that says:
In distributed environment of the Kubernetes cluster st2 pack install won’t work.
It is not detailed why it should no work. Is it because the paths/opt/stackstorm/{packs,virtualenvs}
are not a shared volume between all deployments? That was my thinking so I created volumes for/opt/stackstorm/packs
and/opt/stackstorm/virtualenvs
.But I'm not able to install the
kubernetes
pack. Is it the expected behavior? Install one pack but not another?The logs from the packs installation:
slack
:kubernetes
:The error
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
just seems like there is a dependency necessary to install the pack missing.Version: