I have decided to make a bug ticket related from a post update I made earlier in the discussion thread. I'm getting the following error when I am attempting to backup a current 2.4.5 installation for an upgrade to 2.6.1:
python setup.py -u -f /tmp/db_backup.xml Traceback (most recent call last): File "setup.py", line 139, in <module> backup_legacy_db(dburi, options.datafile, host, username, password, db) File "setup.py", line 75, in backup_legacy_db converter.port_database(outfile) File "/opt/filelocker/lib/DBTools.py", line 244, in port_database cliKeys = self.GetAllCliKeys() File "/opt/filelocker/lib/DBTools.py", line 504, in GetAllCliKeys newKey = CLIKey(row['host_ipv4'], row['host_ipv6'], row['value']) KeyError: 'host_ipv4'
In the 2.4.5 "core/dao/MySQLDAO.py" file:
CREATE TABLE IF NOT EXISTS `cli_key` ( `cli_key_user_id` varchar(30) NOT NULL, `cli_key_host_ipv4` varchar(15) NOT NULL, `cli_key_host_ipv6` varchar(39) NOT NULL, `cli_key_value` varchar(32) NOT NULL, PRIMARY KEY (`cli_key_user_id`,`cli_key_host_ipv4`,`cli_key_host_ipv6`)
And in "lib/Models.py" for 2.6.1:
__tablename__ = "cli_keys" user_id = Column(String(30), primary_key=True) host_ipv4 = Column(String(15), primary_key=True) host_ipv6 = Column(String(39), primary_key=True) value = Column(String(32))
Shouldn't these be matching values and what not? Or am I missinterpreting this in some way?
Thanks for the details!!! The CLI code was mostly re-written in 2.6, so it operates a bit differently in the DB now. But this should be very helpful. Thanks!
You're welcome! I did a little more digging earlier today and it looks like those field names are used in other files throughout the application so I'm sure some of them will need to be updated accordingly, as well.
Is there going to be a fix for this issue? We're running into the same problem, same versions, upgrading from 2.4.5 to 2.6.1.