Seite 1 von 1

[solved] 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 08 Sep 2016, 13:34
von a.Till
Hallo zusammen,

in den letzten Tagen wurden Updates in unserer OPSI Installation eingespielt.

Bei einer Client Installation viel hierbei heute ein Fehler bei der Hardware-Inventarisierung auf. Die Installation stoppt mit der Meldung

(1054, "Unknown coloumn 'NumberOfCores' in 'where clause'")

Eine kurze Recherche hier im Forum brachte mich darauf, dass warscheinlich etwas mit dem MySQL Server nicht stimmt.
Der Befehl

Code: Alles auswählen

opsi-setup --update-mysql
führt zu folgendem Fehler:

Code: Alles auswählen

opsi:~# opsi-setup --update-mysql
[5] [Sep 08 13:22:42] Connection to database 'opsi' on 'localhost' as user 'opsi' (MySQL.py|47)
[5] [Sep 08 13:22:49] Updating database table HARDWARE_DEVICE_USB_DEVICE (MySQL.py|169)
[5] [Sep 08 13:22:49] Updating database table HARDWARE_DEVICE_AUDIO_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:49] Updating database table HARDWARE_DEVICE_PCI_DEVICE (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_NETWORK_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_HDAUDIO_DEVICE (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_FLOPPY_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_USB_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_PCMCIA_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_VIDEO_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_SCSI_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_1394_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating database table HARDWARE_DEVICE_IDE_CONTROLLER (MySQL.py|169)
[5] [Sep 08 13:22:50] Updating productId Columns (MySQL.py|447)
[5] [Sep 08 13:22:50] Updating field 'description' on table PRODUCT_PROPERTY (MySQL.py|460)
[5] [Sep 08 13:22:50] Updating field 'description' on table BOOT_CONFIGURATION (MySQL.py|460)
[2] [Sep 08 13:22:50] Traceback: (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/bin/opsi-setup", line 2182, in <module>
    main()
 (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/bin/opsi-setup", line 2137, in main
    updateMySQLBackend(additionalBackendConfiguration=backendConfig)
 (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/UpdateBackend/MySQL.py", line 465, in updateMySQLBackend
    column=fieldName
 (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 445, in execute
    res = cursor.execute(query)
 (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
 (Logger.py|753)
[2] [Sep 08 13:22:50]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 (Logger.py|753)
[2] [Sep 08 13:22:50]      ==>>> (1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist") (opsi-setup|2186)

ERROR: (1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist")

Ich nehme an dass hier eine Routine beim Update schief lief und den Table nicht angelegt hat.

Code: Alles auswählen

opsi-setup --init-current-config
läuft problemlos durch:

Code: Alles auswählen

opsi-setup --init-current-config
[4] [Sep 08 13:17:18] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 08 13:17:18] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Sep 08 13:17:18] Creating base path: '/var/lib/opsi/config' (File.py|233)
[5] [Sep 08 13:17:18] Try to find a Configserver. (opsi-setup|1796)
[5] [Sep 08 13:17:18] Getting current system config (opsi-setup|111)
[4] [Sep 08 13:17:18] Failed to get vendor/device id for network device eth0 (Posix.py|469)
[5] [Sep 08 13:17:18] System information: (opsi-setup|164)
[5] [Sep 08 13:17:18]    distributor  : Debian (opsi-setup|165)
[5] [Sep 08 13:17:18]    distribution : Debian GNU/Linux 7.11 (wheezy) (opsi-setup|166)
[5] [Sep 08 13:17:18]    ip address   : 10.122.193.101 (opsi-setup|167)
[5] [Sep 08 13:17:18]    netmask      : 255.255.252.0 (opsi-setup|168)
[5] [Sep 08 13:17:18]    subnet       : 10.122.192.0 (opsi-setup|169)
[5] [Sep 08 13:17:18]    broadcast    : 10.122.195.255 (opsi-setup|170)
[5] [Sep 08 13:17:18]    fqdn         : opsi.hsg.privat (opsi-setup|171)
[5] [Sep 08 13:17:18]    hostname     : opsi (opsi-setup|172)
[5] [Sep 08 13:17:18]    domain       : hsg.privat (opsi-setup|173)
[5] [Sep 08 13:17:18]    win domain   : WORKGROUP (opsi-setup|174)
[5] [Sep 08 13:17:18] Configuring client user pcpatch (opsi-setup|180)
[5] [Sep 08 13:17:18]    Creating RSA private key for user pcpatch in '/var/lib/opsi/.ssh/id_rsa' (opsi-setup|194)
[5] [Sep 08 13:17:19] Setting rights on directory '/var/lib/opsi/.ssh' (Rights.py|121)
[4] [Sep 08 13:17:19] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 08 13:17:19] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[4] [Sep 08 13:17:19] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 08 13:17:19] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
Es handelt sich um ein Debian 7.11 System mit der entsprechenden Paketquelle

Code: Alles auswählen

deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40/Debian_7.0 ./

Code: Alles auswählen

opsi:~# dpkg -l | grep opsi
ii  opsi-atftpd                          0.7.dfsg-6                        i386         advanced TFTP server - opsi version with pcre, fifo and max-blksize patches
ii  opsi-configed                        4.0.7.1.3-1                       all          OPSI config editor
ii  opsi-depotserver                     4.0.6.7-2                         all          opsi depotserver configuration package
ii  opsi-linux-bootimage                 20160706-1                        i386         opsi bootimage for netboot tasks.
ii  opsi-utils                           4.0.7.5-1                         all          utilites for working with opsi.
ii  opsiconfd                            4.0.7.4-1                         all          opsi configuration service
ii  opsipxeconfd                         4.0.7.1-1                         all          opsi pxe configuration daemon
ii  python-opsi                          4.0.7.17-1                        all          opsi python library

Code: Alles auswählen

opsi:~# opsi-package-manager -l | grep opsi
- opsi.hsg.privat -
   cancelbutton                      1.0-1                     opsiclientd_cancelbutton                                                                                                        
   delete_opsi-client                1.0-1                     Delete OPSI Client                                                                                                              
   opsi-adminutils                   4.0.3-1                   some administration tools (not only) for opsi                                                                                   
   opsi-client-agent                 4.0.7.7-1                 opsi.org client agent                                                                                                           
   opsi-clonezilla                   4.0.7.2-2                 Clonezilla over opsi                                                                                                            
   opsi-configed                     4.0.7.1.3-3               opsi configed                                                                                                                   
   opsi-logviewer                    2.2-2                     opsi logfile viewer                                                                                                             
   opsi-set-win-uac                  1.0-2                     opsi set Windows UAC                                                                                                            
   opsi-setup-detector               4.0.6.132-1               opsiSetupDetector                                                                                                               
   opsi-template                     4.0.6-1                   opsi template product                                                                                                           
   opsi-template-with-admin          4.0.6-1                   opsi template for installs with logged in admin                                                                                 
   opsi-uefi-netboot                 4.0.5-3                   opsi-uefi-netboot                                                                                                               
   opsi-wim-capture                  4.0.7.1-1                 opsi-wim-capture                                                                                                                
   opsi-winpe                        1.0-1                     WinPE patching tool                                                                                                             
   opsi-winst                        4.11.6.2-1                winst                                                                                                                           
   opsi-winst-test                   4.11.6.1-1                opsi-winst test                                       
   
Vielen Dank für die Hilfe.

Mit freundlichen Grüße,

Andreas

Re: 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 08 Sep 2016, 13:43
von ueluekmen
Bitte mal den Inhalt der Dispatch.conf prüfen und ggf. posten.

Re: 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 08 Sep 2016, 14:07
von a.Till
Natürlich, hier:

Code: Alles auswählen

backend_.*         : file, opsipxeconfd
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
audit.*            : mysql
.*                 : file

Re: 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 08 Sep 2016, 14:38
von ueluekmen
Änder deine Zeile:

Code: Alles auswählen

backend_.*         : file, opsipxeconfd
in

Code: Alles auswählen

backend_.*         : file, mysql, opsipxeconfd
Danach noch mal ein init-current-config und danach noch mal ein cleanup-backend. Vorher ein opsi-backup wäre auch nicht schlecht ;).

Zum Schluss die Dienste neustarten nicht vergessen.

Re: 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 08 Sep 2016, 15:17
von a.Till
Hi ueluekmen,

dass hat funktioniert. Zusätzlich musste ich noch einmal die Dateirechte setzen mittels

Code: Alles auswählen

opsi-setup --set-rights
setzen.

Kleine Frage zum Abschluss noch:

die Zeile

backend_.* : file, opsipxeconfd

legt doch fest wie die Daten im Backend gehalten werden, richtig? Wieso ist hier eine Änderung nötig gewesen? Hat sich durch ein Update die Datei verändert oder wird die Einstellung so nicht mehr unterstützt?

Gruß,
Andreas

Re: [solved] 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 09 Sep 2016, 09:41
von ueluekmen
Hi,
a.Till hat geschrieben:legt doch fest wie die Daten im Backend gehalten werden, richtig? Wieso ist hier eine Änderung nötig gewesen? Hat sich durch ein Update die Datei verändert oder wird die Einstellung so nicht mehr unterstützt?
hier hat sich nichts geändert, nur ist die Funktion an der Stelle nicht immer verständlich. Die Zeile backend und die Methoden, die so beginnen, sind allgemeine Backend-Methoden. Deshalb muss hier immer jedes verwendete Backend auftauchen, damit so allgemeine Sachen, wie init-current-config auch in dieses Backend reingreifen kann. Ich hoffe es ist verständlich, ist schwer zu erklären, wenn man nicht zu technisch werden will.

Re: [solved] 1146, "Table 'opsi.BOOT_CONFIGURATION' doesn't exist"

Verfasst: 09 Sep 2016, 11:17
von a.Till
Alles klar, das klingt logisch und leuchtet mir ein.

Gruß,
Andreas