Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7.4 Project fails to start if php extensions are added #2092

Closed
Woeler opened this issue Feb 27, 2020 · 9 comments · Fixed by #2099, #2205 or #2207
Closed

PHP7.4 Project fails to start if php extensions are added #2092

Woeler opened this issue Feb 27, 2020 · 9 comments · Fixed by #2099, #2205 or #2207

Comments

@Woeler
Copy link

Woeler commented Feb 27, 2020

Describe the bug
The project fails to start when using PHP7.4 and adding any extra php extensions to the container. All errors and configs can be found below.

To Reproduce
Steps to reproduce the behavior:

  1. Create a fresh DDEV project of the type "php"
  2. Set the PHP version to 7.4
  3. Add webimage_extra_packages: [php7.4-ldap] to your config.yaml (I have also experienced the same bug with php7.4-gmp)
  4. Run ddev start
  5. See that the ddev project fails to start

Expected behavior
The container should start normally with php7.4-ldap installed and activated.

Screenshots
If applicable, add screenshots to help explain your problem.

Version and configuration information (please complete the following information):

  • Host computer OS and Version: Ubuntu 18.04
  • Docker version information (use docker version) and insert it here.
Client: Docker Engine - Community
 Version:           19.03.6
 API version:       1.40
 Go version:        go1.12.16
 Git commit:        369ce74a3c
 Built:             Thu Feb 13 01:27:49 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.6
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.16
  Git commit:       369ce74a3c
  Built:            Thu Feb 13 01:26:21 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.12
  GitCommit:        35bd7a5f69c13e1563af8a93431411cd9ecf5021
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
  • ddev version information (use ddev version)
DDEV-Local version      v1.13.0                                
commit                  v1.13.0                                
db                      drud/ddev-dbserver-mariadb-10.2:v1.13.0
dba                     phpmyadmin/phpmyadmin:5                
ddev-ssh-agent          drud/ddev-ssh-agent:v1.13.0            
docker                  19.03.6                                
docker-compose          1.25.0-rc4                             
os                      linux                                  
router                  drud/ddev-router:v1.13.0               
web                     drud/ddev-webserver:v1.13.0 
  • config.yaml contents for the misbehaving project
APIVersion: v1.13.0
name: my-typo3-org
type: php
docroot: public
php_version: "7.4"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
nfs_mount_enabled: false
provider: default
omit_containers: [db, dba]
webimage_extra_packages: [php7.4-gmp]
use_dns_when_possible: true
timezone: ""

Additional context
DDEV Output on ddev start

Failed to start my-typo3-org: web container failed: log=phpstatus FAILED /var/www/html: OK mailhog FAILED , err=container /ddev-my-typo3-org-web unhealthy: phpstatus FAILED /var/www/html: OK mailhog FAILED

How to temporarily resolve this issue
Add a file named docker-compose.test.yaml to your .ddev folder with the following content:

version: '3.6'
services:
  web:
    volumes:
      - type: tmpfs
        target: /run/php

Link to TYPO3 Slack conversation: https://typo3.slack.com/archives/C8TRNQ601/p1582730930033200

@rfay
Copy link
Member

rfay commented Feb 27, 2020

Thanks so much for opening this. I had marked the slack thread to review next week, but this is much better.

@rfay
Copy link
Member

rfay commented Feb 29, 2020

Oh, I know what this is. There was a change in upstream packaging. Broke my own server.

There is all kinds of fallout:

But also...

I imagine we'll need a v1.13.1 to fix this set of problems. Seems a lot of upstream disturbance lately.

@rfay rfay linked a pull request Feb 29, 2020 that will close this issue
@rfay rfay closed this as completed in #2099 Mar 1, 2020
rfay added a commit that referenced this issue Mar 1, 2020
* Rework php-fpm.conf per changes in debsury
See oerdnj/deb.sury.org#1334
Uses /run/php/phpx.x-fpm.pid (in directory /run/php)

* Improve TestExtraPackages to use php-gmp and clean up
rfay added a commit to rfay/ddev that referenced this issue Mar 1, 2020
…ev#2099)

* Rework php-fpm.conf per changes in debsury
See oerdnj/deb.sury.org#1334
Uses /run/php/phpx.x-fpm.pid (in directory /run/php)

* Improve TestExtraPackages to use php-gmp and clean up
@Woeler
Copy link
Author

Woeler commented Mar 1, 2020

Thank you for the quick action!

@rfay
Copy link
Member

rfay commented Apr 20, 2020

It's not exactly the same problem now, but similar enough that I'll reopen this. @spoonerWeb points out that the same basic thing is happening again today. It's actually different, this time it's

[20-Apr-2020 16:12:45] ERROR: [pool www] failed to chown() the socket '/run/php/php7.4-fpm.sock': Operation not permitted (1)

Luckily (thanks!) you found it soon enough we can sort this out for v1.14 release (and a v1.13.2)

If there isn't already a test for webimage_extra_packages we need to add one.

@rfay rfay reopened this Apr 20, 2020
@gilbertsoft
Copy link
Contributor

I would suggest to add a test for this issue.

@rfay
Copy link
Member

rfay commented Apr 20, 2020

There is a decent test, TestExtraPackages, but it only tests php 7.3, and it seems that more churn happens on 7.4

@gilbertsoft
Copy link
Contributor

Couldn't you run the tests for each php version? That's something we normally do in the php world with all supported versions for a package e. g. https://github.com/benjaminkott/bootstrap_package/blob/master/.github/workflows/ci.yml#L13
All ci platforms I know have this option but I'm not aware of your tests in detail, so no idea this could easy achieved or not...

@rfay
Copy link
Member

rfay commented Apr 20, 2020

Yes. We run lots of tests on multiple php versions. The difference here is that it's a huge build process; we're not talking about running under php, we're talking about updating all the packages that pertain to a given PHP version.

But if this had been using 7.4 instead of 7.3, we would have seen the nightly build break.

I am looking at how much trouble it is to make the test use at least supported PHP versions.

@rfay rfay linked a pull request Apr 20, 2020 that will close this issue
1 task
@rfay
Copy link
Member

rfay commented Apr 20, 2020

#2092 will fix this and should deal with the underlying issues, and improves test coverage.

rfay added a commit to rfay/ddev that referenced this issue Apr 20, 2020
rfay added a commit that referenced this issue Apr 20, 2020
* Use debian existing package conf, not new conf, fixes #2092
* Improve TestExtraPackages as early warning for all PHP changes
rfay added a commit that referenced this issue Apr 21, 2020
…f, not new conf) (#2207)

* Use debian existing package conf, not new conf, fixes #2092
* Improve TestExtraPackages as early warning for all PHP changes
* Backport circleci fix to pyenv global for pip3
* Make TestTimezoneConfig more robust for summertime CEST (#2136)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment