Hi, I'm struggling to upgrade a 2.4.4.4 repository to 3.1.0.4. I suspect the root problem is that the loaded metacello packages have massively diverged from the "blessed" versions that shipped with 2.4.4.4 in extent0.seaside.dbf, and that just breaks too many hard-wired assumptions in upgradeSeasideImage. For example, we're using recent versions of Metacello, Seaside30, GLASS and Zinc as published on github, we're using filetree, and that implies a lot of changes in lower-level dependencies such as Sport and SoXML etc. To my thinking, we don't need to run upgradeSeasideImage since we've already upgraded Seaside; we just need to run upgradeImage to deal with changes in kernel classes and the GemStone product itself. However, when I inpect upgradeSeasideImage.topaz, it seems to contain code that relates to the upgrade from 2.4 -> 3.1 itself (for example, making ControlInterrupt, Halt, Pause, Random, TransientRandom and BreakpointNotification obsolete). So it seems we do need to run upgradeSeasideImage, but ensure that it does not trip over our different version numbers. But then bootstrapMaster30.topaz becomes an issue: it forcibly loads a bunch of hard-wired version numbers of MCZs for Metacello, Monticello and so on, and surely those version numbers are totally wrong for our dependencies? The most common problem I have is that the image just ends up with crucial methods and classmethods totally gone on classes that are subscribed to SystemLoginNotification, causing login errors that trips up topaz, stopstone, gemtools. It seems that the culprit is #BootstrapApplicationLoadSpecs - it seems it should list enough ConfigurationOf packages to reverse the effect of upgradeSeasideImage that deleted all methods in UserGlobals. But we're way past using ConfigurationOfGLASS now, we're using BaselineOfGLASS1 as published on github. So I tried something like UserGlobals at: #BootstrapApplicationLoadSpecs put: { { 'BaselineOfGLASS1'. 'baseline'. #('default'). 'filetree:///home/wonka/development/wonka/3rdparty/glass/repository/'} }. but that doesn't work, since its Gofer doing the loading and Gofer does not seem to be able to resolve BaselineOfGLASS1 from a filetree repository. Should I just hack at upgradeSeasideImage.topaz to load BaselineOfGLASS1? Has anyone else ever been in a similar situation? _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Hi Pieter,
Not sure if it's exact the same situation, but I've done an upgrade a few months ago, where I stumbled upon some problems with the upgrade script when it comes to using github repositories etc. I managed to get it done by creating a local monticello directory with all the necessary packages. Furthermore, it is necessary to adapt the upgrade script and add your own configuration classes. Here is that conversation: http://forum.world.st/Glass-upgrade-seaside-image-when-requiring-MetacelloPreview-td4735961.html Maybe it helps but I do not recognize the other issues you mention. Johan On 24 Feb 2014, at 15:59, [hidden email] wrote: > > Hi, > > I'm struggling to upgrade a 2.4.4.4 repository to 3.1.0.4. I suspect the > root problem is that the loaded metacello packages > have massively diverged from the "blessed" versions that shipped with > 2.4.4.4 in extent0.seaside.dbf, and that just breaks > too many hard-wired assumptions in upgradeSeasideImage. For example, we're > using recent versions of Metacello, Seaside30, > GLASS and Zinc as published on github, we're using filetree, and that > implies a lot of changes in lower-level dependencies > such as Sport and SoXML etc. > > To my thinking, we don't need to run upgradeSeasideImage since we've > already upgraded Seaside; we just need to run upgradeImage > to deal with changes in kernel classes and the GemStone product itself. > However, when I inpect upgradeSeasideImage.topaz, it > seems to contain code that relates to the upgrade from 2.4 -> 3.1 > itself (for example, making ControlInterrupt, Halt, Pause, Random, > TransientRandom and BreakpointNotification obsolete). > > So it seems we do need to run upgradeSeasideImage, but ensure that it > does not trip over our different version numbers. But then > bootstrapMaster30.topaz becomes an issue: it forcibly loads a bunch of > hard-wired version numbers of MCZs for Metacello, Monticello and so > on, and surely those version numbers are totally wrong for our > dependencies? > > The most common problem I have is that the image just ends up with > crucial methods and classmethods totally gone on classes that are > subscribed to SystemLoginNotification, causing login errors that trips > up topaz, stopstone, gemtools. > > It seems that the culprit is #BootstrapApplicationLoadSpecs - it > seems it should list enough ConfigurationOf packages to reverse the > effect of upgradeSeasideImage that deleted all methods in > UserGlobals. But we're way past using ConfigurationOfGLASS now, we're > using BaselineOfGLASS1 as published on github. > > So I tried something like > > UserGlobals > at: #BootstrapApplicationLoadSpecs > put: { > { 'BaselineOfGLASS1'. 'baseline'. #('default'). > 'filetree:///home/wonka/development/wonka/3rdparty/glass/repository/'} > }. > > but that doesn't work, since its Gofer doing the loading and Gofer > does not seem to be able to resolve BaselineOfGLASS1 from a filetree > repository. > > Should I just hack at upgradeSeasideImage.topaz to load > BaselineOfGLASS1? Has anyone else ever been in a similar situation? > > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Pieter Nagel-3
On Mon, Feb 24, 2014 at 6:59 AM, <[hidden email]> wrote:
Yes, please take a look at Johan's thread for clues to address some of the issues (and of course ask more questions if it still isn;t completely clear.
The upgradeSeasideImage script is intended to provide a framework for upgrading the basic GLASS support classes to the proper versions needed to function in 3.1 as well as reload all of your packages as well.
In 2.x a number of the exception classes were part of GLASS and were subclassed off of the class ExceptionA. In 3.x some of the exception classes are part of the base and the ExceptionA class no longer exists (it is an obsolete class) ... the upgradeSeasideImage script does the dirty work to make this type of transition as simple as possible.
There are differences in the GLASS support classes and there are differences in the Seaside classes between 2.x and 3.x so it is really necessary to do a full Metacello load of your entire application to complete the upgrade process and the upgradeSeasideImage script has support for that as well.
The upgrade process is sometimes pretty complicated to compensate for new capabilities and functionality ... for 3.x upgrades all methods must be recompiled (they will not exectue otherwise)...the upgrdeScriptSeasideImage script basically does a complete bootstrap from an empty image and starts by bootstrapping GLASS (which is why the old code is loaded)... further into the script the GLASS version that you are using is loaded into the image, followed by a reload of your entire application class base ...
Is this after you have done a upgradeSeasideImage? There is a global that can set before starting the upgrade (BootstrapApplicationPostloadClassList) where you define the list of classes that you want to have initialized after the upgrade ... unconditional sending of #initialize during the upgrade process could wipe out critical data structures so this "opt-in" process was adopted so that you know exactly which initialize messages are being sent ... for the SystemLoginNotifications it sounds like those classes involved need to be added to the list.
Read through Johan's post first and supply some more information about how you've defined the variouse globals used in the upgradeSeasideImage script:
#BootstrapSymbolDictionary #BootstrapSymbolDictionaryName #BootstrapRepositoryDirectory #BootstrapApplicationLoadSpecs #BootstrapExistingConfigurationList
#BootstrapApplicationPostloadClassList I don't think you should hack the upgradeSeasideImageScript. There's a description of the above variables in Chapter 4 of the Install Guide that should help as well
Dale
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Mon, 2014-02-24 at 09:18 -0800, Dale Henrichs wrote:
> In 2.x a number of the exception classes were part of GLASS and were > subclassed off of the class ExceptionA. In 3.x some of the exception > classes are part of the base and the ExceptionA class no longer exists > (it is an obsolete class) ... the upgradeSeasideImage script does the > dirty work to make this type of transition as simple as possible. Ok, I thought those were obsolete kernel classes; but handling them in upgradeSeasideImage makes sense after your explanation. > The most common problem I have is that the image just ends up > with > crucial methods and classmethods totally gone on classes that > are > subscribed to SystemLoginNotification, causing login errors > that trips > up topaz, stopstone, gemtools. > > > Is this after you have done a upgradeSeasideImage? There is a global > that can set before starting the upgrade > (BootstrapApplicationPostloadClassList) where you define the list of > classes that you want to have initialized after the upgrade ... > unconditional sending of #initialize during the upgrade process could > wipe out critical data structures so this "opt-in" process was adopted > so that you know exactly which initialize messages are being sent ... > for the SystemLoginNotifications it sounds like those classes involved > need to be added to the list. It was not a matter of something needing to be added to the list; something already added to the list was broken. What happened is that OTRemoteDebugger had lost all its methods (including #sessionStart), which caused a DNU when SystemLoginNotification tried to call it at login time, which caused topaz to increment its errorcount, and made all topaz scripts fail with exit code 1 thereafter, and all kinds of other fun in gemtools and stopstone. I now understand this is due to upgradeSeasideImage looping over all classes in UserGlobals and doing removeAllMethods class side and instance side. Without a working #BootstrapApplicationLoadSpecs, the majority of the removed methods never got re-added at all. So tomorrow I'll focus on getting a BootstrapApplicationLoadSpecs that somehow pulls in BaselineOfGLASS1 and see how that goes. > I don't think you should hack the upgradeSeasideImageScript. The alternative seems to be generating an equivalent MCZs repository for all the filetree stuff, and then I'd have to automate the creation of that repository into our build process so it stays in sync with the github filetrees - I dislike manually created copies of data that can get out of sync. I'll experiment with an empty #BootstrapApplicationLoadSpecs, but instead somehow create a class whose initialize just calls our existing source code bootstrapping scripts (that load the new Metacello, filetree, BaselineOfGLASS, and our code). I can arrange for that to be triggered via #BootstrapApplicationLoadSpecs. That should circumvent the need to edit upgradeSeasideImage and give me a hook to load our code with a newer Metacello. > _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Mon, Feb 24, 2014 at 10:17 AM, Pieter Nagel <[hidden email]> wrote:
Yes, that is standard for the upgradeSeasideImage script ... there are a number of moving parts underneath the covers in GLASS so the safest upgrade strategy is to remove all methods and add them back again ...
So tomorrow I'll focus on getting a BootstrapApplicationLoadSpecs that The entries in BootstrapApplicationLoadSpecs should track your bootstrap installation script and to get things bootstrapped correctly I think you should include a a line in the BootstrapApplicationLoadSpecs for bootstrapping the initial starting point for ConfigurationOfGLASS for 3.1 which is the following:
{'ConfigurationOfGLASS'. '1.0-beta.9'. #('default'). BootstrapRepositoryDirectory. }. That should be followed by a {'ConfigurationOfGLASS'. '1.0-beta.9.1'. #('default'). BootstrapRepositoryDirectory. }. which gets you to the point where GLASS1 might be loaded ... Note that the seasideUpgradeScript expects that all of theconfiguartions be present BootstrapRepositoryDirectory. Also note that the upgradeSeasideImageScript expects to be loading Configurations for all artifacts ...
As I said earlier I think that you should get a minimun of GLASS 1.0-beta.9.1 loaded via the upgradeSeasideImage script, because that will mean that the basic functionality of GLASS will be present and initialized ...
The upgrade script was created before I started introducing the github based repositories so it is wired to be loading configurations instead of baselines, but if you get GLASS1.0-beta.9.1 installed, you should be able to do post-upgradeSeasideImage loads with you standard bootstrap scripts ...
Dale _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Mon, 2014-02-24 at 11:59 -0800, Dale Henrichs wrote:
> {'ConfigurationOfGLASS'. '1.0-beta.9'. #('default'). > BootstrapRepositoryDirectory. }. > > > > That should be followed by a > > > {'ConfigurationOfGLASS'. '1.0-beta.9.1'. #('default'). > BootstrapRepositoryDirectory. }. Thanks very much for this pointer; it would have taken my a long time to figure that out, if ever. I'll let you know how things go. It seems that, at least in my case, and maybe for others in this situration: the correct mental model I should use is not "the upgrade process should transform the 2.4 repository into something that has the correct versions of our dependencies loaded". Instead I should think of it as something that gets the 2.4 repository to have the same versions loaded as the extent0.seaside.dbf that ships with 3.X has. Since our build procedures can load or software over extent0.seaside.dbf, they should then work with a converted repository. -- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Pieter Nagel-3
Something to take note of when re-working upgradeSeasideImage to take into
account newer Metacello functionality: I started with BootstrapApplicationLoadSpecs that just loads ConfigurationOfGLASS 1.0-beta.9 from seaside/monticello/repository (for now). But this fails when Metacello, as part of finalizeLoad:, tries to do "MetacelloProjectRegistry primeRegistryFromImage" and it fails with a UserDefinedError "No #baseline pragma found", referring to BaselineOfWonkaProjects (the package that contains all of our application's dependencies). BaselineOfWonkaProjects has lost its #baseline: method, since all classes in UserGlobals had all of their methods removed by upgradeSeasideImage. Doing "BaselineOfWonkaProjects removeFromSystem" in the GS2 repository before it gets converted side-steps that problem. I attach the relevant stacktrace from upgradeTo3x.out, trimmed for brevity. _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass stacktrace (37K) Download Attachment |
I managed to run through upgradeSeasideImage without any (obvious)
errors with the advice given here. But now I can't load Seaside30. As part of it, a class-side #initialize is triggered that tries to set an #exceptionHandler on the application configuration, but Seaside moans that the specific attribute does not exist. My main problem is that I cannot debug what is going on. When I log in to the repository via topaz afterwards, all the methods that I saw in the stack trace are just gone. I went so far as to compare the oops of the classes in the stacktrace to the oops of the classes in the repository, and they're all the same. I also tried to wrap the loading code in an "[...] ensure: [System commitTransaction]" block, to no avail. Does metacello have an error-handler that unloads all methods it loaded on error? (Remember, the state that upgradeSeasideImage left the repository in is that it deleted all methods on all classes in UserGlobals, so any rollback would leave the repository in that state). Alternatively, is there any way to tell Metacello to not call #initialize on classes? I suspect that what's happening is that the missing methods that upgradeSeasideImage deleted breaks some descriptors of some Seaside classes, which get queried (and cached on the #description instvar) at a point before the source code is reloaded, and thus Seaside does not relaise that #exceptionHandler is a valid configuration. If this is the case, I can use Metacello to load the code twice, and only enable #initialize the second time. -- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Fri, Feb 28, 2014 at 4:45 AM, Pieter Nagel <[hidden email]> wrote: I managed to run through upgradeSeasideImage without any (obvious) Do all of your unit tests pass and are you able to see all of the source at this point in time?
I'm curious if you used BootstrapApplicationPostloadClassList scheme when loading your own code. To Monticello it will appear that none of the #initialize methods are present so Monticello will run the #initialize method after installing it ... Since this is an upgrade you likely don't want the standard #initialize behavior since it may wipe out any state that you have defined ... this applies to Seaside as well as your own application .... the upgradeSeasideImage.topaz process uses an "opt-in" model for #initialization, but if you didn't have a handler for MCPerformPostloadNotification in your loading process, then you will be running all of the initializations which is probably not what you want ...
There is no such thing as "remove methods on error". OTOH there are ways for methods to "disappear". In a normal GemStone repository it is not possible for DataCurator to add methods to classes in the Globals symbol dictionary, but in GLASS we have enabled session methods, which do allow one to add methods to the classes in the Globals symbol dictionary. If you disable session methods then the methods would effectively disappear.
This type of thing _shouldn't_ happen during a normal upgradeSeasideImage run (and doesn't in our test environments or for other folks who have done upgrades), so there must be something that you are doing different...
Perhaps you could share the specifics of your upgrade process? I also want to make sure that you have ported all of your code to 3.1 before attempting the upgrade as there may be other things going on that cause the problems ...
I asked earlier if before trying to load seaside and getting this walkback that you have verified that all of the method source is visible, because I want to make sure that we're debugging the right thing.
The steps at the end of the upgrade process are intended to install of the methods deleted during earlier steps ... there are commits at the end of each step (and GsDeployer class >>bulkMigrate: should be doing automatic commits on out-of-memory conditions) and once you've committed GemStone has not way of rolling back to a previous commit short of restoring from backup and replaying selected tranlogs ...
Yes in GLASS Monticello signals a MCPerformPostloadNotification before sending #initialize and you can control which classes you want to have initialized and which ones you don't ... as I mentioned earlier the upgradeSeasideImage process skips initialization unless you explicitly specify a class ...
Dale
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Fri, 2014-02-28 at 10:46 -0800, Dale Henrichs wrote:
> > > > On Fri, Feb 28, 2014 at 4:45 AM, Pieter Nagel <[hidden email]> > wrote: > I managed to run through upgradeSeasideImage without any > (obvious) > errors with the advice given here. > Do all of your unit tests pass and are you able to see all of the > source at this point in time? To be clear: I use upgradeSeasideImage *only* to load 1.0-beta.9.1, and not our own application or its dependencies (Seaside, Zinc, etc.) This is because we have upgraded to a lot of dependencies published on github as filetree repositories, and upgradeSeasideImage can't handle that, as mentioned earlier on this thread. So my aim was for upgradeSeasideImage to get the repository similar enough to extent0.seaside.dbf that we can just invoke the exact same scripts that work against that to load the newer GLASS (as published on github) and all our other dependencies. It is during this process that the error occurs, and the methods all just seem to disappear after topaz dumps a stack trace that makes it very clear that the methods did exist at the point of error. > I'm curious if you used BootstrapApplicationPostloadClassList scheme > when loading your own code. No, all I set was BootstrapApplicationLoadSpecs to load GLASS 1.0-beta.9 and then GLASS 1.0-beta.9.1 as you suggested earlier in this thread. > This type of thing _shouldn't_ happen during a normal > upgradeSeasideImage run (and doesn't in our test environments or for > other folks who have done upgrades), so there must be something that > you are doing different... Yes, as mentioned, the error occurs *after* a normal upgradeSeasideImage run. > I also want to make sure that you have ported all of your code to 3.1 > before attempting the upgrade as there may be other things going on > that cause the problems ... The exact same code base, loaded onto a 3.1 extent0.seaside.dbf by the exact same scripts I run after upgradeSeasideImage, passes all unit tests in that "clean slate" scenario. > I asked earlier if before trying to load seaside and getting this > walkback that you have verified that all of the method source is > visible, because I want to make sure that we're debugging the right > thing. Only GLASS-related method source is visible. All other classes are still in their "removeAllMethods" state as upgradeSeasideImage made them; the hope was that by running our code loading script the rest of all the methods would also be loaded. What I take from your message is that I need a suitable MCPerformPostloadNotification handler to suppress #initialize methods; and that the session method machinery is a likely explanation for why the methods seem to disappear - if that persists I should look at what upgradeSeasideImage did in that regard and run our scripts in the same type of context. These are good leads, thank you. -- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On Fri, 2014-02-28 at 22:07 +0200, Pieter Nagel wrote:
> This > is because we have upgraded to a lot of dependencies published on github > as filetree repositories, and upgradeSeasideImage can't handle that, as > mentioned earlier on this thread. Correction: it's the BaselineOf... classes that upgradeSeasideImage can't handle; not sure to what extent the filetree issue is relevant. -- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Pieter Nagel-3
On Fri, Feb 28, 2014 at 12:07 PM, Pieter Nagel <[hidden email]> wrote:
Okay.
Yes and I agree that this is a good plan...
So the methods that go missing are in the process of being loaded ... for the first time... and are on the stack at the point or error, but seem to disappear afterwards ... So if the #initialization tricks don't help I'd like to see a stack trace at the point of the error ... MCPackageLoader>>tryToLoad: and friends are pretty complicated beasts, but I don't think there is any logic where already compiled methods are removed, but a stack would help narrow the search space ...
Yes and for loading the GLASS base packages, I think that the BootstrapApplicationPostloadClassList is sufficent.
The final round of loads are intended to define the methods that were removed in the earlier steps and at your point in time, if you've only loaded in the GLASS stuff, then this is consistent ...
Yes ... this sounds good ... if you still get errors, share the actual stack with me, so that I can look for suspicious exception handlers ...
Dale
_______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Using MCPerformPostloadNotification to suppress #initiliaze during the
re-loading of our code solved all the problems as reported in this thread. Thanks, Dale, for the helpful advice. -- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |