Comment 5 for bug 2002613

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Thank you jaromir-obr!

Unfortunately, since the command succeeded when run manually, the logs and output don't provide much information. And I've tried to reproduce this without success. Since we don't have a reproducer or enough details about the error, I'll mark this incomplete for ubuntu-advantage-tools.

At the very least, though, I think update-manager should handle this kind of error more gracefully. I'll move this bug to update-manager to represent that.

Specifically, for update-manager, if something goes wrong early enough in the `ua security-status --format=json` command, then the output won't be json. To cover this, we'll need a try/except around the json.loads call.

Longer term, we should probably replace this `ua security-status --format=json` command with using the more recent pro client python api: https://github.com/canonical/ubuntu-advantage-client/blob/main/docs/references/api.md#upropackagesupdatesv1