ddev: Error when using upload-dirs=cpresources flag with 'ddev composer create' (with mutagen enabled)
Is there an existing issue for this?
- I have searched the existing issues
Output of ddev debug test
Expand `ddev debug test` diagnostic information
ddev debug test
Running bash [-c /var/folders/n8/0fzdvc910h3_z38zq4gnp7480000gn/T/test_ddev.sh]
======= Existing project config =========
These config files were loaded for project <project_name>: [/Users/<user>/Sites/<project_name>/www/.ddev/config.yaml /Users/<user>/Sites/<project_name>/www/.ddev/config.arm64.yaml]
name: <project_name>
type: craftcms
docroot: web
php_version: 8.1
webserver_type: apache-fpm
webimage: drud/ddev-webserver:v1.21.5
router_http_port: 80
router_https_port: 443
database: {mysql 8.0}
upload_dir: public
mailhog_port: 8025
mailhog_https_port: 8026
phpmyadmin_port: 8036
phpmyadmin_https_port: 8037
webimage_extra_packages: [chromium]
project_tld: ddev.site
use_dns_when_possible: true
timezone: Europe/Brussels
composer_version: 2
nodejs_version: 16
default_container_timeout: 120
======= Creating dummy project named tryddevproject-1154 in ../tryddevproject-1154 =========
OS Information: Darwin MBP-van-<user>.telenet.be 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
ProductName: macOS
ProductVersion: 13.4.1
BuildVersion: 22F82
User information: uid=501(<user>) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),703(com.apple.sharepoint.group.3),702(com.apple.sharepoint.group.2),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)
DDEV version: ITEM VALUE
DDEV version v1.21.6
architecture arm64
db drud/ddev-dbserver-mariadb-10.4:v1.21.5
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.21.5
docker 24.0.2
docker-compose v2.15.1
docker-platform docker
mutagen 0.16.0
os darwin
router drud/ddev-router:v1.21.5
web drud/ddev-webserver:v1.21.5
PROXY settings: HTTP_PROXY='' HTTPS_PROXY='' http_proxy='' NO_PROXY=''
======= DDEV global info =========
Global configuration:
instrumentation-opt-in=true
omit-containers=[]
mutagen-enabled=true
nfs-mount-enabled=false
router-bind-all-interfaces=false
internet-detection-timeout-ms=3000
disable-http2=false
use-letsencrypt=false
letsencrypt-email=
table-style=default
simple-formatting=false
auto-restart-containers=false
use-hardened-images=false
fail-on-hook-fail=false
required-docker-compose-version=
use-docker-compose-from-path=false
project-tld=
xdebug-ide-location=
no-bind-mounts=false
use-traefik=false
wsl2-no-windows-hosts-mgt=false
======= DOCKER info =========
docker location: lrwxr-xr-x@ 1 <user> staff 53 14 jun 07:18 /Users/<user>/.orbstack/bin/docker -> /Applications/OrbStack.app/Contents/MacOS/xbin/docker
Docker Desktop Version: Print: Entry, ":CFBundleShortVersionString", Does Not Exist
Print: Entry, ":CFBundleVersion", Does Not Exist
Docker Desktop for Mac File build Doesn'tDocker Desktop for Mac Exist, build WillDocker Desktop for Mac Create: build /Applications/Docker.app/Contents/Info.plistDocker Desktop for Mac File build Doesn'tDocker Desktop for Mac Exist, build WillDocker Desktop for Mac Create: build /Applications/Docker.app/Contents/Info.plist
docker version:
Client:
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:16 2023
OS/Arch: darwin/arm64
Context: default
Server:
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f9ee60f147020bdd444b26e4b5c636dc28
Built: Sat May 27 17:14:34 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v1.7.2
GitCommit: 0cae528dd6cb557f7201036e9f43420650207b58
runc:
Version: 1.1.7
GitCommit: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
docker-init:
Version: 0.19.0
GitCommit:
DOCKER_DEFAULT_PLATFORM=notset
======= Mutagen Info =========
Mutagen is installed in ddev, version=0.16.0
--------------------------------------------------------------------------------
Name: <project_name>
Identifier: sync_cxjbKBouzb7HtUSd4APFy3ti5E7v1PLC2GZOhTvAQag
Labels:
com.ddev.volume-signature: Users-<user>-orbstack-run-1687877890
Configuration:
Synchronization mode: Two Way Resolved
Maximum allowed entry count: Default (2⁶⁴−1)
Maximum staging file size: Default (18 EB)
Symbolic link mode: POSIX Raw
Ignore VCS mode: Default (Propagate)
Ignores:
/.git
/.tarballs
/.ddev/db_snapshots
/.ddev/.importdb*
.DS_Store
.idea
/web/public
Permissions mode: Default (Portable)
Alpha:
URL: /Users/<user>/Sites/<project_name>/www
Configuration:
Watch mode: Default (Portable)
Watch polling interval: Default (10 seconds)
Probe mode: Default (Probe)
Scan mode: Default (Accelerated)
Stage mode: Neighboring
File mode: Default (0600)
Directory mode: Default (0700)
Default file/directory owner: Default
Default file/directory group: Default
Connected: No
Beta:
URL: docker://ddev-<project_name>-web/var/www/html
DOCKER_HOST=unix:///Users/<user>/.orbstack/run/docker.sock
Configuration:
Watch mode: Default (Portable)
Watch polling interval: Default (10 seconds)
Probe mode: Default (Probe)
Scan mode: Default (Accelerated)
Stage mode: Neighboring
File mode: Default (0600)
Directory mode: Default (0700)
Default file/directory owner: Default
Default file/directory group: Default
Connected: No
Status: [Paused]
--------------------------------------------------------------------------------
======= Docker Info =========
Docker platform: docker
Using docker context: default (unix:///Users/<user>/.orbstack/run/docker.sock)
docker-compose: v2.15.1
Using DOCKER_HOST=unix:///Users/<user>/.orbstack/run/docker.sock
Docker version: 24.0.2
Able to run simple container that mounts a volume.
Able to use internet inside container.
Docker disk space:
Filesystem Size Used Available Use% Mounted on
overlay 118.5G 26.4G 92.2G 22% /
Stopped mutagen daemon
The ddev-ssh-agent container has been removed. When you start it again you will have to use 'ddev auth ssh' to provide key authentication again.
Existing docker containers:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Creating a new ddev project config in the current directory (/Users/<user>/Sites/<project_name>/tryddevproject-1154)
Once completed, your configuration will be written to /Users/<user>/Sites/<project_name>/tryddevproject-1154/.ddev/config.yaml
Configuring unrecognized codebase as project type 'php' at /Users/<user>/Sites/<project_name>/tryddevproject-1154/web
Configuration complete. You may now run 'ddev start'.
Network ddev_default created
Starting tryddevproject-1154...
Container ddev-ssh-agent Started
ssh-agent container is running: If you want to add authentication to the ssh-agent container, run 'ddev auth ssh' to enable your keys.
Network ddev-tryddevproject-1154_default Created
Container ddev-tryddevproject-1154-web Started
Container ddev-tryddevproject-1154-dba Started
Container ddev-tryddevproject-1154-db Started
You have mutagen enabled and your 'php' project type doesn't have an upload_dir set.
For faster startup and less disk usage,
set upload_dir to where your user-generated files are stored.
Starting mutagen sync process... This can take some time.
Mutagen sync flush completed in 1s.
For details on sync status 'ddev mutagen st tryddevproject-1154 -l'
Container ddev-router Started
Successfully started tryddevproject-1154
Project can be reached at https://tryddevproject-1154.ddev.site https://127.0.0.1:32935
======== Curl of site from inside container:
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 27 Jun 2023 15:38:01 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
======== curl -I of http://tryddevproject-1154.ddev.site from outside:
HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Tue, 27 Jun 2023 15:38:01 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
======== full curl of http://tryddevproject-1154.ddev.site from outside:
Success accessing database... db via TCP/IP
ddev is working. You will want to delete this project with 'ddev delete -Oy tryddevproject-1154'
======== Project ownership on host:
drwxr-xr-x 4 <user> staff 128 27 jun 17:37 ../tryddevproject-1154
======== Project ownership in container:
drwxr-xr-x 1 <user> dialout 16 Jun 27 15:37 /var/www/html
======== In-container filesystem:
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/vdb1 btrfs 124284420 27851868 96452440 23% /var/www
======== curl again of tryddevproject-1154 from host:
Success accessing database... db via TCP/IP
ddev is working. You will want to delete this project with 'ddev delete -Oy tryddevproject-1154'
Thanks for running the diagnostic. It was successful.
Please provide the output of this script in a new gist at gist.github.com
Running ddev launch in 5 seconds
If you're brave and you have jq you can delete all tryddevproject instances with this one-liner:
ddev delete -Oy $(ddev list -j |jq -r .raw[].name | grep tryddevproject)
In the future ddev debug test will also provide this option.
Please delete this project after debugging with 'ddev delete -Oy tryddevproject-1154'
Expected Behavior
Successful creation of the project with the specified upload directory.
Actual Behavior
Error occurs during the project creation process when the upload-dir flag is set to 'public'. The following error message is displayed
rsync: [receiver] mkstemp "/var/www/html/web/public/.gitignore.IYVNFK" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Failed to create project: ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-<project_name> docker-compose -f /<generic_user>/Sites/<project_name>/www/.ddev/.ddev-docker-compose-full.yaml exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/TQYtMb/" "/var/www/html/")', action='[exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/TQYtMb/" "/var/www/html/")]', err='exit status 23', stdout='', stderr='rsync: [receiver] mkstemp "/var/www/html/web/public/.gitignore.IYVNFK" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]'
Steps To Reproduce
- Execute the following command to configure DDEV:
ddev config --project-name=<project_name> --project-type=craftcms --docroot=web --create-docroot --upload-dir=public
- Run the
ddev composer create -y --no-install --no-scripts <package>
command. - Observe the error message mentioned above during the project creation process.
Anything else?
It is important to note that the issue described above only occurs when using the upload-dir flag. Without the upload-dir flag, the project creation process works correctly.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: create upload_dir if it doesn't exist in ddev composer create, fixes #5031 — committed to rfay/ddev by rfay a year ago
- fix: composer create project must restart to fix broken bind mounts, fixes #5031 — committed to rfay/ddev by rfay a year ago
I have retested the PR, and apart from the fact that I now need to use upload_dirs (presumably due to another update), I can confirm that the issue is resolved. Thanks!
Thanks for the feedback @bavodeclercq . I’ve pushed another commit which solves the issue for me. Please give it another try, thanks!
I’ve asked a colleague who has Colima installed to test the PR, and he encountered the same problem.