Seite 1 von 1

opsi local image restore error

Verfasst: 23 Feb 2015, 08:57
von EricT
Hi,

we're using the local-image-extension (version 4.0.4.1) for our course-laptops.
The laptops were configured, an image was created, and the first course with the laptops has just finished.

When I want to restore the laptops, using opsi-local-image-restore, the process stops with error "name 'opsiproduct' is not defined".

Configuration for client settings:
askbeforeinstall = false
image = CourseImage28012015
imagefiles_list = CourseImage28012015
method = rsync-partclone-image
setup_after_testore = windomain
update_and_backup = true

The image-directory is present on the backup-partition, containing the imagefile (35GB, only one image was created), img.ini, productOnClients.json and sec-backup.txt.
The messages on the client show the partition-info and the imagename, then the error occurs.

What does this error mean, the image-file is not found by the restore process?

Thanks in advance for your reply.

Regards, Eric

Re: opsi local image restore error

Verfasst: 23 Feb 2015, 12:43
von EricT
This is what's logged in bootimage-tab of the opsi config editor:

[5] [Feb 23 11:34:39] /dev/sda4 exists as device with label: opsidata (setup.py|464)
[5] [Feb 23 11:34:39] /dev/sda4 exists as expected - fine (setup.py|466)
[5] [Feb 23 11:34:39] /dev/sda4 is not mounted (setup.py|491)
[5] [Feb 23 11:34:39] mount -t ext4 /dev/sda4 /mntimg (setup.py|499)
[5] [Feb 23 11:34:40] /dev/sda4 mounted on /mntimg - fine.. (setup.py|502)
[7] [Feb 23 11:34:40] Parsing ini file '/mntimg/CourseImage28012015/img.ini' (__init__.py|499)
[7] [Feb 23 11:34:40] Trying to lock file '/mntimg/CourseImage28012015/img.ini' (0/2000) (__init__.py|198)
[7] [Feb 23 11:34:40] File '/mntimg/CourseImage28012015/img.ini' locked after 0 millis (__init__.py|219)
[7] [Feb 23 11:34:40] Finished reading file after 0.006 seconds (__init__.py|575)
[4] [Feb 23 11:34:40] Could not find meta data file: /mntimg/CourseImage28012015/img.ini - bad.. (setup.py|517)
[7] [Feb 23 11:34:40] Executing jsonrpc method 'productOnClient_getObjects' on host <server IP-address> (JSONRPC.py|104)
[7] [Feb 23 11:34:40] Starting new HTTPS connection (0) to <server IP-address>:4447 (HTTP.py|582)
[7] [Feb 23 11:34:40] Connection established to: <server IP-address> (HTTP.py|595)
[7] [Feb 23 11:34:40] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.py|167)
[7] [Feb 23 11:34:40] Closing connection: <httplib.HTTPSConnection instance at 0x8eaaeec> (HTTP.py|509)
[7] [Feb 23 11:34:40] Content-Type: gzip-application/json;charset=utf-8, Content-Encoding: gzip (JSONRPC.py|668)
[7] [Feb 23 11:34:40] Expecting compressed data from server (JSONRPC.py|672)
[2] [Feb 23 11:34:41] Traceback: (Logger.py|754)
[2] [Feb 23 11:34:41] line 1463 in '<module>' in file '/usr/local/bin/master.py' (Logger.py|754)
[2] [Feb 23 11:34:41] line 551 in '<module>' in file '/tmp/setup.py' (Logger.py|754)
[2] [Feb 23 11:34:41] ==>>> name 'opsiproduct' is not defined (master.py|1511)

First there's the error about not finding metadata of img.ini (although successfully read according to the previous messages) and subsequently (apparantly) missing the opsiproduct variable?

Thanks.
Regards, Eric

Re: opsi local image restore error

Verfasst: 23 Feb 2015, 13:44
von d.oertel
Hi,

this is a fixed bug.

Code: Alles auswählen

opsi-local-image-restore (4.0.5.1-4) stable; urgency=low
	* fix: imageFile.lower() while reading img.ini (bug in iniFileHandler ?)
 -- detlef oertel <d.oertel@uib.de>  Thu, 07 Aug 2014 16:01:53 +0200
It occurs if the ImageFileName contains capital letters.
We recommend to update to opsi 4.0.5 and the opsi-local-image products in
http://download.uib.de/opsi4.0/products ... cal-image/

as workaround you may use imagNames without capital letters.

regards

d.oertel

Re: opsi local image restore error

Verfasst: 26 Feb 2015, 10:15
von EricT
Hi Detlef,

thanks for your reply.
As a workaround to restore the image, I've changed the imagefilename (on the backup partition on the client and in the property of the package in opsi config editor) and the reference to it in img.ini to lowercase.

We're planning the upgrade to version 4.0.5.

Regards, Eric