Univention Bugzilla – Bug 30379
UMC module for UCC image management
Last modified: 2014-06-12 09:19:49 CEST
Right now the download of UCC images from the Univention mirror is performed via a postinst script downloading the image during installation. The download of additional images (e.g. the desktop image) and the removal of images can only be performed on the command line.
There should be a UMC system module to download/update/remove images.
That way the installation in the App Center would only install the management integration bits and the download of UCC images would be performed using the UMC module.
The image mirror now contains an index file image-index.txt with available UCC images. The format is:
ucc-2.0-rev1-desktop-image.img.spec UCC 2.0 desktop image (revision 1)
ucc-2.0-rev1-thinclient-image.img.spec UCC 2.0 thin client image (revision 1)
Three changes have been made to the spec file format generated by UCC image toolkit:
- The spec file contains now a human-readable description
- The version no longer includes the Ubuntu codename, making it more easily readable
- There's now an "id" field, which can be used to track generations of images, i.e. e.g. when we publish a second revision of the UCC 2.0 desktop image, the ID remains the same.
Created attachment 5899 [details]
Example file for the updated specs
The tool ucc-image-download has been refactored in order to move its main functionality into a python module (→ import ucc.images).
* Bug #30379: refactored python functions for image download in lib module
* Bug #30379: added methods to query available and installed UCC images
* Bug #30379: use a smaller chunksize for decompression in order to avoid
the usage of too much memory
* Bug #30379: allow for uncompressed images, remove originating file after
A first version of the UMC module with download functionality has been committed.
* Bug #30379: added UCCImage class and adapted ucc.images for integration
with UMC module
* Bug #30379: integrated UCCImage class, added download functionality
Added image removal functionality and enhanced error handling.
* Bug #30379: added handling for image removal
* Bug #30379: enhanced error handling
* Bug #30379: adapted and refactored ucc-image-remove
(In reply to Moritz Muehlenhoff from comment #1)
> The image mirror now contains an index file image-index.txt with available
> UCC images. The format is:
> SPECFILENAME DESCRIPTION
> ucc-2.0-rev1-desktop-image.img.spec UCC 2.0 desktop image (revision 1)
> ucc-2.0-rev1-thinclient-image.img.spec UCC 2.0 thin client image (revision
Update: The image-index.txt file now only contains the names of the spec files.
* Bug #30379: fixed handling of uncompressed file, make validation of spec
files less strict for CLI tools, added l10n function to error messages
* Bug #30379: do not list images that do not meet strict validation criteria
for the spec file
* Bug #30379: adjust CLI tool output, add get_latest_online_ucc_image()
* Bug #30379: adjustments for unified progress handling
Currently, downloaded images have the 600 as access rights and file owner is root. File access should be 644.
(In reply to Alexander Kläser from comment #12)
> Currently, downloaded images have the 600 as access rights and file owner is
> root. File access should be 644.
This has been fixed.
* Bug #34360: make sure that access rights are 0644 for all image files
If I close the UMC module while a download of an image is in progress it's marked as installed when I reopen the module, this should be caught.
See changes below.
Some notes for the detection of concurrent downloads. During a download, a <spec_file>.progress file is created and continuously updated. It contains one line of the format:
<PID> <percentFinished> <message>
A concurrent download is detected if the .progress file exists AND the process with the given ID exists AND the .progress file has been modified within the last 5 min.
Some notes on the status:
* installed → spec_file, image file, and join script exist in the UCC image dir
* incomplete → some, but not all of the above mentioned files exist
* downloading → in case of a concurrent download
* available → otherwise
* Set Python version to 2.6
* detect and block concurrent downloads
* fixed calculation of free hard disk space
* status property = [available|installed|incomplete|downloading]
* added confirmation dialogue for download
* block concurrent download
* added refresh action
(In reply to Moritz Muehlenhoff from comment #14)
> If I close the UMC module while a download of an image is in progress it's
> marked as installed when I reopen the module, this should be caught.
This has been fixed with the detection of concurrent downloads (see 2 comments above).
- The detection of available disk space is working fine now.
- Concurrent downloads are now detected/prevented, on the command line tool and in the UMC interface
- The size of the images to-be-downloaded is now displayed to give the user an indication of how long it will take
- The download on a member server worked fine as well, the image was also registered in the LDAP directory afterwards
The only remaining thing which needs to be QAed is the i18n.
It seems that no settings/ucc_image objects are created in LDAP?
(In reply to Alexander Kläser from comment #20)
> It seems that no settings/ucc_image objects are created in LDAP?
No, my fault, I did not install the integration package.
Missing translations + changelog entry have been added.
* Bug #34360: added translations
* Bug #30379: added translations
The description of the module is now:
[en] "Download and management of UCC images"
[de] "Herunterladen und Verwalten von UCC-Images"
* Bug #30379: adpated module description
Translation looks good as well.
UCC 2.0 has been released:
If this error occurs again, please use "Clone This Bug".