Bug 53926 - univention-maintenance-mode-update-progress: increase robustness
univention-maintenance-mode-update-progress: increase robustness
Status: NEW
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-15 00:57 CEST by Florian Best
Modified: 2021-10-18 18:25 CEST (History)
0 users

See Also:
What kind of report is it?: Development Internal
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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-10-15 00:57:25 CEST
echo > /var/lib/univention-updater/univention-updater.status

Traceback (most recent call last):
  File "/usr/share/univention-maintenance-mode-update-progress", line 137, in <module>
    main()
  File "/usr/share/univention-maintenance-mode-update-progress", line 132, in main
    compute()
  File "/usr/share/univention-maintenance-mode-update-progress", line 110, in compute
    percentage = read_progress()
  File "/usr/share/univention-maintenance-mode-update-progress", line 47, in read_progress
    if updater_status.status == 'DONE':
AttributeError: 'UpdaterStatus' object has no attribute 'status'

echo > /var/lib/univention-updater/univention-updater.status.details
echo -en 'current_version=5.0-0\nnext_version=5.0-0\ntarget_version=5.0-1\ntype=foo\nstatus=foo\nerrorsource=foo' > /var/lib/univention-updater/univention-updater.status
Traceback (most recent call last):
  File "/usr/share/univention-maintenance-mode-update-progress", line 137, in <module>
    main()
  File "/usr/share/univention-maintenance-mode-update-progress", line 132, in main
    compute()
  File "/usr/share/univention-maintenance-mode-update-progress", line 115, in compute
    percentage = add_updater_context(percentage)
  File "/usr/share/univention-maintenance-mode-update-progress", line 100, in add_updater_context
    return (finished_updates * 100.0 + percentage) / float(len(updater_status.overall_updates))
ZeroDivisionError: float division by zero