ZCM 10.2.1 schema upgrade failures and missing elements in the ZCC. Running preglobal actions manually for 10.2.1

  • 7004398
  • 08-Sep-2009
  • 27-Apr-2012

Environment

Novell ZENworks 10 Configuration Management with Support Pack 2 first update - 10.2.1

Situation

NOTE: This TID describes the steps required to manually perform the preglobal actions manually for ZENworks version 10.2.1 system update only.  The steps will vary from each system update.
 
The causes of preglobal actions to fail during System Update are best determined by the logs.  The cause of the incorrect system update to be applied is likely a preglobal jar file from a previous version causing duplicate in path.

Resolution

Note:  If previous version of pre-global-actions-10.*.jar exists in %ZENWORKS_HOME%\lib\java or /opt/novell/zenworks/java/lib  then remove it first. 
 
Improper cleanup of the manually downloaded beta preglobal jar will cause conflicts and the one in the default path will be used instead of the system update path during standard system update.
 
Backup the ZCM database:
zman db <backup directory> Backs up the embedded Sybase SQL Anywhere database
<backup directory> - The local directory on the database server or the network location where the database files are backed up. Ensure that the parent directory already exists and has sufficient disk space.
Extend the ZCM database Schema:

Extract pre-global-actions-10.2.1.jar file
Windows: C:\Program Files\Novell\ZENworks\work\system-update\apply\<guid>\pre-globalactions-10.2.1.jar
Linux: /var/opt/novell/zenworks/content-repo/system-update/<guid>/pre-globalactions-10.2.1.jar

It will create the following file structure where it gets extracted:
\com
\META-INF
\oracle
\sql-anywhere
\sql-server
 
Use the folder for the type of database being used (e.g. embedded sybase will be sql-anywhere folder). The schema *.sql files have to be ran in a specific order. This order can be found in the META-INF/system-update.properties in the extracted fileset. The beginning of the file gives the order, and some files in the system-update.properties file will not be available in the extracted database folder, just skip those. Make sure each one completes before running the next.

To run the sql files for the embedded sybase database, use dbisql which gets installed with ZCM.

Windows: run dbisql from the command line
Linux: /opt/novell/zenworks/share/sybase/bin32/dbisql

NOTE: To get the credentials for the Sybase SQL database for authentication, run "zman dgc". For other databases refer to the database administrator for making a connection to run the referenced *.sql files.
 
If an error is returned for any .sql script, run it again.

NOTE: if a file returns a message about being too large and dbisql truncates it. Open the file in an editor and create new smaller files from each of the 5 sections noted in the file. Run each of these in dbisql.

To run the files, open them from the file menu, and then execute them (F9).
When finished, restart the zcm services: novell-zenworks-configure -c Start
 
Add the following to ZCC:
Configuration > Inventory > Inventory
Add these to the list of "Skip Directories ":
C:\WINDOWS\ie7updates
C:\WINDOWS\$hf_mig$
 
  

Bug Number

544368

Additional Information

How can you know if preglobal actions were run?
 
The best way to know if the preglobal actions were run is to inspect the loader-messages.log from the first primary server that had the update applied to it. The preglobal actions are applied once, when the system update applied to the server.
 
What errors may be seen if the incorrect preglobal actions were run, or the preglobal actions had failed to run during the system update process?
 
Most commonly sqlGrammarExceptions due to missing or incomplete information in the database.  For example:
 
com.novell.zenworks.datamodel.exceptions.InternalDataModelException: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: java.sql.SQLException: [Sybase][ODBC Driver][SQL Anywhere]Column 'UpdateName' not found
 
where 'UpdateName' in the example above is a column that was not updated in the table due to preglobal failure or incorrect preglobal being applied.