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

Issues with Cavalcade #153

Open
dhruvkb opened this issue May 20, 2021 · 7 comments
Open

Issues with Cavalcade #153

dhruvkb opened this issue May 20, 2021 · 7 comments

Comments

@dhruvkb
Copy link
Member

dhruvkb commented May 20, 2021

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 dhruvkb changed the title Issue during copy of Calvacade config Issues with Calvacade May 20, 2021
@dhruvkb dhruvkb changed the title Issues with Calvacade Issues with Cavalcade May 20, 2021
@dhruvkb
Copy link
Member Author

dhruvkb commented May 20, 2021

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

@tomjn
Copy link
Collaborator

tomjn commented May 20, 2021

@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
Copy link
Member Author

dhruvkb commented May 20, 2021

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
Copy link

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 added a commit that referenced this issue May 26, 2021
Refactors cavalcade provisioning to:

 - remove duplication
 - handle when the service fails to restart
 - better handle folder creation
 - avoid potential permission issues for some files
 - prevent parameter expansion on the changed lines that could cause sites with spaces in their folder names to fail
@tomjn
Copy link
Collaborator

tomjn commented May 26, 2021

This PR might help #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
Copy link

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 added a commit that referenced this issue May 28, 2021
* WordPress.org: #153 - cavalcade provisioning failures

Refactors cavalcade provisioning to:

 - remove duplication
 - handle when the service fails to restart
 - better handle folder creation
 - avoid potential permission issues for some files
 - prevent parameter expansion on the changed lines that could cause sites with spaces in their folder names to fail

* Fix cavalcade plugin updating and improve log messages
@tomjn
Copy link
Collaborator

tomjn commented May 28, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants