omega8cc / boa

Barracuda Octopus Aegir 5.4.0
https://omega8.cc/compare
394 stars 75 forks source link

Varbase 10 on BOA - Content Directory Missing #1802

Open g33k-g1rl opened 3 weeks ago

g33k-g1rl commented 3 weeks ago

Hi there,

Thank you for all the awesomeness that BOA provides! I just did my first upgrade and I had 0 downtime, it was a wonderful experience!

I tried to install the Varbase 10 by adding VBX to the platforms.info file. I was able to successfully install the platform by running the Octopus upgrade script. I'm using Devuan 5.10.0-32-amd64 with Nginx/1.27.1 and php 8.2.

When I try to add a vanilla website, it fails with this error: Site installation caused an exception: The "/data/disk/lms/distro/002/varbase-10.0.0-10.3.1/docroot/modules/contrib/varbase_media/recipes/default/content" directory does not exist.

I tried creating an empty directory and installing another vanilla site and I got the same error.

I have reached out on the Varbase slack support channel as well. Any pointers would be appreciated!

P.S. Possibly unrelated, I was able to successfully install a Drupal 10 platform and website as well as Opigno platform and website.

7o7o commented 3 weeks ago

Hi,

I'm having the same issue: /distro/001/varbase-10.0.0-10.3.1/docroot/modules/contrib/varbase_components/recipes/default/content" directory does not exist.

In addition, I'm also having trouble with the Social platform from BOA too: Drush command terminated abnormally due to an unrecoverable error.

In the case of Social, I can add a custom vanilla Social platform correctly but when I try to install the site, the same error occurs.

I am able to install sites on the same platform on an old BOA and everything works. The version of the old BOA is BOA-5.1.0-head on Debian/bullseye. I haven't upgraded that one yet just in case. After many builds of new BOAs with latest version BOA-5.4.0-lts on Devuan/daedalus, I haven't been able to create a site on any Social platform.

Boa info gist

omega8cc commented 3 weeks ago

We are aware of the issues with Varbase and Social latest versions. We didn't have time to debug these problems and decided to just include them for testing purposes. Many other distros just work, including a few we are going to add soon, just not these two. Perhaps it's something which changed in their installation profiles (Varbase started using new Drupal recipes recently and we don't know if we are compatible yet), or maybe it's a regression caused by the fact that we now allow to dynamically switch PHP-CLI used by Aegir. We don't know but we will take a look once we can.

Not sure what you mean by "the same platform on an old BOA", though, as these new versions were not available in older BOA.

7o7o commented 3 weeks ago

Sorry for the confusion. On older BOAs I am able to generate custom Social platforms (Social 12.1.2) and I can later add sites to it. I have not been able yet to do the same on BOAs generated these last days.

I haven't tried BOAs default platforms on the old BOA, because I was able to generate my custom ones and add sites to them later.

If I can share any useful info from the old BOA that could help, just let me know. I think I haven't done much there anyway. On extras I have this: _XTRAS_LIST="ADM CSF FTP CSS DCS"

boa info more of old BOA

Thanks.

omega8cc commented 3 weeks ago

If you could try to build 12.4.2 on the old server and confirm if it works without issues it would very helpful. We have a test instances upgraded to current BOA with 12.2.2 installed before and it fails too, with Error: Call to a member function fromArray() on null related to install_send_welcome_mail()

7o7o commented 3 weeks ago

I just generated a vanilla social platform on Drupal 10.2.6 - Social 12.4.2 with command: composer create-project goalgorilla/social_template:dev-master social-1242 --no-interaction

And it worked perfectly. I added a new site to the platform with no issues and reset password and clone tasks also work. I haven't tried migrating, but everything seems to be ok. Everything is green!

I will try these days adding some modules to build a more complex platform but at least vanilla Social 12.4.2 seems to work ok in the old BOA.

If I can help with any other information/debugging just let me know. I learn a lot by doing that. Thanks.

g33k-g1rl commented 3 weeks ago

I'm having the same error message with the latest lts version of BOA with the Social installation profile. I cannot downgrade to an older version of BOA for testing as I have live Drupal websites running on the current version in a different instance.

7o7o commented 3 weeks ago

One tiny difference I've found is on static/control/multi-fpm.info. On the old BOA I have 8.2 and on the new one I have 8.3.

Status report comparison: OLD BOA Drupal: 7.99 PHP: 8.1.27 PHP memory limit: 512M Web server: ApacheSolarisNginxD10CE/1.24.0

NEW BOA Drupal: 7.101 PHP: 8.1.29 PHP memory limit: 1024M Web server: ApacheSolarisNginx/1.27.1

Same Database system versions in both cases (5.7.44-48).

PHP.ini comparison: OLD BOA System: 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 Build system: 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux

NEW BOA System: 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 Build system: 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 GNU/Linux

Drush status gives the same version of drush (8.4.12) in both cases.

omega8cc commented 3 weeks ago

Thank you all for the reports and detailed information. Based on the data, it appears that the issue is likely due to an unexpected regression in the current BOA release. Given the complexity of the system, with numerous components that need to work seamlessly together while handling various exceptions, it's possible that something was inadvertently overlooked during the recent updates.

Rest assured, we are working on identifying the root cause and expect to resolve the issue promptly. We appreciate your patience and continued support as we address this.

Thank you again for your understanding.

Sent with GitHawk

jano-01 commented 2 weeks ago

I don't know if theese observations will help...

There is a way to remove the missing folder error.

cd to correct platform varbase-xxxx/docroot find -name recipes | awk '{print $1"/default/content"}' | xargs mkdir chown -R o1 * repair platform

But it will not help because then a new problem arises, not enough memory for drush and after that is fixed you get: Drush command terminated abnormally due to an unrecoverable error which appears after at the line after the Login url is presented. In the syslog you probably find: Aug 31 17:55:05 boa mysqld[49744]: Unknown database 'varbase10boaxxxx' and: Aug 31 17:55:06 boa mysqld[49744]: Access denied for user 'intntnllyInvalid'@'localhost' (using password: NO) and: Aborted connection 31939 to db: 'o1boaxxxxxxxxxx' user: 'o1boaxxxxxxxxxx' host: 'localhost' (Got an error reading communication packets)

It would help in debuging purpose to have a timestamp in the task window when a site is created to correlate to the logs.

If you don't create the content folders, there are no problems with drush command terminating and a site is created.

omega8cc commented 2 weeks ago

Have you checked php error logs? There should be more pointers to diagnose the problem.

Sent with GitHawk

omega8cc commented 2 weeks ago

Besides, these “missing” directories should be created automatically by the composer build process. It’s not feasible to expect that codebase will write them themselves. So it looks like distribution problem I guess.

Sent with GitHawk

jano-01 commented 2 weeks ago

Have you checked php error logs? There should be more pointers to diagnose the problem.

Sent with GitHawk

Tested, varbase10 and varbase9 "from octopus" and also a downloaded varbase 10 from static. And by the look of the logs the problem seems to be sending the welcome mail. And that could be correct, no mails are sent even though the login link is generated:

Checked the PHP-logs now: [31-Aug-2024 13:08:42 UTC] Error: Call to a member function fromArray() on null in /data/disk/o1/distro/001/varbase-9.1.3-10.2.6/docroot/modules/contrib/symfony_mailer/src/MailManagerReplacement.php on line 89 #0 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(42): Drupal\symfony_mailer\MailManagerReplacement->mail()

1 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(182): install_send_welcome_mail()

2 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(185): install_main()

3 /opt/tools/drush/8/drush/includes/drush.inc(78): include_once('...')

4 /opt/tools/drush/8/drush/includes/engines.inc(520): drush_include()

5 /data/disk/o1/.drush/sys/provision/platform/provision_drupal.drush.inc(193): drush_include_engine()

6 /opt/tools/drush/8/drush/includes/command.inc(422): drush_provision_drupal_provision_install_backend()

7 /opt/tools/drush/8/drush/includes/command.inc(231): _drush_invoke_hooks()

8 /opt/tools/drush/8/drush/includes/command.inc(199): drush_command()

9 /opt/tools/drush/8/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()

10 /opt/tools/drush/8/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()

11 /opt/tools/drush/8/drush/drush.php(12): drush_main()

12 {main}

[31-Aug-2024 16:00:38 UTC] Error: Call to a member function fromArray() on null in /data/disk/o1/static/varbase-10.0.1-10.3.1/docroot/modules/contrib/symfony_mailer/src/MailManagerReplacement.php on line 89 #0 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(42): Drupal\symfony_mailer\MailManagerReplacement->mail()

1 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(182): install_send_welcome_mail()

2 /data/disk/o1/.drush/sys/provision/platform/drupal/install_10.inc(185): install_main()

3 /opt/tools/drush/8/drush/includes/drush.inc(78): include_once('...')

4 /opt/tools/drush/8/drush/includes/engines.inc(520): drush_include()

5 /data/disk/o1/.drush/sys/provision/platform/provision_drupal.drush.inc(193): drush_include_engine()

6 /opt/tools/drush/8/drush/includes/command.inc(422): drush_provision_drupal_provision_install_backend()

7 /opt/tools/drush/8/drush/includes/command.inc(231): _drush_invoke_hooks()

8 /opt/tools/drush/8/drush/includes/command.inc(199): drush_command()

9 /opt/tools/drush/8/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()

10 /opt/tools/drush/8/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()

11 /opt/tools/drush/8/drush/drush.php(12): drush_main()

12 {main}

And i found a patch for the MailManagerReplacement.php: https://git.ixiam.com/dev/civi-go/civigo_patches/-/blob/master/symfony_mailer/src/1.4.0-MailManagerReplacement.php.patch?ref_type=heads

Editing both varbase 10 and varbase 9 with the patch and then the BO-Aegir managed to create a Varbase 9 site from. Though there are still problems with the Aegir 10, both the static and Octopus version:

Site installation caused an exception: /data/disk/o1/static/varbase-10.0.1-10.3.1/docroot/modules/contrib/varbase_media_demo/recipes/default/content/media/781b83a4-14bb-4359-8107-c011bb039721.yml: field_media_oembed_video=The provided URL does not represent a valid oEmbed resource. and then: Drush command terminated abnormally due to an unrecoverable error. Error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 7514099712 bytes) in /opt/tools/drush/8/drush/includes/drush.inc, line 1379

so the: field_media_oembed_video:

  value: 'https://www.youtube.com/watch?v=bTqVqk7FSmY'

is not a correct URL: i have tested it and it exists

So for the people that like to create a Varbase 9 and to get closer to Varbase 10 site with BOA:

There is a way to remove the missing folder error. cd to correct platform varbase-xxxx/docroot find -name recipes | awk '{print $1"/default/content"}' | xargs mkdir chown -R o1 * repair platform And then add the MailManagerReplacement.php-patch to the Varbase 9 and the Varbase 10 platforms.

jano-01 commented 2 weeks ago

Changing: 'https://www.youtube.com/watch?v=bTqVqk7FSmY' to 'https://youtu.be/bTqVqk7FSmY?si=lkDEtvzFB9XiiwmF' made the Varbase version 10 site install on both octopus 10.0.0 and the static 10.0.1 version.

omega8cc commented 2 weeks ago

Nice investigation, thanks for sharing!

omega8cc commented 2 weeks ago

BTW, the way we have "fixed" this before in BOA for Drupal 10 was disabling sending welcome emails entirely, simply to avoid tracking and patching Drupal 10 core beyond the minimum required for Drush 8 fork compatibility.

Here it has been disabled: https://github.com/omega8cc/provision/commit/d9973a72ae5626a0ce03559d7d1c0ccb187478c3

And it sneaked back in: https://github.com/omega8cc/provision/commit/93cdbe2da31b8ae45431d23bd6f8ed0a02418014

I guess we should disable it again, since sending these emails while the one-time login link is not working anyway because we clear cache in the post-installation process to avoid WSOD etc is useless anyway.

omega8cc commented 2 weeks ago

This has been done in these commits:

https://github.com/omega8cc/provision/commit/445b82a7f0cf58c63508247dc829cb2117c2f938 https://github.com/omega8cc/provision/commit/b847045421da0a081ed08ee79661ba4696544a21

omega8cc commented 2 weeks ago

This worked great with both current and soon to be added distros.

For the record, we use slightly modified command:

find -name recipes | awk '{print $1"/default/content"}' | xargs -I {} mkdir -p {}

screenshot 2024-09-02 at 01 24 54