Pack installation hangs

(Hnanchahal) #1

I am trying to create a new pack using Create and Contribute a Pack — StackStorm 2.10.4 documentation.
After creating the directories and the files i am trying to install the pack using the following command:

st2 pack install file:///$PWD

but he command just hangs and sits there until i exit.

Any pointers where as to where i can find any troubleshooting logs to see whats happening?

(Hnanchahal) #2

Also within the K8 cluster i see a bunch of pods. Do i shell into the api pod to run the install? I see the /opt/stackstorm/packs mount on the webui pod too.

I simply created an automation folder and ran the install. The folder has just the pack.yaml file.


ref: automation
name: XYZ
description: Simple pack containing examples of sensor, rule, and action.
keywords:

  • automation
  • sre
    version: 0.1.0
    author: xxxxxx
    email: xxxxxx

root@st2api-5749cb985b-jv4gs:/opt/stackstorm/packs/automation# st2 pack install file:///$PWD

(Lindsay Hill) #3

First guess would be RabbitMQ connectivity issues. Check the st2api logs.

Do other actions work, such as st2 run core.local cmd=date?

If you’re doing pack development, it is much easier to just start with a simple non-K8s install, develop & test, then deploy to k8s. There are some additional things to account for with deploying packs in k8s. See stackstorm-ha/README.md at master · StackStorm/stackstorm-ha · GitHub

(Hnanchahal) #4

st2 run core.local cmd=date ? also just hangs.

Looking at the api pod logs i only see this:

2019-04-04 20:18:09,883 INFO [-] 0268b36f-5858-444b-9332-e1ce47fd674f - GET /executions/5ca6665de64eaf00265b2bd8 with query={} (remote_addr=‘10.18.161.26’,method=‘GET’,request_id=‘0268b36f-5858-444b-9332-e1ce47fd674f’,query={},path=’/executions/5ca6665de64eaf00265b2bd8’)

2019-04-04 20:18:09,886 AUDIT [-] Token with id “5ca66436f196f9002a88b51a” is validated.

2019-04-04 20:18:09,900 INFO [-] 0268b36f-5858-444b-9332-e1ce47fd674f - 200 3300 17.863ms (content_length=3300,request_id=‘0268b36f-5858-444b-9332-e1ce47fd674f’,runtime=17.863,remote_addr=‘10.18.161.26’,status=200,method=‘GET’,path=’/executions/5ca6665de64eaf00265b2bd8’)

2019-04-04 20:18:11,909 INFO [-] 75ed2b53-3dd4-419a-8dd4-c04aeeb4ce73 - GET /executions/5ca6665de64eaf00265b2bd8 with query={} (remote_addr=‘10.18.161.26’,method=‘GET’,request_id=‘75ed2b53-3dd4-419a-8dd4-c04aeeb4ce73’,query={},path=’/executions/5ca6665de64eaf00265b2bd8’)

2019-04-04 20:18:11,914 AUDIT [-] Token with id “5ca66436f196f9002a88b51a” is validated.

2019-04-04 20:18:11,928 INFO [-] 75ed2b53-3dd4-419a-8dd4-c04aeeb4ce73 - 200 3300 19.037ms (content_length=3300,request_id=‘75ed2b53-3dd4-419a-8dd4-c04aeeb4ce73’,runtime=19.037,remote_addr=‘10.18.161.26’,status=200,method=‘GET’,path=’/executions/5ca6665de64eaf00265b2bd8’)

2019-04-04 20:18:13,935 INFO [-] 8ea8461c-48a0-451f-a031-c86ee1e2057d - GET /executions/5ca6665de64eaf00265b2bd8 with query={} (remote_addr=‘10.18.161.26’,method=‘GET’,request_id=‘8ea8461c-48a0-451f-a031-c86ee1e2057d’,query={},path=’/executions/5ca6665de64eaf00265b2bd8’)

2019-04-04 20:18:13,939 AUDIT [-] Token with id “5ca66436f196f9002a88b51a” is validated.

2019-04-04 20:18:13,953 INFO [-] 8ea8461c-48a0-451f-a031-c86ee1e2057d - 200 3300 17.579ms (content_length=3300,request_id=‘8ea8461c-48a0-451f-a031-c86ee1e2057d’,runtime=17.579,remote_addr=‘10.18.161.26’,status=200,method=‘GET’,path=’/executions/5ca6665de64eaf00265b2bd8’)

(Hnanchahal) #5

In the web ui i see in the history that all the pack installs and the local core execution are all sitting in the requested status.

(Eugen C.) #6

Just a note that if you’re trying to install a pack in a running K8s environment, you’re doing it wrong.
See StackStorm HA Cluster in Kubernetes - BETA — StackStorm 2.10.4 documentation

(Hnanchahal) #7

Thx Will look into that. An reason the actions are not executing. Even the core.local execution just hangs. The logs show a 201 for the submitted actions. No errors as far as i can see.

root@st2api-5749cb985b-jv4gs:/var/log/st2# st2 execution get 5ca668c4e64eaf00265b2be0

id: 5ca668c4e64eaf00265b2be0

status: requested

parameters:

cmd: cmd=date?

result: None

If i take the execution id and try to delete it from cli it says that the execution id not found.

(Eugen C.) #8

@hnanchahal Let’s make a few steps back.

Is you environment K8s-focused and based on GitHub - StackStorm/stackstorm-ha: K8s Helm Chart (βeta!) that codifies StackStorm High Availability fleet as a simple to use reproducible infrastructure-as-code app. or is it based on GitHub - StackStorm/st2-docker: Official docker container for StackStorm. ? Any custom modifications made? Depending on initial environment conditions there might be different limitations and investigation steps.

(Hnanchahal) #9

I am using GitHub - StackStorm/st2-docker: Official docker container for StackStorm. and have made no modifications to the set up.