Skip to content

Conversation

@joshtrichards
Copy link
Member

We pull poll the image version sand installed version strings by calling php from the command line.

When this fails -- such as when a PHP module has problems loading (e.g. see #2509) we the version strings aren't populated correctly and the output is very confusing because the error output mangles things:

Can't start Nextcloud because the version of the data (
Warning: Cannot load module "memcached" because required module "igbinary" is not loaded in Unknown on line 0
Warning: Cannot load module "redis" because required module "igbinary" is not loaded in Unknown on line 0
32.0.2.2) is higher than the docker image version (
Warning: Cannot load module "memcached" because required module "igbinary" is not loaded in Unknown on line 0
Warning: Cannot load module "redis" because required module "igbinary" is not loaded in Unknown on line 0
32.0.3.2) and downgrading is not supported. Are you sure you have pulled the newest image version?

This makes the version string loading much more robust. Specifically it adds:

  • Exit code checking
  • Error message detection in output
  • Version format validation

Catches:

  • PHP crashes/fatal errors (exit code)
  • PHP warnings/errors that don't cause non-zero exit (grep)
  • Unexpected output format (version regex)

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants