TravisCarden / ddev-drupal-xb-dev

A DDEV add-on for Drupal Experience Builder module development and evaluation
https://www.drupal.org/project/experience_builder
8 stars 5 forks source link

Writable volume and supervisord issue with ddev+rancher combo #5

Closed kaynenh closed 1 month ago

kaynenh commented 1 month ago

Was seeing this error attempting to ddev launch using this setup due to a writable volume issue with supervisord. This is probably more ddev related in general, but I thought I'd post here in case anyone runs into it.

Starting xb-dev... 
Building project images... 
.Project images built in 1s. 
 Container ddev-xb-dev-db  Running 
 Container ddev-xb-dev-web  Created 
 Container ddev-xb-dev-web  Started 
Starting Mutagen sync process... 
.Mutagen sync flush completed in 2s.
For details on sync status 'ddev mutagen st xb-dev -l' 
Waiting for web/db containers to become ready: [web db] 
Failed waiting for web/db containers to become ready: web container failed: log=&{2024-10-24 12:25:05.520495168 -0500 CDT 2024-10-24 12:25:06.138056807 -0500 CDT 1 /var/www/html:OK mailpit:FAILED phpstatus:FAILED }, err=ddev-xb-dev-web container is unhealthy: &{2024-10-24 12:25:05.520495168 -0500 CDT 2024-10-24 12:25:06.138056807 -0500 CDT 1 /var/www/html:OK mailpit:FAILED phpstatus:FAILED }, more info with [
    ddev logs -s web
    docker logs ddev-xb-dev-web
    docker inspect --format "{{ json .State.Health }}" ddev-xb-dev-web | docker run -i --rm ddev/ddev-utilities jq -r
] 

My fix was to open up permissions to a variety of logs in a newly created file .ddev/web-entrypoint.d/ddev-fix-permissions-entrypoint.sh

#!/bin/bash

# A workaround to make mounted `/var/log` volume writable for supervisord.
sudo chmod 777 /var/log
[ -d /var/log/nginx ] || sudo mkdir /var/log/nginx
sudo chmod 777 /var/log/nginx
[ -d /var/log/apache2 ] || sudo mkdir /var/log/apache2
sudo chmod 777 /var/log/apache2
kaynenh commented 1 month ago

I don't know this needs working on here so this can likely be closed, but I wanted to post for posterity.

rfay commented 1 month ago

@kaynenh could you please open an issue in https://github.com/ddev/ddev/issues with the full details, including ddev debug test output? Thanks.