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

Explicit IPv6 address in ports compose fails to deploy stack #3533

Closed
simonkowallik opened this issue Jan 28, 2020 · 4 comments
Closed

Explicit IPv6 address in ports compose fails to deploy stack #3533

simonkowallik opened this issue Jan 28, 2020 · 4 comments
Labels
area/stack-creation bug/confirmed dep/libcompose Indicates that the issue requires an evolution in the libcompose dependency. kind/bug Applied to Bugs stack/standalone

Comments

@simonkowallik
Copy link

Bug description
When trying to create a stack which uses an explicit IPv6 address in ports, portainer responds with an error.
Using an IPv4 address instead works fine.

docker-compose supports both IPv4 and IPv6 syntax and starts the docker-proxy with the specified configuration derived from ports.

Expected behavior
Portainer creates stack successfully.

Portainer Logs
The Portainer container logs:

level=error msg="Could not parse config for project alpinetest : Service 'alpine' configuration key 0 value Does not match format 'ports'"
<date + time> http error: Service 'alpine' configuration key 0 value Does not match format 'ports' (err=Service 'alpine' configuration key 0 value Does not match format 'ports') (code=500)

The Portainer WebUI displays the following error:
Deployment error Service 'alpine' configuration key 0 value Does not match format 'ports'

Browser console shows:

POST https://localhost:9000/api/stacks?endpointId=2&method=string&type=2 500
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:32543
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:32358
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:32398
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:34759
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:34765
$eval @ vendor.d14bda68403d46ff0e35.js:formatted:35192
$digest @ vendor.d14bda68403d46ff0e35.js:formatted:35117
$apply @ vendor.d14bda68403d46ff0e35.js:formatted:35219
(anonymous) @ vendor.d14bda68403d46ff0e35.js:formatted:37068
dispatch @ vendor.d14bda68403d46ff0e35.js:formatted:5008
g.handle @ vendor.d14bda68403d46ff0e35.js:formatted:4946

Steps to reproduce the issue:

  1. Go to 'Stacks'
  2. Click on '+ add stack'
  3. Enter a name, e.g. 'alpineTest'
  4. Enter the below compose file into the web editor
version: 2
services:
  alpine:
    ports:
    - "2001:db8::1:80:80/tcp"
    image: alpine:latest
    network_mode: bridge

replacing - "2001:db8::1:80:80/tcp" with - "192.0.2.1:80:80/tcp" results in a successful deployment. Both versions result in a successful deployment when using docker-compose.

Technical details:

  • Portainer version: 1.23.0
  • Docker version (managed by Portainer): 19.03.5
  • Docker Compose version: 1.24.1 (used to verify docker compose file syntax and functionality)
  • Platform (windows/linux): linux
  • Browser: Chrome 79
@ghost
Copy link

ghost commented Apr 20, 2020

Reproduced on 1.23.2

@deviantony deviantony added dep/libcompose Indicates that the issue requires an evolution in the libcompose dependency. stack/standalone and removed deployment/docker-compose labels Apr 20, 2020
@ghost
Copy link

ghost commented Apr 24, 2020

cc @ncresswell for an update on this

@ghost
Copy link

ghost commented Apr 24, 2020

Closing as this will be addressed in #3750

@ghost ghost closed this as completed Apr 24, 2020
@onkeldittmayer
Copy link

can't reproduce... doesn't work for me.
Tried Portainer 2.1.1 and latest.
Got Error: Service configuration key 0 value Does not match format 'ports'

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/stack-creation bug/confirmed dep/libcompose Indicates that the issue requires an evolution in the libcompose dependency. kind/bug Applied to Bugs stack/standalone
Projects
None yet
Development

No branches or pull requests

3 participants