[Spacewalk-list] RE: Error upgrading from 0.3 to 0.4 (new)

Jan Pazdziora jpazdziora at redhat.com
Thu Jan 29 14:36:03 UTC 2009


On Wed, Jan 21, 2009 at 10:56:46AM -0500, romain.pelissier at bell.ca wrote:
> I have filled a bug about my issue https://bugzilla.redhat.com/show_bug.cgi?id=480676.
> 
> Even if the fix for #480618 works, it leave the rhnVersionInfo with some values that make the upgrade script fail and could compromise any further upgrade (because there is no more 'schema' value for the label field in the table which is used to construct the upgrade path by the upgrade script).
> 
> So, the upgrade itself if successful because you can after applying the #480618 (which is the last sql update script in the process) follow the remaing upgrade process.
> But I think the upgrade from 0.4 to 05 will be problematic because there are no updated or new row inserted for the new version (0.4)
> The upgrade script have to manage failing upgrade (not relying only on the 'schema' value but on the last value of the label field or, not update the table until all the sql scripts are successful.
> By the way, because of the way the upgrade script manage errors of already updated table, it will always generate errors and the upgrade script will always fail.
> Not a big issue this time since there is a fix...

Romain,

I've put some comments to bugzilla 480676 now.

Basically, I don't agree that the upgrade script has to manage failing
upgrades. That is (at least currently) not the goal of the script,
primarily because the SQL files that are being processed are not
written and checked in such a way that you can re-run the upgrade set.

In this sense, the fact that after a failed upgrade you have a schema
which the script will not able to upgrade any further is a safecheck.
Generally, you should restore the database from backup to the
pre-upgrade state, and rerun the upgrade with fixed set of upgrade
script. You can fix the schema by hand if you know what you're doing,
and in this case the failed script was the last one in the set so it's
pretty easy to do. But then, you should knowingly set the schema
version in the database as well.

Yours,

-- 
Jan Pazdziora
Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list