UpgradeStatus can be incorrect

Bug #1315559 reported by Brian Murray
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Triaged
Medium
Unassigned
Kinetic
Won't Fix
Medium
Unassigned

Bug Description

In the general hook for ubuntu there is the following code:

    log = '/var/log/dist-upgrade/main.log'
    if os.path.exists(log):
        mtime = os.stat(log).st_mtime
        human_mtime = time.strftime('%Y-%m-%d', time.gmtime(mtime))
        delta = time.time() - mtime

        # Would be nice if this also showed which release was originally installed
        report['UpgradeStatus'] = 'Upgraded to %s on %s (%d days ago)' % (release_codename, human_mtime, delta / 86400)
    else:
        report['UpgradeStatus'] = 'No upgrade log present (probably fresh install)'

This does no checking of main.log to see if the upgrade was actually successful, so if someone is reporting a bug about a failed upgrade of ubuntu-release-upgrader they'll have a confusing 'UpgradeStatus' of today for the previous release.

Tags: fr-2590
Revision history for this message
Brian Murray (brian-murray) wrote :

One thing to do might be to check main.log for "ERROR" and if that exists set 'UpgradeStatus' to unknown.

Changed in apport (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
tags: added: rls-kk-incoming
Benjamin Drung (bdrung)
Changed in apport (Ubuntu):
status: Confirmed → Triaged
tags: added: fr-2590
tags: removed: rls-kk-incoming
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Ubuntu 22.10 (Kinetic Kudu) has reached end of life, so this bug will not be fixed for that specific release.

Changed in apport (Ubuntu Kinetic):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.