Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Subkeys render error - parallelism and max_failure_ratio #559

@johnbizokk

Description

@johnbizokk

Description

Currently, we adopt the Docker App project to our software development needs to power up the multiple environments (production, staging, feature branches, etc.). First, we faced was the rendering problem. We can't parameterize the values of the following keys rollback_config - parallelism and max_failure_ratio. We have to store the values for these keys in the docker-compose.yml file. I also tried to replace the values with variables from the other blocks, for example, "${deploy.update-config.parallelism}" but have not got any success.
Summarizing the above, we have the only one working declaration - see the Annex №3.

Steps to reproduce the issue:

  1. Have the docker-compose file with the following content - see the Annex №1 below.
  2. Have the parameters.yml file with the following content - see the Annex №2 below.
  3. Execute the following render command - docker-app-standalone-linux render.

Describe the results you received:

Unfortunately we receive the following errors:

  • Error: render failed: Action "com.docker.app.render" failed: failed to load Compose file: services.application-BRANCH_NAME.deploy.rollback_config.max_failure_ratio must be a number
  • Error: render failed: Action "com.docker.app.render" failed: failed to load Compose file: services.application-BRANCH_NAME.deploy.rollback_config.parallelism must be a integer

Describe the results you expected:

We expect from docker app binary to render values correctly.

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

Output of docker version:

Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:36:00 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 02:02:43 2019
  OS/Arch:          linux/amd64
  Experimental:     true

Output of docker-app version:

Version:               v0.8.0
Git commit:            7eea32b7
Built:                 Tue Jun 11 20:53:26 2019
OS/Arch:               linux/amd64
Experimental:          off
Renderers:             none
Invocation Base Image: docker/cnab-app-base:v0.8.0

Output of docker info:

Containers: X
 Running: X
 Paused: X
 Stopped: X
Images: X
Server Version: 18.09.6
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: false
 Node Address: IP
 Manager Addresses:
  IP
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-957.12.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 13.02GiB
Name: IPADDR
ID: ID
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

Annex №1 (docker-compose.yml)

version: "3.7"
x-update:
  &default-update
  update_config:
    parallelism: "${deploy.update-config.parallelism}"
    delay: "${deploy.update-config.delay}"
    failure_action: "${deploy.update-config.failure_action}"
    max_failure_ratio: "${deploy.update-config.max_failure_ratio}"
    order: "${deploy.update-config.order}"
x-rollback:
  &default-rollback
  rollback_config:
    parallelism: "${deploy.rollback-config.parallelism}"
    delay: "${deploy.rollback-config.delay}"
    failure_action: "${deploy.rollback-config.failure_action}"
    max_failure_ratio: "${deploy.rollback-config.max_failure_ratio}"
    order: "${deploy.rollback-config.order}"
x-restart:
  &default-restart
  restart_policy:
    condition: "${deploy.restart-policy.condition}"
    delay: "${deploy.restart-policy.delay}"
    max_attempts: "${deploy.restart-policy.max_attempts}"
    window: "${deploy.restart-policy.window}"
services:
  application:
    deploy:
      <<: *default-update
      <<: *default-rollback
      <<: *default-restart
    image: "image_name"
    x-enabled: "${enable-application}"

Annex №2 (parameters.yml)

enable-application: true
deploy:
  update-config:
    parallelism: 1
    delay: 2s
    failure_action: rollback
    max_failure_ratio: 0.1
    order: stop-first
  rollback-config:
    parallelism: 1
    delay: 2s
    failure_action: pause
    max_failure_ratio: 0.1
    order: stop-first
  restart-policy:
    condition: any
    delay: 2s
    max_attempts: 5
    window: 60s

Annex №3 (docker-compose.yml)

version: "3.7"
x-update:
  &default-update
  update_config:
    parallelism: "${deploy.update-config.parallelism}"
    delay: "${deploy.update-config.delay}"
    failure_action: "${deploy.update-config.failure_action}"
    max_failure_ratio: "${deploy.update-config.max_failure_ratio}"
    order: "${deploy.update-config.order}"
x-rollback:
  &default-rollback
  rollback_config:
    parallelism: 1
    delay: "${deploy.rollback-config.delay}"
    failure_action: "${deploy.rollback-config.failure_action}"
    max_failure_ratio: 0.1
    order: "${deploy.rollback-config.order}"
x-restart:
  &default-restart
  restart_policy:
    condition: "${deploy.restart-policy.condition}"
    delay: "${deploy.restart-policy.delay}"
    max_attempts: "${deploy.restart-policy.max_attempts}"
    window: "${deploy.restart-policy.window}"
services:
  application:
    deploy:
      <<: *default-update
      <<: *default-rollback
      <<: *default-restart
    image: "image_name"
    x-enabled: "${enable-application}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions