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

[BUG] - Preset environment variable isn't brought in, env variable name is blank #29

Closed
joelrader-ping opened this issue Jun 26, 2020 · 2 comments · Fixed by #32
Closed
Labels
bug Something isn't working

Comments

@joelrader-ping
Copy link

Describe the bug
I have a working Portainer template file. One of the apps uses "preset" env variables for a couple of items. When brought into Yacht, it doesn't populate the name, but does populate the default value. If you try and deploy this without setting the name properly, Yacht throws a 500 error.

To Reproduce
Steps to reproduce the behavior:

  1. Load app template json
  2. Add App
  3. Fill in template details (but not env variable, should be pulled in)
  4. Deploy, get 500 error

Expected behavior
Yacht should pull in "name" for the env variable from the template file

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Also, "image" should be populated too?

** Logs **
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/lib/python3.8/site-packages/flask_login/utils.py", line 261, in decorated_view return func(*args, **kwargs) File "/app/decorators.py", line 17, in decorated_function return f(*args, **kwargs) File "/app/apps/views.py", line 69, in deploy_app launch_container(form, volumes, ports, env) File "/app/apps/views.py", line 103, in launch_container dclient.containers.run( File "/usr/lib/python3.8/site-packages/docker/models/containers.py", line 802, in run container = self.create(image=image, command=command, File "/usr/lib/python3.8/site-packages/docker/models/containers.py", line 861, in create resp = self.client.api.create_container(**create_kwargs) File "/usr/lib/python3.8/site-packages/docker/api/container.py", line 430, in create_container return self.create_container_from_config(config, name) File "/usr/lib/python3.8/site-packages/docker/api/container.py", line 441, in create_container_from_config return self._result(res, True) File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 267, in _result self._raise_for_status(response) File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 263, in _raise_for_status raise create_api_error_from_http_exception(e) File "/usr/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception raise cls(e, response=response, explanation=explanation) docker.errors.APIError: 400 Client Error: Bad Request ("invalid environment variable: =https://github.com/pingidentity/pingidentity-server-profiles.git")

@joelrader-ping joelrader-ping added the bug Something isn't working label Jun 26, 2020
@SelfhostedPro
Copy link
Owner

You need to switch the name and label sections of your Environment variables. It's throwing the invalid environment variable error due to there being spaces in the name.

@SelfhostedPro
Copy link
Owner

I was incorrect. This will be switched and corrected with the next merge into master.

@SelfhostedPro SelfhostedPro linked a pull request Jun 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants