Bug 34501 - increase ucc-image-download error robustness
increase ucc-image-download error robustness
Status: CLOSED FIXED
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: Image management
unspecified
Other Linux
: P5 normal
: UCC 2.0
Assigned To: Alexander Kläser
Moritz Muehlenhoff
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-08 14:48 CEST by Erik Damrose
Modified: 2014-06-12 09:19 CEST (History)
2 users (show)

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 Erik Damrose univentionstaff 2014-04-08 14:48:56 CEST
when accidentally downloading an invalid spec file (e.g. a non-yaml file) ucc-image-download will fail. The error should be catched, the tempdirectory should be cleaned up, and the script should fail gracefully.

yaml.reader.ReaderError: 'utf8' codec can't decode byte #x80: invalid start byte
Comment 1 Alexander Kläser univentionstaff 2014-05-06 11:35:11 CEST
Will be adjusted along with Bug 30379
Comment 2 Moritz Muehlenhoff univentionstaff 2014-05-15 14:25:57 CEST
This is now correctly handled:

ucc-image-download: error: -s option requires an argument
root@master:~# ucc-image-download  -s invalid.spec
Downloading and reading img file invalid.spec
ERROR: Image data for spec file invalid.spec could not be downloaded from server:
Malformed spec file invalid.spec, missing entry "hash-img"!
Comment 3 Alexander Kläser univentionstaff 2014-05-15 15:38:49 CEST
This should be ok by now, ucc-image-download has been rewritten, e.g.:

> root@master50:~# ucc-image-download -s invalid.spec
> Downloading and reading img file invalid.spec
> ERROR: Image data for spec file invalid.spec could not be downloaded from server:
> Could not download file (404 - Not Found): http://10.200.3.90/invalid.spec

If the download procedure happens to fail at any point, temporarily downloaded information will be removed again.
Comment 4 Moritz Muehlenhoff univentionstaff 2014-06-12 09:19:36 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".