[Glass] ConfigurationOf vs. upgradeSeasideImage

Ken Treis via Glass glass at lists.gemtalksystems.com
Tue Feb 13 10:40:10 PST 2018


Dale,

I'm stumped.

I'm trying to upgrade from 3.2.15 (non-tODE but with some MetacelloPreview stuff loaded) to 3.3.6. I get through the regular `upgradeImage` step without any problems. But I'm still getting the same error during a GLASS bootstrap when it processes the BootstrapApplicationLoadSpecs:

> --transcript--'Loading 1.0-beta.9.2.1 of ConfigurationOfGLASS...'
> --transcript--'Fetched -> ConfigurationOfMetacello-dkh.795 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- upgrade:/opt/gemstone/product/seaside/monticello/repository'
> --transcript--'Loaded -> ConfigurationOfMetacello-dkh.795 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- cache'
> --transcript--'Fetched -> ConfigurationOfGsCore-dkh.301 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- upgrade:/opt/gemstone/product/seaside/monticello/repository'
> --transcript--'Loaded -> ConfigurationOfGsCore-dkh.301 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- cache'
> --transcript--'Fetched -> ConfigurationOfGsMisc-dkh.117 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- upgrade:/opt/gemstone/product/seaside/monticello/repository'
> --transcript--'Loaded -> ConfigurationOfGsMisc-dkh.117 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- cache'
> --transcript--'Fetched -> ConfigurationOfGsSqueakCommon-dkh.25 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- upgrade:/opt/gemstone/product/seaside/monticello/repository'
> --transcript--'Loaded -> ConfigurationOfGsSqueakCommon-dkh.25 --- upgrade:/opt/gemstone/product/seaside/monticello/repository --- cache'
> -----------------------------------------------------
> GemStone: Error         Nonfatal
> a ImproperOperation occurred (error 2142), Cannot execute method, 'method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889'
> Error Category: 231169 [GemStone] Number: 2142  Arg Count: 2 Context : 61294601217 exception : 69199241217
> Arg 1: [69199240961 sz:82 cls: 74753 String] method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889
> Arg 2: [20 sz:0 cls: 76289 UndefinedObject] nil
> ERROR: UNEXPECTED ERROR

In topaz, I can run `ConfigurationOf ensureMetacello` and it returns immediately. This makes sense, since it just got loaded fresh from Metacello-Base-dkh.103.mcz earlier in the bootstrap process.

But it seems that ConfigurationOfGsSqueakCommon — which it just fetched — somehow ends up referring to an obsolete version of the ConfigurationOf class. This is weird on multiple levels:

* ConfigurationOf has only one entry in its classHistory.
* Before the attempted load, ConfigurationOfGsSqueakCommon doesn't exist in DataCurator's UserGlobals. Even after the attempted load, it doesn't exist (presumably because the load attempt happens in a transaction).

So… where's it getting this obsolete code from? Is it possible that the fetches mentioned in those transcript lines — the ones that say "cached" at the end — are pulling in old classes?

====

Since I'm not running tODE yet, and since I thought maybe this error was due to something wrong in the official `upgradeSeasideImage` script, I've been writing my own scripts based on `upgradeStone` in GsDevKit_home. I may have missed something, but the steps are as follows:

1. In 3.2.15, set passwords to `swordfish` and stop the stone/LDI
2. Copy extent into 3.3.6 data dir
3. Run `upgradeImage`

The next steps are copied from upgradeStone:

4. As SystemUser, add patch for bug 46217 (GS_BOOTSTRAP_MONTICELLO_SKIP_REMOVE_CLASS)
5. Set GS_BOOTSTRAP_MONTICELLO_SKIP_REMOVE_CLASS to true
6. Remove SystemLoginNotification subscriptions and patch for Issue #71
7. Set BootstrapApplicationPostloadClassList to #( #SecureHashAlgorithm #MCFileTreeFileDirectoryUtils ). 
8. As SystemUser, set #SeasideUpgradeUser and input $GEMSTONE/upgrade/prepareSeasideImage.topaz
9. Input $GEMSTONE/upgrade/bootstrapSeasideImage.topaz

Everything goes fine until step 9, which blows up as described (regardless of whether ConfigurationOf is included in the BootstrapExistingConfigurationList).

--
Ken Treis
Miriam Technologies, Inc.
(866) 652-2040 x221


> On Feb 9, 2018, at 8:08 AM, Dale Henrichs <dale.henrichs at gemtalksystems.com> wrote:
> 
> Yeah, I suggest that you take the topaz scripts from the upgradeStone script and add them to your own scripts ... there are also some version dependent steps that is done using tODE scripts ... what versions are involved in your upgrade ... I can decode the tODE scripts and let you know the additional steps that might be needed.
> 
> Dale
> 
> On 02/08/2018 10:30 AM, Ken Treis wrote:
>> Thanks, Dale. It turns out I was premature in declaring victory yesterday, and the "needs recompile" error is still happening even with my triumphal "fix".
>> 
>> Should I be using the upgradeStone script from GsDevKit rather than the upgradeSeasideImage script in the official GS 64-bit distribution? I'm not using GsDevKit / tODE on this project yet, but migration to tODE is a near-term goal.
>> 
>> --
>> Ken Treis
>> Miriam Technologies, Inc.
>> (866) 652-2040 x221
>> 
>> 
>>> On Feb 7, 2018, at 6:18 PM, Dale Henrichs via Glass <glass at lists.gemtalksystems.com <mailto:glass at lists.gemtalksystems.com>> wrote:
>>> 
>>> Ken,
>>> 
>>> I suggest that you take a look at the GsDevKit_home upgradeStone script[1] for inspiration. That sounds like a familiar problem and I'm pretty sure that I've addressed that issue plus others in the upgradeStone script.
>>> 
>>> Dale
>>> [1] https://github.com/GsDevKit/GsDevKit_home/blob/master/bin/upgradeStone#L192 <https://github.com/GsDevKit/GsDevKit_home/blob/master/bin/upgradeStone#L192>
>>> 
>>> On 02/07/2018 05:08 PM, Ken Treis via Glass wrote:
>>>> I'm working on upgrading a system from 3.2.15 to 3.3.5 and hit a snag. I'm not sure if this is a bug in upgradeSeasideImage or just an odd quirk of our setup.
>>>> 
>>>> When upgradeSeasideImage tries to auto-detect ConfigurationOfX classes to remove, it is apparently deciding to include the base `ConfigurationOf` class from Metacello in its list of removals. The script ends up loading it fresh, removing it, and then bombing when one of the packages triggers  `ConfigurationOf class>>ensureMetacello`.
>>>> 
>>>> I worked around this by building my #BootstrapExistingConfigurationList that omitted ConfigurationOf, and then the upgradeSeasideImage script completed without errors.
>>>> 
>>>> Here are some highlights from the upgradeTo3x.log leading up to the failure:
>>>> 
>>>>> Automatically generating list of loaded configuration classes to be removed:
>>>>>   ConfigurationOfGLASS
>>>>>   ConfigurationOfFileTree
>>>>>   ConfigurationOfGofer
>>>>>   ConfigurationOfGsSqueakCommon
>>>>>   ConfigurationOfGrease
>>>>>   ConfigurationOfGsMisc
>>>>>   ConfigurationOfGsOB
>>>>>   ConfigurationOfGoferProjectLoader
>>>>>   ConfigurationOfGsMonticello
>>>>>   ConfigurationOfGsCore
>>>>>   ConfigurationOf
>>>>>   ConfigurationOfZincHTTPComponents
>>>>>   ConfigurationOfSeaside3
>>>>>   ConfigurationOfMetacello
>>>> 
>>>> 
>>>> [snipped]
>>>> 
>>>>> loading 'Metacello-Base-dkh.103.mcz'
>>>>> class created: 'ConfigurationOf'
>>>> 
>>>> 
>>>> [snipped]
>>>> 
>>>>> BootstrapExistingConfigurationList do: [:class | class removeFromSystem ].
>>>> 
>>>> 
>>>> […]
>>>> 
>>>>> --transcript--'Loaded -> ConfigurationOfGsSqueakCommon-dkh.25 --- upgrade.weco-write.com <http://upgrade.weco-write.com/>:/opt/gemstone/product/seaside/monticello/repository --- cache'
>>>>> -----------------------------------------------------
>>>>> GemStone: Error         Nonfatal
>>>>> a ImproperOperation occurred (error 2142), Cannot execute method, 'method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889'
>>>>> Error Category: 231169 [GemStone] Number: 2142  Arg Count: 2 Context : 69194451969 exception : 72186891777
>>>>> Arg 1: [72186892033 sz:82 cls: 74753 String] method needs recompile, ConfigurationOf class >> ensureMetacello , oop 36494597889
>>>>> Arg 2: [20 sz:0 cls: 76289 UndefinedObject] nil
>>>>> ERROR: UNEXPECTED ERROR
>>>>> topaz> time
>>>>>  02/07/2018 10:47:24.935 PST
>>>>> topaz > exec iferr 1 : stk 
>>>>> ==> 1 ImproperOperation (AbstractException) >> _signalFromPrimitive: @7 line 15   [methId 56587946753]
>>>>> 2 ConfigurationOfGsSqueakCommon >> project      @1 line 1   [methId 72117275905]
>>>> 
>>>> 
>>>> Again, this might be just a quirk of my setup… but it seems (in my limited understanding) that the upgrade wouldn't need to remove ConfigurationOf after having just loaded it.
>>>> 
>>>> In case anybody else needs the workaround, I just copied the auto-generation code from the log, hacked it as follows, and used it to set #BootstrapExistingConfigurationList explicitly before running `upgradeSeasideImage`:
>>>> 
>>>>> "Patched code from upgradeSeasideImage (to avoid removing base ConfigurationOf class)"
>>>>> GsFile gciLogServer: 'Automatically generating list of loaded configuration classes'.
>>>>> UserGlobals at: #BootstrapExistingConfigurationList put: OrderedCollection new.
>>>>> UserGlobals associationsDo: [:assoc |
>>>>>   assoc value isBehavior
>>>>>     ifTrue: [
>>>>>       ((assoc key asString _findString: 'ConfigurationOf' startingAt: 1 ignoreCase: false) == 1 and: [assoc key ~= #ConfigurationOf])
>>>>>         ifTrue: [
>>>>>           GsFile gciLogServer: '  ', assoc key asString.
>>>>>           (UserGlobals at: #BootstrapExistingConfigurationList) add: assoc value ]
>>>>>     ].
>>>>> ].
>>>> 
>>>> --
>>>> Ken Treis
>>>> Miriam Technologies, Inc.
>>>> (866) 652-2040 x221
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Glass mailing list
>>>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass <http://lists.gemtalksystems.com/mailman/listinfo/glass>
>>> 
>>> _______________________________________________
>>> Glass mailing list
>>> Glass at lists.gemtalksystems.com <mailto:Glass at lists.gemtalksystems.com>
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass <http://lists.gemtalksystems.com/mailman/listinfo/glass>
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20180213/32ca7216/attachment-0001.html>


More information about the Glass mailing list