WordPress / meta-environment

A collection of scripts that provision the official WordPress.org websites into a Varying Vagrant Vagrants installation.
189 stars 72 forks source link

Issues with Cavalcade #153

Open dhruvkb opened 3 years ago

dhruvkb commented 3 years ago

The step involving copy of Cavalcade config cavalcade-wordpressorg.conf i.e.

cp -f "$PROVISION_DIR/cavalcade-wordpressorg.conf" "/etc/init/cavalcade-wordpressorg.conf"

fails due to the directory structure not being present. The error message says "cp: cannot create regular file: No such file or directory". This can be fixed by a mkdir operation before the cp operation (#154).

With that change, the build goes a long way ahead but fails on the line

service cavalcade-wordpressorg restart

with the error message: "Failed to restart cavalcade-wordpressorg.service: Unit cavalcade-wordpressorg.service not found"

dhruvkb commented 3 years ago

Just an update, everything else seems to work normally if I comment out the service restart operation in two places.

tomjn commented 3 years ago

@dhruvkb which places? It's probable that the cavalcade implementation hasn't been updated in a very long time and that VVV has since switched to Ubuntu 18 and then 20 which use slightly different mechanism for services. It only works for you in the sense that cavalcade isn't running

dhruvkb commented 3 years ago

You're right about Cavalcade not running. I just meant that commenting out Cavalcade allows the remaining provisioning process to complete, for anyone who was looking for a workaround.

It does seem like an Ubuntu version issue because now there's a different folder /etc/init.d which I assume is also the reason cp was failing.

herregroen commented 3 years ago

Not sure if it's related but provisioning is now consistently failing with the message fatal: cannot change to '/etc/cavalcade': No such file or directory.

Going by the logs the last thing to happen before that is the updating of WP-CLI plugins here: https://github.com/WordPress/meta-environment/blob/master/wordpressorg.test/provision/vvv-init.sh#L48

Given the final output is from WP CLI I expect that the cavalcade plugin is already installed and that, or something else, is attempting to trigger the Cavalcade runner which at that point isn't installed yet.

tomjn commented 3 years ago

This PR might help https://github.com/WordPress/meta-environment/pull/158, part of the problem is the cavalcade service, and the installation of cavalcade to /etc/cavalcade, I've made a minor refactor to try and handle the process better, but it requires testing. I'd be really appreciative if you could try it out and tell me if it helps and what the results are.

For reference, if the service fails to restart, it should now report that in the log rather than exiting

herregroen commented 3 years ago

Initial testing run fails with the message fatal: destination path '/srv/www/wordpress-meta-environment/wordpressorg.test/public_html/wp-content/mu-plugins/cavalcade' already exists and is not an empty directory..

Figured that may be due to previous failed runs so ran a vagrant destroy && vagrant up which unfortunately results in the same error message.

Then fully removed the www/wordpress-meta-environment directory and provisioned again to ensure a truly clean environment and that does complete provisioning without failing.

It does however still show the message: Failed to restart cavalcade-wordpressorg.service: Unit cavalcade-wordpressorg.service not found.

tomjn commented 3 years ago

Provisioning is no longer blocked, though the cavalcade service still needs fixing