Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results

In short: it worked. But it was a long and not automated process.

As you may have seen in a couple of previous posts, there were problems. Most of them are inspired by acs-authentication, and there does not seem to be an easy way around it -- at least not to get the core up and running.

To sum it up, I had to do the following:

  1. As described in the docs, get updated OACS (tar ball from nightlies at old place worked just fine for me in the first test, but for the finishing move a fresh CVS checkout was used.
  2. Back up your database, back up the old filesystem tree (in my case all of what follows was done on a separate upgrade-test database).
  3. Manually run SQL upgrade scripts for:
    • acs-kernel
    • acs-service-contract
  4. Manually install data model for acs-authentication.
  5. Go to packages/acs-tcl/tcl and symlink content of packages/acs-authentication/tcl:
    $ ln -sf ../../acs-authentication/tcl/*.* ./
    
  6. Create a "boot-strap" file as follows and put it under /www (I called it plug.tcl):
    # quick-fixes for 4.6.3 - 5.0 migration
    
    # do not mask out username in login box
    apm_parameter_register "UsePasswordWidgetForUsername" \
         "Should we hide what the user types in the username
          field, the way we do with the password field? Set
          this to 1 if you are us ing sensitive information
          such as social security number for username." \
         acs-kernel 0 number \
         security 1 1
    parameter::set_value -package_id [ad_acs_kernel_id] -parameter UsePasswordWidgetForUsername -value 0
    
    # init acs-authentication
    auth::package_install
    
    I needed it to initialize acs-authentication, as well as to get kernel to stop complaining from out of acs-subsite/lib/login.tcl.
  7. Update authority_id for at least your site-wide admin user (you):
    update users set authority_id = (
           select authority_id
             from auth_authorities
            where enabled_p = 't'
    ) and user_id = your_user_id_here;
    
    Note: I don't have any subsites on this instance, nor do I have any communities, etc. defined -- the above UPDATE may have to be different in your case. What you need to do is to get authority_id of your user to equal main-site authority_id.
  8. Start-up your server -- there should be no issues with it (in fact, mine started up even w/o all of the above -- it just was not very usable :))
  9. First of all, go to /plug.tcl -- this will fully initialize acs-authentication.
  10. Restart server.
  11. Go to /acs-admin/apm as instructed in the docs. You'll be redirected to login page, that will be all messed-up: acs-lang is not correctly installed at this moment.
  12. Log in. There should not be a problem with that.
  13. Follow the "Install packages" link.
  14. I have upgraded first kernel, subsite, service contract and installed authentication. For all (except of subsite) of the above I have deselected all of the data model upgrade sripts -- these were already loaded manually.
  15. Restart and upgrade whatever other remaining packages there are.

With several package upgrades there were issues, and I had to perform a few more manual operations to get it all right. Yet those were non-critical, since most of the core was successfully converted.

At some point I experienced a few issues with acs-lang (or possibly I thought I did) during the initial upgrade, but these did not re-occur.

No patches at this point -- can't really see what/how.

Collapse
Posted by Jade Rubick on
Andrei, were you already on Postgres 7.3? You didn't run the 7.2 -> 7.3 upgrade scripts, then?
Collapse
Posted by Andrei Popov on
The tests were carried out on my laptop (IBM ThinkPad T30 2366-83G), under VMWare. Host OS was Windows 2000 Professional, guest OS is FreeBSD 5.1-CURRENT. Virtual machine has 256Mb memory allocated to it and uses hardware disk (I dual boot into FreeBSD sometimes and the same installation runs fine in both VM and real modes).

PostgreSQL installed from portrs is 7.3.4. AOL Server is 4.0-b10.

Collapse
Posted by Jade Rubick on
Oh, and thank you for your report. This is really useful!
Collapse
Posted by Andrei Popov on
One more: while I think I've listed all the steps, there might be gaps in my short-term memory :)

An important thing was to actually restart the server a couple of times, since some data is cached.

Also, making all db-related changes before even bringing up an instance should be better than what I really did -- cutting & pasting in live...

Collapse
Posted by Don Baccus on
Our plan is to modify the bootstrapper to look for upgrade Tcl scripts and run them.  The idea is we can write such scripts to take whatever custom steps are necessary to get a minimal functioning system up and running again - one that you can log into as the sysadmin then run APM upgrades normally.

Of course with luck this will be the last release that needs such a kludge to upgrade successfully :)

Collapse
Posted by Dirk Gomez on
I don't find the list of manual to-dos too daunting. An Oracle upgrade is way more intricate :) Can you detail the steps you had to take for the packages? - We should address every single issue.

What about templates? The templating system behaviour has changed and I haven't yet seen any mention of noquote woes.

Collapse
Posted by Andrei Popov on
Well, it is not daunting, but the system you get needs a lot of baby-sitting if you wish...  For one, I cannot seem to be able to upgrade sub-site easily -- will most likely have to try and replicate a setup from another 5 instance.

Also, this is a very small instance -- only a few applications are used and there are only a few users.  Not sure what would be the impact if one were to move openacs.org...