admin@glassfish.java.net

version checking in upgrade tool

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Mon, 23 May 2011 14:59:15 -0400

Hi all,

An issue came in today -- http://java.net/jira/browse/GLASSFISH-16700 --
that the upgrade tool (asupgrade) can't upgrade from OGS 3.1 to OGS
3.1.1. What's happening is that the tool looks at the source domain and
thinks it's not a supported upgrade path, so it never attempts to
perform the upgrade.

I can't reproduce it so far and need more info from the filer. But I'm
thinking that if there's some class of error that prevents using the
tool with certain versions of GF and/or certain platforms, I could just
pull out the whole "check if supported" logic entirely. It's already
kind of a mess (*), and we clearly document what platforms are supported
upgrade sources. And nothing can prevent a user from running "asadmin
start-domain --upgrade" on some really really old app server, e.g.:

http://www.oracle.com/technetwork/java/javaee/download-141771.html

So I'm tempted to pull this logic if there's really a problem and just
let the user run into trouble when doing something we've documented
should not be done. Any complaints about that?

Thanks,
Bobby

(*) If there is no DTD in the source domain.xml, which the code assumes
is the case by failing with an NPE looking for the doctype's pulicId
(sigh), it looks for a <domain> element and then just assumes it's 3.1
no matter what it really is. I don't see the point of fixing that for
3.1.1 -- configuration upgrade is supported from any 3.X version.