[racktables-users] Errors upgrading from 0.19.11 → 0.19.12 → 0.19.13

  • From: "Tyler J. Wagner" <tyler@xxxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 10 Aug 2012 11:27:59 +0100

I upgraded from 0.19.11 to 0.19.13 yesterday. Attached are the upgrade
errors. I manually resolved these, but they should be addressed.

Executing batch '0.19.12'       The following queries failed:
INSERT INTO AttributeMap (objtype_id, attr_id, chapter_id) VALUES (965, 4,
37) -- Duplicate entry '965-4' for key 'objtype_id'

This happens because "Wireless" objects previously used the Router OS
dictionary, but now seem to have their own dictionary. One solution is to
have the upgrade forceable switch this dictionary, unless the user has
actually used entries. Otherwise there is no fix. At minimum it should be
in the changelog to warn people.

Executing batch 'dictionary'    The following queries failed:

INSERT INTO Dictionary (dict_key, chapter_id, dict_value) VALUES (1691, 11,
'Dell PowerEdge%GPASS%R715'), (1692, 11, 'Dell PowerEdge%GPASS%R720'),
(1693, 11, 'Dell PowerEdge%GPASS%R720xd'), (1694, 11, 'Dell
PowerEdge%GPASS%R810'), (1695, 11, 'Dell PowerEdge%GPASS%R815'), (1696, 11,
'Dell PowerEdge (blade)%GPASS%M620'), (1697, 11, 'Dell PowerEdge
(blade)%GPASS%M710HD'), (1698, 11, 'Dell PowerEdge (blade)%GPASS%M915'),
(1699, 12, 'Dell PowerConnect (blade)%GPASS%M6348'), (1700, 12, 'Dell
PowerConnect (blade)%GPASS%M8428'), (1701, 13, '[[RH Fedora%GSKIP%Fedora 16
| http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/]]'),
(1702, 12, 'Dell PowerConnect%GPASS%8024'), (1703, 12, 'Dell
PowerConnect%GPASS%8024F'), (1704, 13, 'Ubuntu%GSKIP%Ubuntu 10.04 LTS'),
(1705, 13, 'Ubuntu%GSKIP%Ubuntu 10.10'), (1706, 13, 'Ubuntu%GSKIP%Ubuntu
11.04'), (1707, 13, 'Ubuntu%GSKIP%Ubuntu 11.10'), (1708, 13,
'Ubuntu%GSKIP%Ubuntu 12.04 LTS'), (1709, 13, '[[Debian%GSKIP%Debian 7.0
(wheezy) | http://debian.org/releases/wheezy/]]'), (49999, 13, '[[RH
Fedora%GSKIP%Fedora 15 |
http://docs.fedoraproject.org/release-notes/f15/en-US/html/]]') --
Duplicate entry '13-Ubuntu%GSKIP%Ubuntu 10.04 LTS' for key 'chap_to_val'

This happened because I already had local entries for recent Ubuntu
releases that exactly matched the text used in the new dictionary updates.
Solutions:

1. Don't require unique dictionary entries.
2. Identify textual collisions and append a " (local)" to existing entries
before adding the new values.
3. Run the insert statements separately so only the collision insertion
fails, instead of all of them. I had to manually insert all the missing
entries.

Regards,
Tyler

-- 
"We should forget about small efficiencies, say about 97% of the time;
premature optimization is the root of all evil."
   -- Donald Knuth
Title: RackTables upgrade script

Platform check status

PDO extensionPASSED
PDO-MySQL extensionPASSED
PCRE extensionPASSED
PCRE compiled with
--enable-unicode-properties
PASSED
SNMP extensionPASSED
GD extensionPASSED
Multibyte string extensionPASSED
LDAP extensionPASSED
PCNTL extensionNOT PRESENT
JSON extensionPASSED
cURL extensionPASSED
accessed over HTTPSPASSED

Upgrade status

Current statusData version: 0.19.11
Code version: 0.19.13
Upgrade path0.19.11 → 0.19.12 → 0.19.13
Executing batch '0.19.12'The following queries failed:
INSERT INTO AttributeMap (objtype_id, attr_id, chapter_id) VALUES (965, 4, 37) -- Duplicate entry '965-4' for key 'objtype_id'
Executing batch '0.19.13'done
Executing batch 'dictionary'The following queries failed:
INSERT INTO Dictionary (dict_key, chapter_id, dict_value) VALUES (1691, 11, 'Dell PowerEdge%GPASS%R715'), (1692, 11, 'Dell PowerEdge%GPASS%R720'), (1693, 11, 'Dell PowerEdge%GPASS%R720xd'), (1694, 11, 'Dell PowerEdge%GPASS%R810'), (1695, 11, 'Dell PowerEdge%GPASS%R815'), (1696, 11, 'Dell PowerEdge (blade)%GPASS%M620'), (1697, 11, 'Dell PowerEdge (blade)%GPASS%M710HD'), (1698, 11, 'Dell PowerEdge (blade)%GPASS%M915'), (1699, 12, 'Dell PowerConnect (blade)%GPASS%M6348'), (1700, 12, 'Dell PowerConnect (blade)%GPASS%M8428'), (1701, 13, '[[RH Fedora%GSKIP%Fedora 16 | http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/]]'), (1702, 12, 'Dell PowerConnect%GPASS%8024'), (1703, 12, 'Dell PowerConnect%GPASS%8024F'), (1704, 13, 'Ubuntu%GSKIP%Ubuntu 10.04 LTS'), (1705, 13, 'Ubuntu%GSKIP%Ubuntu 10.10'), (1706, 13, 'Ubuntu%GSKIP%Ubuntu 11.04'), (1707, 13, 'Ubuntu%GSKIP%Ubuntu 11.10'), (1708, 13, 'Ubuntu%GSKIP%Ubuntu 12.04 LTS'), (1709, 13, '[[Debian%GSKIP%Debian 7.0 (wheezy) | http://debian.org/releases/wheezy/]]'), (49999, 13, '[[RH Fedora%GSKIP%Fedora 15 | http://docs.fedoraproject.org/release-notes/f15/en-US/html/]]') -- Duplicate entry '13-Ubuntu%GSKIP%Ubuntu 10.04 LTS' for key 'chap_to_val'
SummaryUpgrade complete, it is Ok to enter the system.

Other related posts:

  • » [racktables-users] Errors upgrading from 0.19.11 → 0.19.12 → 0.19.13 - Tyler J. Wagner