Bug 29196 - Fehlermeldung beim Update auf 3.1
Fehlermeldung beim Update auf 3.1
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: pkgdb
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Janek Walkenhorst
Stefan Gohmann
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-12 09:13 CET by Stefan Gohmann
Modified: 2012-12-12 21:08 CET (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2012-11-12 09:13:54 CET
Umgebung mit der PKGDB auf dem Slave. Wenn ich den Master aktualisiere bekomme ich die folgende Meldung:

Mo 12. Nov 09:06:00 CET 2012
Setting version/version
Setting version/patchlevel
File: /etc/lsb-release
File: /etc/issue
File: /etc/issue.net
File: /etc/apt/sources.list.d/20_ucs-online-component.list
File: /etc/apt/mirror.list
File: /etc/apt/sources.list.d/15_ucs-online-version.list
Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 513, in main
    return action_scan(connection, cursor, config_registry)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 417, in action_scan
    sql_put_sys_in_systems(cursor, sysname, sysversion, sysrole, ldaphostdn, architecture)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 236, in sql_put_sys_in_systems
    cursor.execute(sql_command, parameters)
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 259, in execute
    self.executemany(operation, (params,))
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 289, in executemany
    raise DatabaseError("error '%s' in '%s'" % (msg, sql))
pg.DatabaseError: error 'FEHLER:  Spalte »architecture« von Relation »systems« existiert nicht
LINE 6:                        architecture,
                               ^
' in '
                INSERT INTO systems (sysname,
                                     sysversion,
                                     sysrole,
                                     ldaphostdn,
                                     architecture,
                                     scandate)
                       VALUES('master301',
                              '3.1-0',
                              'domaincontroller_master',
                              'cn=master301,cn=dc,cn=computers,dc=deadlock30,dc=local',
                              'amd64',
                              CURRENT_TIMESTAMP)
                '
Comment 1 Stefan Gohmann univentionstaff 2012-11-12 09:14:14 CET
Bitte einmal prüfen.
Comment 2 Janek Walkenhorst univentionstaff 2012-11-13 13:32:55 CET
univention-pkgdb (6.0.17-1) unterstützt jetzt das Speichern der Daten im alten Datenbank-Schema.

Kein Changelog, da die Schema-Änderung erst mit 3.1 eingeführt wurde.
Comment 3 Stefan Gohmann univentionstaff 2012-11-15 08:10:58 CET
Jetzt kommt diese Meldung:

Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 556, in main
    return action_scan(connection, cursor, config_registry)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 461, in action_scan
    scan_and_store_packages(cursor, sysname)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 419, in scan_and_store_packages
    cursor.execute(insert_statement)
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 259, in execute
    self.executemany(operation, (params,))
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 289, in executemany
    raise DatabaseError("error '%s' in '%s'" % (msg, sql))
pg.DatabaseError: error 'FEHLER:  NULL-Wert in Spalte »vername« verletzt Not-Null-Constraint
' in ' 
        INSERT INTO packages_on_systems (scandate,
                                         sysname,
                                         currentstate,
                                         inststate,
                                         inststatus,
                                         pkgname,
                                         selectedstate,
                                         vername)
               VALUES
        (
        CURRENT_TIMESTAMP,
        'master301',
        0,
        0,
        'n',
        'samba-ldb-tools',
        0,
        NULL)
        ,(
        CURRENT_TIMESTAMP,
        'master301',
        6,
        0,
        'i',
        'console-common',
        1,
        '0.7.85.14.201110191222')
        ,(
        CURRENT_TIMESTAMP,
        'master301',
        0,
Comment 4 Stefan Gohmann univentionstaff 2012-11-15 09:25:26 CET
Falls du keine Testumgebung dafür hast: 10.201.30.1
Comment 5 Janek Walkenhorst univentionstaff 2012-11-15 11:37:30 CET
(In reply to comment #3)
> pg.DatabaseError: error 'FEHLER:  NULL-Wert in Spalte »vername« verletzt
> Not-Null-Constraint
Wenn Du das Fehlen der Architektur-Spalte eine alte Datenbank erkannt wird, dann wird weiterhin "" anstatt NULL in die Datenbank geschrieben wenn für ein Paket keine Version vorhanden ist.

univention-pkgdb (6.0.17-2)
Comment 6 Stefan Gohmann univentionstaff 2012-11-15 12:06:18 CET
Ja, funktioniert jetzt. Ich habe die Bugnummer im Changelog noch ergänzt.
Comment 7 Stefan Gohmann univentionstaff 2012-12-12 21:08:53 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".