Use case: run drush sup. Find a bug in a module. Fix it. Changes happen on live site. Run drush sup again; this time you want to keep the code you fixed from last time rather than download new code.

This patch also makes si upgrade to 7.0 (whatever is recommended) rather than 7.x (head).

Probably close, but I need to test it more.

Edit: Fixed typo; said 'si' where it should have said 'sup'; this issue is about site-upgrade, not site-install.

Comments

greg.1.anderson’s picture

Title: Allow sdrush si to be run multiple times, re-using same code each time » Allow drush si to be run multiple times, re-using same code each time
Status: Needs work » Needs review

This patch does quite a lot.

First off, a bug is fixed with non-core modules. The current version of sup tries to download the 7.x version of a module using its module name instead of its project name. With this patch, the project name is looked up from the module name first.

Also, a translation table for projects is introduced. The upgrade information from http://drupal.org/node/895314 is now encoded into drush site-upgrade. If you are using a d6 contrib module that is now standard in core, sup will no longer attempt to download it. sup can also now handle projects that change names in d7 (don't know of any), and it can handle modules that change names (like content -> cck). Also, if a given module needs any special action (e.g. special steps to do data conversion), sup now warns the user about that up-front too. If you have any warnings, you will be prompted before the upgrade begins.

sup now upgrades to the recommended release of Drupal 7.x rather than the latest dev release.

sup now enables the optional core modules that were enabled in the source site.

As mentioned above, you can run sup more than once on the same site, keeping the same code every time (e.g. if you made fixes to a contrib module, or perhaps checked in the upgraded site to a vcs, and then later want to check out the code and use sup to pull in and re-upgrade the db, etc.)

Tested and seems to work pretty well.

mlncn’s picture

For running site-upgrade, site-upgrade still gives three options:

Drupal site already exists at /home/ben/code/anjali7/web. Would you like to:
[0] : Cancel
[1] : Delete the existing site and start over
[2] : Re-use the existing site, skipping the Drupal download and updatedb
steps

And on picking [2]
Move /home/ben/code/anjali7/web/sites/all/modules to [ok]
/home/ben/code/anjali7/web/sites/all/sites_all_modulesYhD1Pv prior to
updatedb on Drupal core.

What is it doing that i don't get from putting the D6 database right into D7? And is it affecting the database of the site i'm starting from? if so, that should be noted.

Also i'm getting access denied for my user on that database, but i'm sure that's my problem-- i guess it's trying to drop the database?

i'll be back with more useful input soon i hope

greg.1.anderson’s picture

Drush si does not affect the database on the source side. You can use --db-su and --db-su-pw to specify the username and password of the database superuser if you have having permission problems.

mlncn’s picture

but does drush upgrade-site affect its source site? i'm trying to figure out how vigorously i need to clean every database related before trying again.

i can't get an upgrade to run any which way this week. Last week i was able to do so with drush updatedb. All we've done is *disable* modules on the source site, yet that's the one thing that's changed.

So can't for the life of me figure out what's up.

repeatedly getting a table role_permission already exists error.

and last try from the d6 site (with the strange path in the command being where i installed drush master and patched it with this patch) --

/home/ben/code/anjali7/drush/drush site-upgrade @anjali.dev7 --db-su root --db-su-pw toor --no-cache

is hanging, for the past hour or so.

greg.1.anderson’s picture

There isn't enough information in your post for me to help you with your problem. Please do not put any more support requests on this issue; I would like to keep this thread limited to testing this patch. Make a new issue, and follow the reporting guidelines at the top of the page.

mlncn’s picture

Apologies, i wasted your time and mine because i somehow dirtied my source site DB, and didn't wipe the tables before pulling it fresh (or so i thought) from production.

Apologies also, i'm testing site-upgrade and not site-install directly.

When running the patched Drush:

drush --debug site-upgrade @anjali.dev7
Immediately after the database drop and import succeeds:

Calling copy(, sites//settings.php)
WD php: copy(): Filename cannot be empty in                          [error]
/home/ben/code/anjali7/drush/includes/drush.inc on line 697. [160.7
sec, 31.54 MB]
Could not create a temporary multisite  [160.7 sec, 31.53 MB]        [error]
Calling is_readable(/home/ben/code/anjali7/web/sites/all/sites_all_modulesDIYJbO)
Calling is_writable(/home/ben/code/anjali7/web/sites/all)
Calling rename(/home/ben/code/anjali7/web/sites/all/sites_all_modulesDIYJbO, /home/ben/code/anjali7/web/sites/all/modules)
Changes made in drush_upgrade_site_upgrade have been rolled back.     [rollback]
[160.71 sec, 31.25 MB]

I don't think it's a permissions issue, the copy command seems to be missing it's variables.

greg.1.anderson’s picture

By the log above (Calling copy(, sites//settings.php)), your configuration does not appear to be correct. Please post a new issue for your support request, and include the definition of your d7 alias.

greg.1.anderson’s picture

StatusFileSize
new25.71 KB

Sorry, #1 was missing its patch file, and I did not notice. The patch in #0 does not work! Try this one.

mlncn’s picture

It runs!

Feature request: be able to tell it not to try to download any contrib modules. It checks for every one, asks you to pick which one to download (i haven't tried yet in this version but 0 to cancel at this point canceled the whole script last version), and only then notices it already exists, and asks if you want to override it. Answering n works great at this point but the entire loop of even checking for any of them could be skipped after first time.

greg.1.anderson’s picture

That's a lot of prompting. As a workaround, make a copy of your live site, and upgrade that, first disabling any module that you don't want to pull over. Site-upgrade will only upgrade enabled modules.

greg.1.anderson’s picture

Status: Needs review » Reviewed & tested by the community

I have updated https://github.com/greg-1-anderson/drush-dgd7-scripts to include scripts 06-01 and 06-02 to test site-upgrade; still working well. I know the unit tests still need to be updated, but perhaps these will help. You can run 06-01 without any prior initialization; 06-02 will only run immediately after 06-01.

Side note about the patch names: I often typo and say si (site-install) when I mean sup (site-upgrade) -- I don't know why. For the avoidance of doubt, these patches affect only site-upgrade, not site-install.

I'm updating the status per #10; I think that once the unit tests are fixed, this should be ready to go in.

moshe weitzman’s picture

Title: Allow drush si to be run multiple times, re-using same code each time » Allow drush sup to be run multiple times, re-using same code each time
Status: Reviewed & tested by the community » Needs work

Will test this out now. First, some impressions and a code review ...

I'm concerned at how complex this command callback is getting. For example, I don't know that the map in _drush_upgrade_special_projects() is workable. The cck project lives on in D7 just to carry the update functions needed to move to Field API in D7. This pattern is not uncommon. In general, I'm fine with a log msg that states that 'no release available for abssrc'. I think we need to assume that the drush user has good Drupal knowledge.

+++ commands/core/upgrade.drush.inc	23 Feb 2011 14:16:19 -0000
@@ -103,30 +105,37 @@ function drush_upgrade_site_upgrade($tar
+    'replace' => dt("Delete the existing site and start over"),

Sentences should end with period. Happens a few times.

+++ commands/core/upgrade.drush.inc	23 Feb 2011 14:16:19 -0000
@@ -103,30 +105,37 @@ function drush_upgrade_site_upgrade($tar
+    drush_set_option('drupal-version-major', $target_version);

Why do we offer an option about target version. Aren't we always expecting user to upgrade from a working site? The target has to be the next major version, no?

+++ commands/pm/pm.drush.inc	23 Feb 2011 14:16:21 -0000
@@ -222,6 +222,7 @@ function pm_drush_command() {
+      'drush dl drupal --drupal-version-major=6' => 'Download latest recommended release of Drupal 6.x.',

How is different from specifying drupal-6.x? Are we trying to help folks who are rarely work with 7 but frequently work outside of a drupal site? I guess there is some value there.

greg.1.anderson’s picture

To answer your last two questions:

drush dl drupal-6.x downloads 6.x-dev.
drush dl drupal --drupal-version-major=6 downloads 6.20, the most recent recommended release.

The call to drush_set_option is to pass $target_version (at this point, always "7") to drush dl drupal. I could rework --drupal-version-major to instead be "--recommended".

moshe weitzman’s picture

Hmm. For Drush5, we should consider making dl drupal-6.x download latest recommended and requiring same plus --dev for dev snapshot. that makes the most sense to me.

greg.1.anderson’s picture

Hm, I just tried drush dl cck-6.x and drush dl cck-6.x --dev, and it already behaves as you describe, pulling down the recommended and development releases, respectively. Given that, it really makes sense that dl drupal should work the same way.

One question, though, is if this change (drush dl drupal-6.x now means 'recommended' instead of 'dev') is too harsh to backport to drush-4.x. It is a change in behavior, but one that people are not too likely to be using or depending on much. Maybe it is okay for 4.x? Definitely should be done for HEAD.

moshe weitzman’s picture

  1. I see now that we are handling the cck upgrade a bit nicer than what I imagined (telling folks that they need to use content_migrate).
  2. Would be ideal if sup could run with --simulate and not throw errors.

    I am seeing multiple instances of this error:

    WD php: Undefined index: project in                                  [error]
    /Users/mw/c/h/drush/commands/core/upgrade.drush.inc on line 126.
    

    I saw it happen with the imagefield module, the content module, and date_api module. Not sure why these extensions don't know what their project is.

  3. The line drush_pm_download('drupal'); is asking me to confirm 'Install location /Users/mw/htd/sup7 already exists. Do you want to overwrite it? (y/n):'. I've already answered that question earlier (replace).
  4. Similarly, perhaps drush_invoke('sql-sync', '@self', $target_key); should run with --yes so we don't ask 'do you want to continue'
  5. drush_log(dt("Disable non-core extensions. Could we change to 'Disabling' instead so it is more clear what action we are taking.
  6. Am a bit surprised to see:
    filefield was not found and will not be enabled.                     [warning]
    imagefield was not found and will not be enabled.                    [warning]
    date was not found and will not be enabled.                          [warning]
    date_api was not found and will not be enabled.                      [warning]
    date_timezone was not found and will not be enabled.                 [warning]
    autoload was not found and will not be enabled.                      [warning]
    dbtng was not found and will not be enabled.                         [warning]
    cck was not found and will not be enabled.                           [warning]
    

    .
    These happen during the call to site-upgrade-modules.

  7. My site-upgrade-modules call is returning FALSE so rollback ensues and I can't proceed.
greg.1.anderson’s picture

Okay, I'll look into those. Could you give me the full list of non-core enabled modules on the site you are upgrading?

moshe weitzman’s picture

~/htd/d6/sites/all$ drush pm-list --status=enabled --pipe --no-core
content
filefield
imagefield
date
date_api
date_timezone
autoload
dbtng

- the date_* modules come from the date project.
- dbtng is from http://drupal.org/project/dbtng and obviously that module is in core now.

greg.1.anderson’s picture

StatusFileSize
new29.66 KB

When I try to run site-upgrade with those modules, I get:

in db_create_table() (line 2587 of
/home/ga/work/dgd7/install/d7upgraded/web/includes/database/database.inc).
PDOException: SQLSTATE[42P07]: Duplicate table: 7 ERROR:  relation "date_formats_formats_key" already exists: CREATE TABLE {date_formats} (
	dfid serial CHECK (dfid >= 0),
	format varchar(100) NOT NULL,
	type varchar(64) NOT NULL,
	locked smallint NOT NULL default 0,
	PRIMARY KEY (dfid),
	CONSTRAINT date_formats_formats_key UNIQUE (format, type)
);

This error prevents the updatedb from finishing. This problem is described here: #1013034: PostgreSQL constraints do not get renamed by db_rename_table(). I haven't tested with mysql yet; maybe this is postgres-specific.It is caused because date_formats is now defined in system/system.install's schema; we can't fix it with an update function in the date module that defines the table, because we can't call contrib update functions until updatedb has been run on Drupal core, and that is what is failing here.

I'm not sure how to resolve this problem. I don't think it would be right to have drush work around problems in the upgrade path of contrib modules. I added a warning to the sup warning table advising the user to disable and uninstall date_api until this problem is fixed. Perhaps sup should also have an --uninstall option, so the users can list modules to uninstall prior to upgrade w/out affecting their d6 site.

The attached patch should resolve the other issues mentioned in #17, except for --drupal-major-version, which still needs to be adjusted. In the meantime, suggestions on handling date_api are appreciated.

moshe weitzman’s picture

i like the --uninstall option.

greg.1.anderson’s picture

StatusFileSize
new31.41 KB

This adds the --uninstall option, and removes --drupal-major-version. Now, drush dl drupal-6 will download the latest version of Drupal 6.x. This only works for Drupal core; version parsing for extensions is unchanged.

--simulate not supported by sup yet; I think that's about the last thing remaining.

moshe weitzman’s picture

Not so sure about adding drupal-6. I think we should change what 6.x does. It should get latest recommended and then we expect folks to use --dev if they want snapshot. We can do that in a later patch so this one stays backportable.

Still need a hook in _drush_upgrade_special_projects() for commandfiles to alter the map.

For code comments, lets use start with a Capital and end with a period. Just change the ones you come across. I know that we are not consistent with this in this file or in many others in drush.

We can do --simulate in a follow up patch.

Will test later today.

greg.1.anderson’s picture

Also needs if (drush_get_error()) { return ; } in a few places.

greg.1.anderson’s picture

Status: Needs work » Needs review
StatusFileSize
new37.52 KB

Added a hook drush_upgrade_project_map_alter that allows a module to add warning messages and such to the upgrade project map. Documented it in drush.api.php.

Fixed up the comments, and improved error recovery (e.g. if updatedb fails).

--simulate still not supported.

greg.1.anderson’s picture

StatusFileSize
new38.75 KB

Further factored so that contrib modules are disabled in a separate command, site-upgrade-prepare, so that modules may hook this command to do their own upgrade preparatory steps. Documented hook in drush.api.php.

moshe weitzman’s picture

Status: Needs review » Needs work

This patch review is based on a couple patches ago ...

  1. Now that I think of it, I think --uninstall needs docs clarification. One could assume we are uninstalling in the source database. But we are uninstalling during the twilight zone phase.
  2. drush_upgrade_site_upgrade() is a giant function. We need to make it more grokkable. One idea is to split it out into helper functions for each step. If thats awkward for some reason, we should summarize what it does in its Doxygen.
  3. We have a bug somewhere in string replacement:
    About to perform updatedb for Drupal core on @sup7                   [ok]
    executing !cmd                                                          [notice]
    
  4. You are using the project imagefield, which requires data migration
    or other special processing.  Data migration for this module will be
    provided by the Content Migrate submodule of cck.

    . We should be more clear about what we expect admin to do. I guess they need to enable content_migrate *after* sup has run?

  5. If this happens, disable and uninstall the date_api module before running site-upgrade.. We can recommend --uninstall instead now.
  6. Undefined variable: destination_conf_path in                            [notice]
    /Users/mw/c/h/drush/commands/core/upgrade.drush.inc on line 155.
    
  7. I got delayed for a long while by errors. The root cause was that my site was using CVS checkouts for modules but not cvs_deploy module. I think pm commands recognize this condition. Maybe we should also do that. Low priority.
  8. The call to site-upgrade-modules passes date_api as an argument despite it being on the --uninstall list.
  9. Please use --no-prefix when generating diffs from git.
greg.1.anderson’s picture

StatusFileSize
new44.61 KB

1. Fixed.
2. Made some progress toward breaking up drush_upgrade_site_upgrade; could benefit from more work here. I think if the 'WARN' section were broken out, this routine would be in pretty good shape.
3. Fixed.
4. This is a little complicated; I added a reference to http://drupal.org/node/781088.
5. Fixed.
6. Fixed.
7. No time to address this now; will need to return to it later.
8. Fixed.
9. Sure, and I can adjust iq-diff as well; this is actually my preference, to maintain the same convention for patches as existed prior to the git migration. However, the git instructions do not give this same advice. Should we perhaps post an issue in project_project, or wherever it is that the git instructions live?

--simulate is supported in this patch, but note that in simulate mode, neither site-upgrade-prepare nor site-upgrade-modules are actually called. Both of these bootstrap to sites that are not actually created in --simulate mode. This means that you won't see all of the operations happening during a site-upgrade with --simulate, but there's not much to do about that.

Edit: I realised after the fact that the comment above about --no-prefix was intended to refer to only git diff, and not to git format-patch, ergo my comment #9 above is incorrect.

greg.1.anderson’s picture

Status: Needs work » Needs review
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Tested it out and am happy enough with it. Feel free to commit and keep working on trimming down that giant function and other todos. I will commit soon if greg does not. On my way to Chicago now.

  1. Lets add 'default-major' to drushrc.php as i think it is useful for folks who are still on 6.
  2. Remove '* @todo Upgrade to specific releases.'
  3. We need a topic for this command to explain what it does in detail
greg.1.anderson’s picture

Status: Reviewed & tested by the community » Fixed

Committed #28. Probably want #30 before backporting.

greg.1.anderson’s picture

Version: » All-versions-4.x-dev
Status: Fixed » Patch (to be ported)

Committed changes per #30.

msonnabaum’s picture

Status: Patch (to be ported) » Fixed
moshe weitzman’s picture

Assigned: Unassigned » greg.1.anderson
Status: Fixed » Active

Reopening for a few minor things:

  1. Further refactor large callback function (move WARN section)
  2. The project drupal has no releases in version 7 . We don't remove drupal from the array of contrib projects.
  3. Undefined index: name in sitealias.inc on line 664.. $all_site_aliases['@self'] has no 'name'.
mlncn’s picture

With the goal of having a script to call that takes a site through a full upgrade based on update code in the site repository, this Drush script re-implements most of site-upgrade without the downloads or the project status/warning messages:

http://drupal.org/sandbox/mlncn/1154002

Definitely want to refactor drush sup to be able to run this way, or to share code with a function that does this.

mlncn’s picture

[UPDATE: ignore the sleep-deprived fool, this code works fine.] Also, this code in site-upgrade does not blow away the target database for me. I'm assuming it's something in my set-up (perhaps same issue as #1110044: How to tell site-install to use the database root user for creating the database?), but it's important for Drush to flag when it is not able to delete the current database.

  // Always blow away the target database so we start fresh.
  // We still have DRUSH_AFFIRMATIVE set from above, so this will not prompt.
  drush_set_option('create-db', TRUE);
  drush_include(DRUSH_BASE_PATH . '/commands/sql', 'sync.sql');
  drush_invoke('sql-sync', '@self', $target_key);
mlncn’s picture

The last comment, aside from being off-topic, is wrong-- that code does wipe the database clean... when i look at the correct database.

And the script i posted is pretty unnecessary. This is probably what Greg meant in #11 and something like the below works quite well:

drush site-upgrade @anjali.dev7 --reuse --core-only --uninstall=hashcash,devel
drush @anjali.dev7 site-upgrade-modules

An option that we could pass into site-upgrade in place of core-only that a) skips the contrib module recommendations step (as core only does) and b) removes the download list before calling site-upgrade-modules would be ideal. The two-step approach here loses the modules to enable step but i sort of want to script manually that anyway.

greg.1.anderson’s picture

Your goals sound reasonable, but I'm not completely sure what you are suggesting. Do you think you could post a quick patch to sup that shows what you mean? --core-only already skips site-upgrade-modules. When you say 'skips the contrib module recommendations step', do you mean that you want to upgrade some, but not all modules?

mlncn’s picture

I would like to do what the above two commands do in one step. If the full site-upgrade has already been run once, all the modules we want in code have already been suggested and downloaded-- all that should be skipped.

Essentially a --reuse-ALL option that acts like --core-only except that it calls site-upgrade-modules with the list of previously disabled modules to re-enable.

I think i would be able to do a patch that extends the if statements, but first, does anyone have a use case for the present behavior of --reuse (which honors core but acts like contrib is still an open question), or can i simply change its behavior to expect to reuse all present code?

greg.1.anderson’s picture

Does #39 mean that drush site-upgrade @anjali.dev7 --reuse --uninstall=hashcash,devel does not work correctly? That should do what you want, I think. The flag --core-only is supposed to skip contrib; are you using --core-only to work around some other bug?

mlncn’s picture

Yes, i'm using --core-only and then site-upgrade-modules as a separate command to work around a bug where even though the --reuse flag is given, a number of prompts are given related to contrib modules.

Based on the contrib modules enabled in this site, it is possible that[warning]
the site-upgrade command might fail.  See warnings above.
Would you like to continue anyway? (y/n):

If i'm re-using code, i don't want that prompt. More importantly, if i'm re-using code, i don't want it to ask me if i want to download every contrib module. I already have them. It shouldn't even try. And boy, does it try:

There is no recommended release for project activitystream.
Choose one of the available releases:
 [0]  :  Cancel                                                            
 [1]  :  7.x-2.x-dev  -  2011-Apr-16  -  Supported, Development, Installed 

Install location /home/ben/code/anjali7/web/sites/all/modules/contrib/activitystream already exists. Do you want to overwrite it? (y/n): 

Would a patch giving --reuse this meaning, no attempts to check or download contrib code, be accepted?

greg.1.anderson’s picture

Category: feature » bug

That sounds like a bug; it is supposed to work the way you describe. I thought it used to work; I'll take a look.

greg.1.anderson’s picture

Issue tags: +Release blocker

Should really look at this again for the 'second run' use case. If our intention is really to simply re-use the same code as last time, it seems like we should only do the sql-sync and updatedb steps. Site-upgrade goes out of its way to run updatedb once without any contrib code present, as the presence of contrib code, even in the form of disabled modules, caused the upgrade process to go awry prior to Drupal-7.0 final. Perhaps this is better now; if so, this code could be simplified.

See also the following useful blog post: http://www.group42.ca/drupal_7_upgrades_scripts_drush

greg.1.anderson’s picture

Project: Drush » Drush Site Upgrade
Version: All-versions-4.x-dev »
Component: PM (dl, en, up ...) » Code
Issue tags: -Release blocker

Moving to drush_sup queue

greg.1.anderson’s picture

Version: » 7.x-1.x-dev

This now works in the master branch. I have not published a release for master yet, though, so there is no applicable version in the issue queue. That will be resolved shortly, as I expect to be ready to publish master soon.

Joel MMCC’s picture

Greg, any update on when this will be in the master branch?

greg.1.anderson’s picture

Since there is no release for the master branch, using drush dl drush_sup will always give you the 1.x branch (the original implementation from Drush core). However, it is possible to look at the master branch if you do a git clone following the instructions given on the version control instructions.

I was waiting for a release of uuid-6.x-1.0-beta3 before publishing a release of the master branch, but it looks like that is blocked on some critical issues in the 6.x branch that no one is working on right now, so I may need to relent. If you are using features, update to the latest version of uuid-6.x-dev and run updatedb before starting your major upgrade. See #1149546: Please release 6.x-beta3, as it is not possible to upgrade to Drupal-7.x if uuid-6.x-beta2 is installed and #1482586: Upgrading from UUID 6.x to 7.x, and from 7.x-1.0-alpha1 to later versions.

There is also a bug in Drupal core that I have not had a chance to work on, although David Reid has helped push it forward. If you have the token module enabled in your D6 site (likely), you will get an error when you run the Drush site-upgrade command. If this happens, just run drush updatedb again on the target site, and then re-run the drush site-upgrade command, instructing it to pick up again where it left off, and the upgrade should work fine.

I have not finished my D7 upgrade yet -- still need to finish my D7 theme -- but the code here does go through the upgrade steps successfully, save for the above-mentioned disclaimers. With enough positive feedback here, I might go ahead and pubish a release from the code in the master branch.

greg.1.anderson’s picture

Status: Active » Needs review

Another thing of note: if your site upgrade is going to be protracted, re-doing your post-upgrade tasks (migrating content types, fixing up configuration changes, etc.) every time you synchronize your database might become tedious. Rather than re-running Drush site-upgrade and re-doing this work, you might also consider drupal-to-drupal migration instead. If this is supported in enough contrib modules, perhaps Drush site-upgrade could even set it up for you, maybe in the future for D7 - D8 upgrades. For now, though, you will have to weigh the effort of setting up a migration against the number of times you expect to re-import your database.

Side note: setting the status of this to 'needs review', per #45 and #47. Community feedback would be nice; but if I don't get any, I will still publish a release of the master branch after I finish my D7 upgrade.

Joel MMCC’s picture

Thanks for the info.

  • I do not have and never have used Git on either my development nor production servers, so I need to learn how to do that. I see that we may need to install a “Git Deploy” module if we ever use Git, at least for actual Drupal Modules (which this would not qualify as). I have used Subversion (svn) to obtain Acquia Drupal, etc. It seems to be pretty similar. Is there a way to get the Master branch without using Git? My PHP installation included svn but not git, and pear doesn’t work right either so using it to get git is problematic.
  • Re: #47 ¶3: “If you have the token module enabled in your D6 site (likely), you will get an error when you run the Drush site-upgrade command.” — what error message? We’ve been getting some very strange messages telling us that the “system” table does not exist in the destination database, yet it clearly does. Is this the error in question? I was wondering what was causing it and was about to start an Issue on that. Yes, we had Token enabled.
  • site-upgrade supposedly does not touch the source Drupal site, yet it wound up disabling every non-Core Contrib module in the site, and all Themes (even Garland), pretty thoroughly (but thankfully not irreversibly) breaking the source site. I assume that it intended to do this temporarily, but the above-mentioned fatal error crashed it before it could re-enable the disabled modules and themes? If this is the case, just to be safe, I recommend that the next major version either by default (perhaps overridable with a switch) copy the entire source site and database to a temporary site before doing any part of the upgrade and using that temporary site as its upgrade source (so that the active original will never be altered in any way for any reason, even temporarily), or at least automatically put the site in Maintenance Mode while the upgrade is in progress and only take it out of Maintenance Mode on successful completion of those tasks that it is able to do.
Joel MMCC’s picture

Oops, forgot to mention: we don’t use the UUID module (didn’t even know it existed until I saw your post!), so that is not an issue for us.

greg.1.anderson’s picture

Okay, I went ahead and published a release of the 2.x branch for you. You may now use drush dl drush_sup; you will get a message that says there are no releases (bug: Drush means there are no recommended releases, the cause of which is a d.o bug); at this point you may select 7.x-2.0-alpha1 to try out a release taken from the master branch.

Your comments in #49 are no doubt based on the 7.x-1.x-dev branch, which I cannot comment on save to say that it very rarely works correctly, and the errors you are encountering are probably due to these deficiencies. Try the 2.x branch; if you read the README closely and follow the instructions, it is likely to work well. If you have trouble with a specific module, try upgrading by hand, and if the problem persists, post a support request in the issue queue for the module in question, not here.

The problem I referred to with the token module produces an error message when Drush attempts to enable the module. I don't remember the specific message, but it has something to do with a cache table that does not exist in the database. Proceed as recommended above, and you shouldn't have any trouble.

Joel MMCC’s picture

That worked nicely! Thanks much! I still have some theme work to do and some D6-only modules to find replacements for (or do without), but the site is working in D7 now!

greg.1.anderson’s picture

Status: Needs review » Fixed

Re-running drush sup and re-using the same code as the last execution is working fairly well in 7.x-2.0-alpha2, so marking this 'fixed'.

Status: Fixed » Closed (fixed)

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