"Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function succeed() on a non-object in /var/aegir/.drush/provision/http/delete.provision.inc, line 15"

Provision: 6.x-2.0-beta2
Hosting: 6.x-2.0-beta2
Drush: 5.9

The code is

d()->service('http')->delete_config('platform')
        ->succeed('Deleted platform configuration file', 'success')
        ->fail('Failed to delete platform configuration file', 'DRUSH_PERM_ERROR');
CommentFileSizeAuthor
#7 provision.drush-integration.2029799-7.patch1013 byteshelmo

Comments

anarcat’s picture

Priority: Normal » Major
ergonlogic’s picture

Status: Active » Postponed (maintainer needs more info)

I haven't been able to reproduce this. Anyone else seeing it?

anarcat’s picture

is this on a remote platform?

liam mcdermott’s picture

Status: Postponed (maintainer needs more info) » Active

I haven't been able to reproduce this. Anyone else seeing it?

Yes! :)

is this on a remote platform?

Yes:

/var/aegir/config/server_ip1056112/nginx/vhost.d/bar.com has been removed from remote server ip-10-56-1-12.
/var/aegir/config/server_ip1056111/nginx/vhost.d/bar.com has been removed from remote server ip-10-56-1-11.
Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function succeed() on a non-object in /var/aegir/.drush/provision/http/delete.provision.inc, line 6

Hopefully this is enough information to mark the bug active. Additionally, the site configuration files (on both the Aegir server and remote) are deleted, while the platforms/foo/sites/bar.com/* files and directory remain intact (as far as I can tell).

liam mcdermott’s picture

Something else that may be of interest: I disabled the site prior to attempting to delete it, I'm guessing that's why the configuration files were removed.

Also, the database for the site was deleted by Aegir at some point during this process and re-enabling the site does not bring it back.

lieb’s picture

I just encountered this error.
- New install of Aegir-6.x-2.0-rc4.
- Created some new platforms using 'drush provision-save', and 'drush hosting-import' via a fabric script.
- Platforms verified fine and show normally in the front-end.
- Platforms were configured to use a pack server (which also verified fine in the front-end)
- Tried to delete them from the front-end and received the error.

Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function succeed() on a non-object in /var/aegir/.drush/provision/http/delete.provision.inc, line 15

Did not yet dive into code or try any further debugging.

helmo’s picture

Status: Active » Needs review
StatusFileSize
new1013 bytes

For the record: @Liam McDermott: You talk about deleting a site, #0 about deleting a platform.

I've narrowed it down to cluster and pack, both wich I currently don't have a working test setup.


  function delete_config($config) {
    $this->_each_server(__FUNCTION__, array($config));
  }

The _each_server() method returns a boolean, not an object ... maybe adding "return $this;" to the delete_config() methods would help. This patch is an untested guess...

anarcat’s picture

@lieb can you test that patch?

lieb’s picture

Sorry. Just getting to the testing now. Thanks.

lieb’s picture

Deleting a sites looks good. I still need to test deleting platforms.

Environment:
- aegir-6.x-2.0-rc4
- Multiserver environment with 3 packs of 2 servers each

Tested:
- Deleted sites from front-end
- Deleted sites using drush provision-delete

Confirmed:
- Command completes with no errors
- Site is removed from platform/sites directory
- Site configuration is removed from config/server_x/apache/vhost.d on each server in the pack
- Drush site alias is removed
- Database was dropped

This is with sites. I will test platforms and servers as well.

lieb’s picture

Version: 6.x-2.0-beta2 » 6.x-2.0-rc4
Status: Needs review » Reviewed & tested by the community

I have confirmed deleting a platform works fine. I believe this issue is resolved and the patch is good to go.

helmo’s picture

Status: Reviewed & tested by the community » Fixed

thanks all, committed as bb24fc803177f3a76e1c591b161e461a35849264

Status: Fixed » Closed (fixed)

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

  • Commit bb24fc8 on 6.x-2.x, 7.x-3.x, 6.x-2.x-backports, dev-helmo-3.x by helmo:
    Issue #2029799 by helmo | lieb: Fixed Error deleting a platform: Call to...