Bug 30379 - UMC module for UCC image management
UMC module for UCC image management
Status: CLOSED FIXED
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: Image management
unspecified
Other Linux
: P5 enhancement
: UCC 2.0
Assigned To: Alexander Kläser
Moritz Muehlenhoff
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-11 09:33 CET by Moritz Muehlenhoff
Modified: 2014-06-12 09:19 CEST (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
Example file for the updated specs (757 bytes, text/plain)
2014-05-08 11:51 CEST, Moritz Muehlenhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff univentionstaff 2013-02-11 09:33:33 CET
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.
Comment 1 Moritz Muehlenhoff univentionstaff 2014-04-24 09:38:19 CEST
The image mirror now contains an index file image-index.txt with available UCC images. The format is:

SPECFILENAME DESCRIPTION

Example:

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)
Comment 2 Moritz Muehlenhoff univentionstaff 2014-05-08 11:51:24 CEST
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.
Comment 3 Moritz Muehlenhoff univentionstaff 2014-05-08 11:51:55 CEST
Created attachment 5899 [details]
Example file for the updated specs
Comment 4 Alexander Kläser univentionstaff 2014-05-08 14:01:01 CEST
The tool ucc-image-download has been refactored in order to move its main functionality into a python module (→ import ucc.images).


ucc-image-toolkit (2.0.0-31):
* Bug #30379: refactored python functions for image download in lib module

ucc-image-toolkit (2.0.1-32):
* Bug #30379: added methods to query available and installed UCC images

ucc-image-toolkit (2.0.1-34):
* Bug #30379: use a smaller chunksize for decompression in order to avoid
  the usage of too much memory
Comment 5 Alexander Kläser univentionstaff 2014-05-08 14:29:17 CEST
ucc-image-toolkit (2.0.1-35):
* Bug #30379: allow for uncompressed images, remove originating file after
  decompression
Comment 6 Alexander Kläser univentionstaff 2014-05-09 12:47:42 CEST
A first version of the UMC module with download functionality has been committed.


ucc-image-toolkit (2.0.2-1):
* Bug #30379: added UCCImage class and adapted ucc.images for integration
  with UMC module

ucc-umc-images (0.1.1-1):
* Bug #30379: integrated UCCImage class, added download functionality
Comment 7 Alexander Kläser univentionstaff 2014-05-09 16:06:30 CEST
Added image removal functionality and enhanced error handling.


ucc-umc-images (0.1.2-1):
* Bug #30379: added handling for image removal

ucc-image-toolkit (2.0.5-1):
* Bug #30379: enhanced error handling

ucc-image-toolkit (2.0.4-1):
* Bug #30379: adapted and refactored ucc-image-remove
Comment 8 Alexander Kläser univentionstaff 2014-05-12 12:01:59 CEST
(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
> 
> Example:
> 
> 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)

Update: The image-index.txt file now only contains the names of the spec files.
Comment 9 Alexander Kläser univentionstaff 2014-05-12 13:51:55 CEST
ucc-image-toolkit (2.0.8-1):
* Bug #30379: fixed handling of uncompressed file, make validation of spec
  files less strict for CLI tools, added l10n function to error messages
Comment 10 Alexander Kläser univentionstaff 2014-05-12 14:13:06 CEST
ucc-umc-images (0.1.4-1):
* Bug #30379: do not list images that do not meet strict validation criteria
  for the spec file
Comment 11 Alexander Kläser univentionstaff 2014-05-13 16:03:49 CEST
ucc-image-toolkit (2.0.11-1):
* Bug #30379: adjust CLI tool output, add get_latest_online_ucc_image()

ucc-image-toolkit (2.0.10-1):
* Bug #30379: adjustments for unified progress handling
Comment 12 Alexander Kläser univentionstaff 2014-05-15 12:40:04 CEST
Currently, downloaded images have the 600 as access rights and file owner is root. File access should be 644.
Comment 13 Alexander Kläser univentionstaff 2014-05-15 18:49:59 CEST
(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.

ucc-image-toolkit (2.0.15-1):
* Bug #34360: make sure that access rights are 0644 for all image files
Comment 14 Moritz Muehlenhoff univentionstaff 2014-05-16 10:31:28 CEST
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.
Comment 15 Alexander Kläser univentionstaff 2014-05-16 17:03:34 CEST
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


ucc-image-toolkit (2.0.16-1):
Bug #34360:
* Set Python version to 2.6
* detect and block concurrent downloads
* fixed calculation of free hard disk space
* status property = [available|installed|incomplete|downloading]
Comment 16 Alexander Kläser univentionstaff 2014-05-16 17:07:59 CEST
ucc-umc-images (0.1.7-1):
Bug #30379:
* added confirmation dialogue for download
* block concurrent download
* added refresh action
Comment 17 Alexander Kläser univentionstaff 2014-05-16 17:08:31 CEST
(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).
Comment 18 Alexander Kläser univentionstaff 2014-05-16 17:09:10 CEST
TODO: translation.
Comment 19 Moritz Muehlenhoff univentionstaff 2014-05-19 08:54:26 CEST
- 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.
Comment 20 Alexander Kläser univentionstaff 2014-05-20 17:49:53 CEST
It seems that no settings/ucc_image objects are created in LDAP?
Comment 21 Alexander Kläser univentionstaff 2014-05-21 11:25:35 CEST
(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.
Comment 22 Alexander Kläser univentionstaff 2014-05-21 16:04:30 CEST
Missing translations + changelog entry have been added.


ucc-image-toolkit (2.0.19-1):
* Bug #34360: added translations

ucc-umc-images (0.1.8-1):
* Bug #30379: added translations
Comment 23 Alexander Kläser univentionstaff 2014-05-22 10:43:29 CEST
The description of the module is now:

[en] "Download and management of UCC images"
[de] "Herunterladen und Verwalten von UCC-Images"


ucc-umc-images (0.1.9-1):
* Bug #30379: adpated module description
Comment 24 Moritz Muehlenhoff univentionstaff 2014-05-22 11:46:20 CEST
Translation looks good as well.
Comment 25 Moritz Muehlenhoff univentionstaff 2014-06-12 09:19:49 CEST
UCC 2.0 has been released:
 http://docs.univention.de/release-notes-ucc-2.0.html

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