Get Stuck at `Installing Service app ......` with multiple Named Volumes

Here is my simple docker-compose.yml file:

version: "2.1"

volumes:
  resin-data:
  docker-data:
  app-data:

services:
  app:
    image: eclipse-mosquitto
    restart: always
    privileged: true
    network_mode: host
    volumes:
      - 'resin-data:/data'
      - 'docker-data:/var/lib/docker'
      - 'app-data: /var/lib/app'

As you could see, I have defined a couple of new named volumes: docker-data & app-data.
But the built service is not started:

$ balena push 192.168.137.242 --nocache
[Info]    Starting build on device 192.168.137.242

[Live]    Waiting for device state to settle...
[Info]    Streaming device logs...
[Live]    Watching for file changes...
[Logs]    [2020-4-3 00:46:47] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'
[Logs]    [2020-4-3 00:46:47] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'
[Logs]    [2020-4-3 00:46:50] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'
[Logs]    [2020-4-3 00:46:54] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'
[Logs]    [2020-4-3 00:47:03] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'
[Logs]    [2020-4-3 00:47:19] Installing service 'app sha256:e2f58db07ce196428b91294a323d35c75dc477505296b9bc97093dd2ac36ebd9'

Here is the balena version on hostOS:

root@balena:~# balena --version
Docker version 18.09.10-dev, build 7cb464a406748016f2df0c31a9851d20456a3d31

And balena-cli:

$ balena --version
11.28.11

Cheers

Hi there, I just tried this on a device and everything seems to be working fine. I first pushed the DC file with only the resin-data volume, then modified the DC file to also have the two added volumes, pushed again, and I got:

[Live]    Watching for file changes...
[Live]    Waiting for device state to settle...
[Logs]    [4/3/2020, 10:35:11 AM] Creating volume 'docker-data'
[Logs]    [4/3/2020, 10:35:11 AM] Creating volume 'app-data'
[Logs]    [4/3/2020, 10:35:11 AM] Killing service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:11 AM] [app] 1585902911: mosquitto version 1.6.9 terminating
[Logs]    [4/3/2020, 10:35:12 AM] Service exited 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:12 AM] Killed service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:13 AM] Installing service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:15 AM] Installing service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:17 AM] Installing service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'
[Logs]    [4/3/2020, 10:35:22 AM] Installing service 'app sha256:1f0df9de6d002f4a82a14b8a6b10a599ca212edd169a2a047f89151bb0d6d948'

Which indicated that the new volumes were created as expected. What exactly do you expect to see in this case?

Hey, @sradevski

Can you see anything else except Installing service?

It should be installed saying Installed service , and Starting service, Started service.

Then we are good to go…

I see, I actually cancelled the process because you were talking about the build not starting due to the changes to the dockerfile. I’ll have a look now.

Hi there, so the issue you are getting is due to the fact that there is an empty space after app-data in - 'app-data: /var/lib/app'. If you remove that, it should work as expected. We already opened an issue https://github.com/balena-io/balena-supervisor/issues/1247 so cases like this are handled more gracefully.

Yikes. Thanks a lot, mate! :+1:

You are welcome :slight_smile:

Just a note that this issue has now been resolved, and spaces in volume definitions should no longer cause problems in supervisor versions >=11.0.3