OK, let me step back. Even though I figured out the issue reported above, now I'm running into another one.
So it seems, the update script (postinst) adds 3 settings to the as.conf, one of which is config_db_local. Once I added those to my as.conf, I started getting a different error. Then I redid the entire install steps for the docker container.
So forgetting about docker and changing the OS, here are two scenarios:
Scenario 1: Install 2.6.1, then install 2.7.3 on top via "dpkg -i" everything works fine.
Scenario 2. Install 2.6.1, back up (copy) the folder /usr/local/openvpn_as, uninstall 2.6.1, restore the folder /usr/local/openvpn_as and install 2.7.3, I get the following error:
2019-04-02T21:42:31-0400 [stdout#info] *** MyError.report ***
2019-04-02T21:42:31-0400 [stdout#info] Stack Traceback
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/sagent/svcset.py', 150, 'transition', None)
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/sagent/svcset.py', 709, '__init__', None)
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/sagent/svcset.py', 668, 'init_components', None)
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/sagent/svcset.py', 530, 'init_connectivity_test', None)
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/ctest/ctcli.py', 160, '__init__', None)
2019-04-02T21:42:31-0400 [stdout#info] ('build/bdist.linux-x86_64/egg/pyovpn/ssl/sslctx.py', 71, '__init__', None)
2019-04-02T21:42:31-0400 [stdout#info] ('/usr/local/openvpn_as/lib/python2.7/site-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/python/deprecate.py', 792, 'wrapped', 'return wrappee(*args, **kwargs)')
2019-04-02T21:42:31-0400 [stdout#info] ('/usr/local/openvpn_as/lib/python2.7/site-packages/Twisted-17.9.0-py2.7-linux-x86_64.egg/twisted/internet/_sslverify.py', 1517, '__init__', 'SSL.OP_NO_SSLv2 | SSL.OP_NO_COMPRESSION |')
2019-04-02T21:42:31-0400 [stdout#info] Server agent initialization failed: 'module' object has no attribute 'OP_NO_COMPRESSION': sagent/svcset:150,sagent/svcset:709,sagent/svcset:668,sagent/svcset:530,ctest/ctcli:160,ssl/sslctx:71,python/deprecate:792,internet/_sslverify:1517 (exceptions.AttributeError)
2019-04-02T21:42:31-0400 [-] Main loop terminated.
2019-04-02T21:42:31-0400 [twisted.scripts._twistd_unix.UnixAppLogger#info] Server Shut Down.
There is something in the package update process that only happens when it is "upgrading" and I can't figure it out.
The reason I need to make it work with the second scenario above is that I'm one of the maintainers of the linuxserver docker image for this. As you know, docker images are ephemeral and the OS gets destroyed and recreated when the container is recreated, and only the data remains (in this case the openvpn_as folder). Docker images can contain different versions of the app. With openvpn, if the version in the image is different than the version the data was used under, it bombs. Currently, the only way we could potentially make it work is, when a new container is created, it would check the version that was used with the existing data, install that version, then install the latest version on top, which would be a very ugly and dirty hack.
As an aside, are there any plans to incorporate the db or conf update/convert steps into the openvpn-as service rather than doing them through the installer? I can think of many reasons why it would be beneficial (not just for dockers).