profile
viewpoint

Ask questionsSubkeys render error - max_replicas_per_node

<!-- If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

For more information about reporting issues, see https://github.com/docker/app/blob/master/CONTRIBUTING.md#reporting-other-issues


GENERAL SUPPORT INFORMATION

The GitHub issue tracker is for bug reports and feature requests. General support can be found at the following locations:

  • Docker Support Forums - https://forums.docker.com
  • Docker Community Slack - https://dockr.ly/community
  • Post a question on StackOverflow, using the Docker tag

BUG REPORT INFORMATION

Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST -->

Description

The latest version of the Docker CE distribution introduced the schema version (3.8) which supports the new key in the deploy section of the service declaration - max_replicas_per_node. In the meantime, this key doesn't have a related interpolation type in the - interpolate.go. Also, it looks similar to the following issue - https://github.com/docker/app/issues/559.

Steps to reproduce the issue:

  1. Create the docker-compose file with the following content - see the Annex №1 below
  2. Create the parameters.yml file with the following content - see the Annex №2 below
  3. Create the metadata.yml file with the following content - see the Annex №3 below
  4. Execute the following command - docker app render

Describe the results you received:

Unfortunately, we have received the following errors:

  • render failed: Action "com.docker.app.render" failed: failed to load Compose file: services.php-fpm.deploy.placement.max_replicas_per_node must be a integer

Describe the results you expected:

We are expecting from the docker app binary to render the values correctly.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.3
 API version:       1.40
 Go version:        go1.12.10
 Git commit:        a872fc2f86
 Built:             Tue Oct  8 00:58:10 2019
 OS/Arch:           linux/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.3
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.10
  Git commit:       a872fc2f86
  Built:            Tue Oct  8 00:56:46 2019
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker app version:


Version:               v0.8.0
Git commit:            7eea32b
Built:                 Tue Oct  8 01:00:29 2019
OS/Arch:               linux/amd64
Experimental:          off
Renderers:             none
Invocation Base Image: docker/cnab-app-base:v0.8.0

Output of docker info:


Client:
 Debug Mode: false
 Plugins:
  app: Docker Application (Docker Inc., v0.8.0)
  buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)

Server:
 Containers: XX
  Running: XX
  Paused: XX
  Stopped: XX
 Images: XX
 Server Version: 19.03.3
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: local
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: ID
  Is Manager: true
  ClusterID: ID
  Managers: X
  Nodes: X
  Default Address Pool: XX.XX.XX.XX/X
  SubnetSize: 24
  Data Path Port: XXXX
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: XX.XX.XX.XX
  Manager Addresses:
   XX.XX.XX.XX:XXXX
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.3.6-1.el7.elrepo.x86_64
 Operating System: CentOS Linux 7 (Core)
 OSType: linux
 Architecture: x86_64
 CPUs: XX
 Total Memory: XX.XGiB
 Name: NAME
 ID: ID
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
  processor-cores=XX
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-ip6tables is disabled

Additional environment details (AWS, VirtualBox, physical, etc.):

Annex №1 (docker-compose.yml)


version: '3.8'
x-preferences: &default-preferences
  preferences:
    - spread: "${placement.preferences.labels}"
x-constraints: &default-constraints
  constraints:
    - "node.hostname == ${placement.constraints.node.hostname}"
x-placement: &default-placement
  placement:
    max_replicas_per_node: ${placement.max_replicas}
    <<: [ *default-preferences, *default-constraints ]
services:
  php-fpm:
    image: 'php'
    deploy:
      *default-placement

Annex №2 (parameters.yml)


placement:
  preferences:
    labels: node.labels.guest-master
  constraints:
    node:
      hostname: docker.app.test
  max_replicas: 1

Annex №3 (metadata.yml)


version: 1.0.0
name: yet-another-project
description: "project description"
namespace: "domain.com/yap"
maintainers:
  - name: contributor
    email: "contributor@domain.com"

docker/app

Answer questions thaJeztah

probably needs to be reopened again; sorry I didn't spot you included it in the commit message, otherwise I'd have warned you for this

Related questions

CNAB bundle name must be lowercase? hot 2
[Enhancement Request] Allow overriding the image name variable restriction for render and inspect hot 2
"docker app upgrade" doesn't seem to actually perform any upgrades hot 2
CNAB bundle name must be lowercase? hot 1
"docker app upgrade" doesn't seem to actually perform any upgrades hot 1
Embed the cnab base invocation image into docker-app binary hot 1
Can't push to own registry which has a self-signed certificate hot 1
Relative paths mounts in volumes renders incorrectly hot 1
External Network usage with docker-app 0.8.0-rc1 hot 1
Unable to push to registry: TLS handshake timeout hot 1
Relative paths mounts in volumes renders incorrectly hot 1
CNAB bundle name must be lowercase? hot 1
Unable to push to registry: TLS handshake timeout hot 1
Unable to push to registry: TLS handshake timeout hot 1
CNAB bundle name must be lowercase? hot 1
Github User Rank List