Initiated a delete site task on one site. While the task queue was blue proceeded to disable a second site on same platform. The task queue turned green for both tasks at the same time. However, the disabled site task buttons are not correct.

The disable task run button is active, the enable and the delete task run buttons are inactive.

Viewing the disable task log it completed successfully. A backup .gz file exists and the vhost has been redirected.

Comments

Anonymous’s picture

I've reproduced this just on one site (no other concurrent tasks running at the time). Disable task completes successfully but the status of the site remains 'Enabled' (1 in hosting_site status column). Thus due to the enabled status, the Delete task is not available.

It seems to have failed to run the post_hosting_disable_task hook in Hosting (no second backup was created, and the status was not changed). I wonder if this is an issue with Drush 3? or $data['context']['backup_file'] was not saved

Anonymous’s picture

It's also a nice random bug (reminds me of the IPC issue). Since the status didn't change, the Disable task is capable of being run again, and on second run, it worked as expected. Other site disables work first-time too. yuk.

adrian’s picture

Title: UI not updated following disable task » Post task run integration with hosting failing randomly. possible race condition.
Priority: Normal » Critical

saw this a couple of times.

with migrate tasks even!

it didn't upgrade the platform afterwards, causing verify to fail.

i *think* what might be happening is that there's a race condition with cron.

adrian’s picture

I committed this fix, but we can't confirm this is fixed until the new release is out and this doesnt ever happen again.

http://git.aegirproject.org/?p=hostmaster.git;a=blobdiff;f=modules/hosti...

adrian’s picture

Status: Active » Needs work
adrian’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 9d3edee on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by adrian:
    Possible fix for #785534  - a race condition between cron and task...

  • Commit 9d3edee on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by adrian:
    Possible fix for #785534  - a race condition between cron and task...