Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.With the latest Drush (8.1-dev), Provision (7.x-3.x), and Hostmaster (7.x-3.4) I am unable to install sites in Aegir on Drupal 8 platforms. Verifying a Drupal 8 platform works fine.
When I try to install a site, it fails with the following:
exception 'Drupal\Core\Config\StorageException' with message 'Write operation is not allowed.' in /var/aegir/platforms/drupal/8.0.6/core/lib/Drupal/Core/Config/InstallStorage.php:110
Stack trace:
#0 /var/aegir/platforms/drupal/8.0.6/core/lib/Drupal/Core/Config/Config.php(227): Drupal\Core\Config\InstallStorage->write('system.file', Array)
#1 /var/aegir/.drush/provision/platform/drupal/install_8.inc(157): Drupal\Core\Config\Config->save()
#2 /var/aegir/.drush/provision/platform/drupal/install_8.inc(170): install_main()
#3 /usr/share/drush/includes/drush.inc(78): include_once('/var/aegir/.dru...')
#4 /usr/share/drush/includes/engines.inc(520): drush_include('/var/aegir/.dru...', 'install')
#5 /var/aegir/.drush/provision/platform/provision_drupal.drush.inc(89): drush_include_engine('drupal', 'install')
#6 [internal function]: drush_provision_drupal_provision_install_backend()
#7 /usr/share/drush/includes/command.inc(366): call_user_func_array('drush_provision...', Array)
#8 /usr/share/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#9 [internal function]: drush_command()
#10 /usr/share/drush/includes/command.inc(185): call_user_func_array('drush_command', Array)
#11 /usr/share/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#12 /usr/share/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#13 /usr/share/drush/drush.php(12): drush_main()
#14 {main}
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Screenshot 2016-04-09 01.13.43.jpg | 1.3 MB | omega8cc |
| #9 | Screenshot 2016-04-09 01.13.51.jpg | 1.31 MB | omega8cc |
| #9 | Screenshot 2016-04-09 01.13.21.jpg | 1.35 MB | omega8cc |
| #9 | Screenshot 2016-04-09 01.13.08.jpg | 1.38 MB | omega8cc |
| #6 | provision_install_8-2702963-6.patch | 457 bytes | m.stenta |











Comments
Comment #2
m.stenta@ChrisZZ reported the same issue in https://www.drupal.org/node/1194602#comment-10438861
Comment #3
m.stentaProvision's install_8.inc attempts to set file paths on lines 153-157 (this is the line causing the exception):
(Those lines were added in this commit: http://cgit.drupalcode.org/provision/commit/?id=00aa3d12646b71d3641c3d96...)
It seems that
\Drupal::configFactory(), in this context, is creating an object of classInstallStorage- which extends the normalFileStorageclass, but overrides thewrite()method to make it completely useless:(Link to that class's declaration: http://cgit.drupalcode.org/drupal/tree/core/lib/Drupal/Core/Config/Insta...)
I'm thinking that maybe something changed in Drupal core since Provision's commit http://cgit.drupalcode.org/provision/commit/?id=00aa3d12646b71d3641c3d96... - and now it no longer works. Not really sure yet.
Comment #4
m.stentaWell, I tried commenting out those lines, and it fixed the exception.
But now something new is going wrong:
Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function user_load() in /var/aegir/.drush/provision/platform/drupal/install_8.inc, line 159Is D8 site install working for anyone? Or is it just mine that's broken?
Comment #5
m.stentaCreated new issue for that one - posting a fix separately: #2703017: D8 install fails with "Call to undefined function user_load()"
Comment #6
m.stentaOk, actually, it may be that the two errors are actually related. Closing #2703017: D8 install fails with "Call to undefined function user_load()" as a duplicate.
I was able to fix both issues by adding a
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);at line 153.Patch attached for review.
Comment #7
omega8cc CreditAttribution: omega8cc commentedI can't reproduce this. Just tested with Provision/Hostmaster 3.x head, using Drush 8.x (head) and it works for latest Drupal 8.0 and 8.1
Comment #8
m.stentaReally? Hmm. What could be different about my setup I wonder...
Comment #9
omega8cc CreditAttribution: omega8cc commentedI have tested this using BOA stack, but it is basically Aegir 3.x head with Drush 8.x head
Comment #10
omega8cc CreditAttribution: omega8cc commentedMaybe it is literally what the error is about -- write permissions in the codebase?
Comment #11
m.stentaI'm using the Aegir Puppet Module (https://www.drupal.org/project/puppet_aegir) - so it is a standard install in that regard. As the aegir user, I downloaded the packaged Drupal 8 release from https://ftp.drupal.org/files/projects/drupal-8.0.6.tar.gz via wget and unpacked it into /var/aegir/platforms/drupal/8.0.6. All of the files are owned by the aegir user. Verifying the platform works fine. Creating a site fails - throwing the exception described above.
Are there any requirements for Drupal 8 platform file permissions that I might have missed?
I think the problem is deeper... but I'm not sure why it's working for you and not for me. :-/
In my case, adding
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);(right before the code described in #3 above) solves the problem - which suggests that drush has not bootstrapped the newly created site, and therefore the code that follows (including user_load()) is not operating in an active Drupal site context.So the question is: why is your new site bootstrapped already when it gets to line 153 of install_8.inc?
Comment #12
m.stentaOk.... well... this is a face-palm scenario.
Long story short... Provision works perfectly. It was my installation that was the problem. It was a simple typo in the file path that I told Aegir to look for the platform in. Aegir dutifully looked for the non-existent platform path, didn't find it, and created all the above errors.
Apologies for wasting your time @omega8cc. Your comment #10 was correct. :-)