Hello,

I just try to update to Drupal 7.4 with the drush up command but I have this big problem : http://pastebin.com/FfkPY9cZ

It's a multisite install and I have do the command in : sites/mysites.com

I have done something wrong?

Thx

CommentFileSizeAuthor
#12 drush-1204862.patch1.12 KBjonhattan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mordonez’s picture

same problem
+1 subscribing

chaosmind’s picture

Same here. blew away my D7 (stupidly in a folder named "drupal-6.17", but was D7.2), left only sites folder behind:

Index of /drupal-6.17

Name Last modified Size Description
Parent Directory -
drupal-7.4/ 28-Jun-2011 17:05 -
sites/ 02-Jun-2010 12:00

30equals’s picture

got the same problem except that my site was placed in a folder 'drupal-7.4'

moshe weitzman’s picture

Component: User Commands » PM (dl, en, up ...)
Assigned: Unassigned » jonhattan

Perhaps jonhattan or greg can have a look. Does sound critical.

MrHaroldA’s picture

Same issue here. Drush 4.4 couldn't update D7.2 to D7.4. After a manual update to D7.4 I now have the same issue updating to D7.7.

$ drush up drupal
Refreshing update status information ...
Done.
Update information last refreshed: do, 28/07/2011 - 11:11

Update status information on all installed and enabled Drupal projects:
...
 Drupal core                     7.4                    7.7               SECURITY UPDATE available                
...

Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Drush command terminated abnormally due to an unrecoverable error.                                                                         [error]
Error: require_once(): Failed opening required '/var/www/d7.local/includes/errors.inc' (include_path='.:/usr/share/php:/usr/share/pear')
in /var/www/d7.local/includes/bootstrap.inc, line 1971

$ ls -la
total 16
drwxr-xr-x  4 harold   harold   4096 2011-07-28 11:11 .
drwxrwxr-x 24 www-data www-data 4096 2011-07-20 15:49 ..
drwxr-xr-x  9 harold   harold   4096 2011-07-28 11:11 drupal-7.7
drwxr-xr-x  4 harold   harold   4096 2011-06-01 11:40 sites
rogerpfaff’s picture

this is definitely critical. I ran in this error too and it's annoying to find your installation deleted. Much more critical is no reaction to this after 28 days.

federico.bebber’s picture

same here, tried also with old builds and get the same scenario.

jonhattan’s picture

I'm unable to reproduce this.

Ideally we should redefine DRUPAL_ROOT before moving files. It is not possible in php.
A workaround could be to require_once DRUPAL_ROOT . '/includes/errors.inc' before moving drupal files. That's done at commands/pm/updatecode.drush.inc around line 275.

jonhattan’s picture

Version: 7.x-4.4 »
Status: Active » Postponed (maintainer needs more info)

Do you have /var/www and /home in different volumes? It seems in my past life I did a patch for this #965878: Cross-volume backup failure. Test that please.

federico.bebber’s picture

so with drush on same dir and "--backup-dir" seems working.
you where right.

MrHaroldA’s picture

Status: Postponed (maintainer needs more info) » Active

drush up --backup-dir=/var/www/drush_backup fixed it for me too! /home and /var are different volumes, as any Linux user should have.

Bumping it back to 'active' since we now have a reason why things don't work.

@jonhattan: I still run 4.4 so I'm not able to test that patch.

Edit: I've installed Drush into /home/user/drush.

jonhattan’s picture

Title: drush up can't update D7 and make backups in home instead to do it in the parent directory » drush up can't update D7 because of drupal error handler intervention.
Status: Active » Needs review
FileSize
1.12 KB

I've been able to reproduce the error with --backup-dir to a dir in other volume. From this point on I've had have the chance to do something...

The hypothesis in #8:
1. add require_once DRUPAL_ROOT . '/includes/errors.inc'; to drush_pm_updatecode().
2. comment out the several occurences of above line in includes/bootstrap.inc. (sadly require_once needs the file to be present in the filesystem even if it has been already included).
3. remove @ from @drush_op('rename'...)

this way we can actually see the error:

Calling is_readable(/tmp/drupal-7.4/drupal-7.7) [3.68 sec, 26.3 MB]                                                   [debug]
Calling is_writable(/media/othervolume/drush-backups/d74/20110802161326) [3.69 sec, 26.3 MB]                          [debug]
Calling rename(/tmp/drupal-7.4/drupal-7.7, /media/othervolume/drush-backups/d74/20110802161326/drupal) [3.69 sec,     [debug]
26.3 MB]
WD php: Warning: rename(): The first argument to copy() function cannot be a directory in drush_op() (line 698 of [warning]
/usr/src/drush/includes/drush.inc). [3.73 sec, 26.32 MB]
WD php: Warning: rename(/tmp/drupal-7.4/drupal-7.7,/media/othervolume/drush-backups/d74/20110802161326/drupal): No[warning]
such file or directory in drush_op() (line 698 of /usr/src/drush/includes/drush.inc). [3.79 sec, 26.32 MB]
Calling _drush_recursive_copy(/tmp/drupal-7.4/drupal-7.7,                                                             [debug]
/media/othervolume/drush-backups/d74/20110802161326/drupal) [3.79 sec, 26.31 MB]
Calling drush_delete_dir(/tmp/drupal-7.4/drupal-7.7) [4.77 sec, 26.31 MB]   

... no error!

The error is using drupal's error handler, as it requires a file we've moved out. After a quick look it seems php only allows one error handler, and the last defined overwrite the former. Drupal is defining its error handler and overriding drush's one. Patch attached remediate this situation and indeed fixes this issue, at least in my testbed.

brunorios1’s picture

sub

rolfmeijer’s picture

subscribe

akanouras’s picture

subscribing

msonnabaum’s picture

Status: Needs review » Reviewed & tested by the community

Recreated this issue locally and #12 does indeed fix it for me. Looks good.

moshe weitzman’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

ok, committed as 6ce34ee.

msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Backported.

Status: Fixed » Closed (fixed)

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

Drave Robber’s picture

Version: » All-versions-4.x-dev
Status: Closed (fixed) » Active

This hits again.

drush status and drush up -d -v output: http://pastebin.com/TeJZD9iR

/var and /home are on different partitions.
Since the last time it worked I have a) reluctantly upgraded Ubuntu to 11.10 :D b) removed Bazaar as I'm not really using it.

Will poke it a bit more but I'm not much of a sysadmin :)

TIA for any suggestions.

Drave Robber’s picture

Status: Active » Fixed

sudo pear upgrade drush/drush fixed it. :)

Sorry for the fuss - I definitely need more coffee. (or not touching anything serious before 8 a.m.)

Status: Fixed » Closed (fixed)

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