Skip to content

lando update broke volume mounts in windows #354

Closed
@KeithBush

Description

@KeithBush

After running lando update yesterday I'm unable to build or run any containers.
The process runs until it gets to the nginx container and then crashes with an UH OH message. Just prior to the uh oh message is the following text:

 - Container landotest_appserver_nginx_1  Creating                                                                                                                                                                                                                                 0.0s
Error response from daemon: mount denied:
the source path "/c/Users/kbush/.lando/config/laravel/php.ini:C:\\php:rw"
too many colons

Here is the output from the lando update run that started the problems:

>lando update
Generating plugin/cli update matrix... done [see table below]

 PACKAGE              STATUS             COMMENT
 ──────────────────── ────────────────── ───────────────────────────────────────────────────
 @lando/acquia        ✔ Up to date       All good
 @lando/apache        ✔ Up to date       All good
 @lando/backdrop      ✔ Up to date       All good
 @lando/cli           ✔ Up to date       All good
 @lando/compose       ✔ Up to date       All good
 @lando/core          ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/dotnet        ⚠ Update available https://github.com/lando/dotnet/releases/tag/v1.2.8
 @lando/drupal        ✔ Up to date       All good
 @lando/elasticsearch ✔ Up to date       All good
 @lando/go            ✔ Up to date       All good
 @lando/healthcheck   ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/joomla        ✔ Up to date       All good
 @lando/lagoon        ✔ Up to date       All good
 @lando/lamp          ✔ Up to date       All good
 @lando/laravel       ✔ Up to date       All good
 @lando/lemp          ✔ Up to date       All good
 @lando/mailhog       ✔ Up to date       All good
 @lando/mariadb       ✔ Up to date       All good
 @lando/mean          ✔ Up to date       All good
 @lando/memcached     ✔ Up to date       All good
 @lando/mongo         ✔ Up to date       All good
 @lando/mssql         ✔ Up to date       All good
 @lando/mysql         ✔ Up to date       All good
 @lando/networking    ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/nginx         ✔ Up to date       All good
 @lando/node          ⚠ Update available https://github.com/lando/node/releases/tag/v1.5.0
 @lando/pantheon      ✔ Up to date       All good
 @lando/php           ✔ Up to date       All good
 @lando/phpmyadmin    ✔ Up to date       All good
 @lando/platformsh    ✔ Up to date       All good
 @lando/postgres      ✔ Up to date       All good
 @lando/proxy         ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/python        ✔ Up to date       All good
 @lando/redis         ✔ Up to date       All good
 @lando/ruby          ✔ Up to date       All good
 @lando/scanner       ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/sharing       ⚠ Update available https://github.com/lando/core/releases/tag/v3.24.2
 @lando/solr          ✔ Up to date       All good
 @lando/symfony       ✔ Up to date       All good
 @lando/tomcat        ✔ Up to date       All good
 @lando/varnish       ✔ Up to date       All good
 @lando/wordpress     ✔ Up to date       All good

Lando would like to update 8 package(s) listed above.
DO YOU CONSENT?: yes
✔ Updated @lando/core to v3.24.2
✔ Updated @lando/dotnet to v1.2.8
✔ Updated @lando/node to v1.5.0
Updated 3 of 3 packages successfully!
You are now up to date! with the latest and greatest!

This problem clearly happens during the mounting of nginx but from what I can tell I didn't pick up a lando/nginx update so I suspect it may be related to change in the builder behavior of lando/core

Here is a .lando.yml file to reproduce the bug: (The bad config entry can be observed on all operating systems but the crash only happens on Windows)

name: lando-test
recipe: laravel
config:
  via: nginx

Looking into my home folder then .lando/compose/landotest/ I noticed appserver_nginx-2.yml contained this volume mount string:
- C:\Users\kbush\.lando\config\laravel\php.ini:C:\php

The left side of the colon contains an invalid linux path C:\php.
Two of my team members are using linux and mac and both of them have this line instead:
- /home/xxxxx/.lando/config/laravel/php.ini:/php
(Replaced their home folder name with xxxxx. The point here is that on their systems they are having an ini file mapped to /php which seems a bit unexpected)
They are on version v3.24.2 and v3.24.1

One of my team members is using v3.23.3 and this unexpected mount is not present in their appserver_nginx-2.yml file.

Additionally, I don't know if it is related but the volume entries for us on an updated version all look a little unexpected by spanning multiple lines. Comparing ours to our team member who is on 3.23.3 does not appear to have these multi-line volume entries.

Example from my appserver_nginx-2.yml test file on the latest lando:

    volumes:
      - C:\Users\kbush\.lando:/lando:cached
      - C:\Users\kbush\.lando\scripts:/helpers
      - C:\Users\kbush\.lando\scripts\lando-entrypoint.sh:/lando-entrypoint.sh
      - home_appserver_nginx:/var/www
      - C:\Users\kbush\.lando\scripts\add-cert.sh:/scripts/000-add-cert
      - >-
        C:\Users\kbush\.lando\certs\appserver_nginx.landotest.crt:/certs/cert.crt
      - >-
        C:\Users\kbush\.lando\certs\appserver_nginx.landotest.key:/certs/cert.key
      - C:\Users\kbush:/user:cached
      - >-
        C:\Users\kbush\.lando\config\laravel\default.conf.tpl:/tmp/vhosts.conf.lando
      - C:\Users\kbush\.lando\config\laravel\php.ini:C:\php

The same section from the same file generated under v3.23.3 looks like this:

    volumes:
      - /home/xxxxx/.lando:/lando:cached
      - /home/xxxxx/.lando/scripts:/helpers
      - /home/xxxxx/.lando/scripts/lando-entrypoint.sh:/lando-entrypoint.sh
      - home_appserver_nginx:/var/www
      - /home/xxxxx/.lando/scripts/add-cert.sh:/scripts/000-add-cert
      - /home/xxxxx/.lando/certs/appserver_nginx.landotest.crt:/certs/cert.crt
      - /home/xxxxx/.lando/certs/appserver_nginx.landotest.key:/certs/cert.key
      - /home/xxxxx:/user:cached
      - /home/xxxxx/.lando/config/laravel/default.conf.tpl:/tmp/vhosts.conf.lando

The example is comparing my Windows machine to a linux machine, however I confirmed the multi-line volume mounts existed on other members of my team who were updated like myself. It may not be an issue as docker doesn't seem to complain but just mentioning it since it seemed like another significant difference between a working instance and the current instance. Additionally, you can see the last line is not present in the older version of this file.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions