Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/opt/stackstorm/virtualenvs/{pack} does not exist #23

Open
ib-ak opened this issue Feb 3, 2021 · 2 comments
Open

/opt/stackstorm/virtualenvs/{pack} does not exist #23

ib-ak opened this issue Feb 3, 2021 · 2 comments

Comments

@ib-ak
Copy link

ib-ak commented Feb 3, 2021

I am trying to build custom pack image. however keep getting this message
/opt/stackstorm/virtualenvs/{pack} does not exist

example 1

$ docker build --build-arg PACKS="csv" --tag st2packs:temp  st2packs-image
Sending build context to Docker daemon  4.608kB
Step 1/3 : FROM stackstorm/st2packs:builder AS builder
# Executing 2 build triggers
 ---> Using cache
 ---> Running in 21ed0b91a229
Removing intermediate container 21ed0b91a229
 ---> 687ff0be7f30
Step 2/3 : RUN /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}
 ---> Running in 9f6fbd0878ec
2021-02-03 15:58:20,109 INFO [-] Installing pack "csv"
2021-02-03 15:58:21,729 INFO [-] Successfully installed pack "csv"
2021-02-03 15:58:21,729 INFO [-] Setting up virtualenv for pack "csv"
2021-02-03 15:58:21,730 INFO [-] Virtualenv path "/opt/stackstorm/virtualenvs/csv" doesn't exist
2021-02-03 15:58:27,714 INFO [-] Successfully set up virtualenv for pack "csv"
Removing intermediate container 9f6fbd0878ec
 ---> 6caf196701ef
Step 3/3 : FROM stackstorm/st2packs:runtime
# Executing 3 build triggers
 ---> Using cache
 ---> 14bfee293f14
Successfully built 14bfee293f14
Successfully tagged st2packs:temp

example 2

$ docker build --build-arg PACKS="git" --tag st2packs:temp  st2packs-image
Sending build context to Docker daemon  4.608kB
Step 1/3 : FROM stackstorm/st2packs:builder AS builder
# Executing 2 build triggers
 ---> Using cache
 ---> Running in 1f0d2129905e
Removing intermediate container 1f0d2129905e
 ---> 15701667e076
Step 2/3 : RUN /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}
 ---> Running in f1056a493fb9
2021-02-03 16:23:40,633 INFO [-] Installing pack "git"
2021-02-03 16:23:42,382 INFO [-] Successfully installed pack "git"
2021-02-03 16:23:42,383 INFO [-] Setting up virtualenv for pack "git"
2021-02-03 16:23:42,384 INFO [-] Virtualenv path "/opt/stackstorm/virtualenvs/git" doesn't exist
2021-02-03 16:23:49,616 INFO [-] Successfully set up virtualenv for pack "git"
Removing intermediate container f1056a493fb9
 ---> 7891e85cdeee
Step 3/3 : FROM stackstorm/st2packs:runtime
# Executing 3 build triggers
 ---> Using cache
 ---> ad54b3db93ed
Successfully built ad54b3db93ed
Successfully tagged st2packs:temp
@arm4b
Copy link
Member

arm4b commented Feb 3, 2021

Why do you think it's an error message?

2021-02-03 16:23:42,384 INFO [-] Virtualenv path "/opt/stackstorm/virtualenvs/git" doesn't exist
2021-02-03 16:23:49,616 INFO [-] Successfully set up virtualenv for pack "git"

The end result clearly signalizes you a successfully built and tagged Docker image:

Successfully built ad54b3db93ed
Successfully tagged st2packs:temp

@ib-ak
Copy link
Author

ib-ak commented Feb 3, 2021

my understanding is that after installation, it tries to copy packs and virtualenvs folder.

2021-02-03 15:58:21,729 INFO [-] Setting up virtualenv for pack "csv"
2021-02-03 15:58:21,730 INFO [-] Virtualenv path "/opt/stackstorm/virtualenvs/csv" doesn't exist

When even though it did not gave any error during image builds, it fails during action runs.

{
  "error": "
The virtual environment (/opt/stackstorm/virtualenvs/csv) for pack \"csv\" does not exist. Normally this is
created when you install a pack using \"st2 pack install\". If you installed your pack by some other
means, you can create a new virtual environment using the command:
\"st2 run packs.setup_virtualenv packs=csv\"
",
  "traceback": "  File \"/opt/stackstorm/st2/lib/python3.6/site-packages/st2actions/container/base.py\", line 128, in _do_run
    (status, result, context) = runner.run(action_params)
  File \"/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_runner.py\", line 146, in run
    raise Exception(msg)
"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants