Problem Description:


When upgrading from infoworks versions < 2.8 to 3.1, upgrade.sh script can fail with the following error trace.


2020-06-15 16:47:36,969 - root - INFO : 933 - WARN: Error while retrieving key: mongoha from file.

2020-06-15 16:47:36,970 - root - INFO : 933 - 2020-06-15 16:47:36,966 - ERROR - Error while retrieving key: mongoha from file.

2020-06-15 16:47:36,972 - root - INFO : 933 -     return self.__missing__(key)            # support subclasses that define __missing__

2020-06-15 16:47:36,973 - root - INFO : 933 - KeyError: 'mongoha'

2020-06-15 16:47:36,973 - root - INFO : 933 - During handling of the above exception, another exception occurred:

2020-06-15 16:47:36,976 - root - INFO : 933 - configparser.NoOptionError: No option 'mongoha' in section: 'dummysection'

2020-06-15 16:47:36,976 - root - INFO : 933 - During handling of the above exception, another exception occurred:

2020-06-15 16:47:36,983 - root - INFO : 933 -     if IWUtils.get_value_from_file("mongoha") == "y":

2020-06-15 16:47:36,983 - root - INFO : 933 - RuntimeError: Error while retrieving key: mongoha from file.

2020-06-15 16:47:38,507 - root - INFO : 933 - Warning: No option 'mongoha' in section: 'dummysection'

2020-06-15 16:47:38,507 - root - INFO : 933 - WARN: Error while retrieving key: mongoha from file.


Root cause:


This issue happens when the mongoha key value is missing in $IW_HOME/conf.properties. upgrade.sh script checks for the key mongoha in conf.properties to determine the mongo metadata database startup / upgrade routine. 


Solution/Workaround:


Add the key mongoha with value n in a new line as follows


mongoha=n


Applicable Infoworks DataFoundry versions:


v3.1