2023-02-06 14:56:32 |
Christian Ehrhardt |
bug |
|
|
added bug |
2023-02-07 13:36:29 |
Renan Rodrigo |
ubuntu-advantage-tools (Ubuntu): status |
New |
Triaged |
|
2023-02-07 14:50:31 |
Christian Ehrhardt |
ubuntu-advantage-tools (Ubuntu): assignee |
|
Alberto Contreras (aciba) |
|
2023-02-13 12:54:34 |
Alberto Contreras |
ubuntu-advantage-tools (Ubuntu): status |
Triaged |
In Progress |
|
2023-02-21 06:56:17 |
Alberto Contreras |
ubuntu-advantage-tools (Ubuntu): status |
In Progress |
Fix Committed |
|
2023-03-23 02:23:12 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu): status |
Fix Committed |
Fix Released |
|
2023-03-24 16:55:49 |
Grant Orndorff |
description |
$ sudo pro status --format=json | jq | less
...
"warnings": []
But
$ pro status --format=json | jq | less
"warnings": [
{
"message": "Failed to check for change in machine contract. Reason: Unauthorized: [https://contracts.canonical.com/v1/contracts/<xxxxx>?architecture=amd64&kernel=5.15.0-56-generic&series=jammy], unauthorized",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
many of them |
[Impact]
When running `pro status --warning` as a non-root user, `pro` would show numerous unnecessary warnings.
There were two warnings that showed up:
1. a failed contract-server request warning
2. a failure to remove a notice
(1) is fixed because of a separate refactor that removed that network call from `pro status` entirely.
(2) is fixed by removing the warning from the output. There is no reason the user needs to worry about these, and there's nothing for the user to do, so we shouldn't display them.
[Test Case]
Run `pro status --format json | jq .warnings`
Before the fix, this will show many warnings.
After the fix, this will be an empty list.
[Regression Potential]
The fix involved some refactors to the python code that adds and removes notices. If we made a mistake, then there could arise a situation where notices are not removed/added when they should be.
[Discussion]
These warnings about removing notices are due to us calling `notice.remove` in many places even when the notice is not present (the `remove` function is idempotent). The notices are stored in root-readable files becuase they can only be added when running root-only pro operations - that is why the non-root process cannot remove them. The case where a notice is present and should be removed will be resolved the next time that root runs `pro status`.
[Original Description]
$ sudo pro status --format=json | jq | less
...
"warnings": []
But
$ pro status --format=json | jq | less
"warnings": [
{
"message": "Failed to check for change in machine contract. Reason: Unauthorized: [https://contracts.canonical.com/v1/contracts/<xxxxx>?architecture=amd64&kernel=5.15.0-56-generic&series=jammy], unauthorized",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
many of them |
|
2023-03-24 16:56:04 |
Grant Orndorff |
description |
[Impact]
When running `pro status --warning` as a non-root user, `pro` would show numerous unnecessary warnings.
There were two warnings that showed up:
1. a failed contract-server request warning
2. a failure to remove a notice
(1) is fixed because of a separate refactor that removed that network call from `pro status` entirely.
(2) is fixed by removing the warning from the output. There is no reason the user needs to worry about these, and there's nothing for the user to do, so we shouldn't display them.
[Test Case]
Run `pro status --format json | jq .warnings`
Before the fix, this will show many warnings.
After the fix, this will be an empty list.
[Regression Potential]
The fix involved some refactors to the python code that adds and removes notices. If we made a mistake, then there could arise a situation where notices are not removed/added when they should be.
[Discussion]
These warnings about removing notices are due to us calling `notice.remove` in many places even when the notice is not present (the `remove` function is idempotent). The notices are stored in root-readable files becuase they can only be added when running root-only pro operations - that is why the non-root process cannot remove them. The case where a notice is present and should be removed will be resolved the next time that root runs `pro status`.
[Original Description]
$ sudo pro status --format=json | jq | less
...
"warnings": []
But
$ pro status --format=json | jq | less
"warnings": [
{
"message": "Failed to check for change in machine contract. Reason: Unauthorized: [https://contracts.canonical.com/v1/contracts/<xxxxx>?architecture=amd64&kernel=5.15.0-56-generic&series=jammy], unauthorized",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
many of them |
[Impact]
When running `pro status --warning` as a non-root user, `pro` would show numerous unnecessary warnings.
There were two warnings that showed up:
1. a failed contract-server request warning
2. a failure to remove a notice
(1) is fixed because of a separate refactor that removed that network call from `pro status` entirely.
(2) is fixed by removing the warning from the output. There is no reason the user needs to worry about these, and there's nothing for the user to do, so we shouldn't display them.
[Test Case]
On an attached machine, run `pro status --format json | jq .warnings`
Before the fix, this will show many warnings.
After the fix, this will be an empty list.
[Regression Potential]
The fix involved some refactors to the python code that adds and removes notices. If we made a mistake, then there could arise a situation where notices are not removed/added when they should be.
[Discussion]
These warnings about removing notices are due to us calling `notice.remove` in many places even when the notice is not present (the `remove` function is idempotent). The notices are stored in root-readable files becuase they can only be added when running root-only pro operations - that is why the non-root process cannot remove them. The case where a notice is present and should be removed will be resolved the next time that root runs `pro status`.
[Original Description]
$ sudo pro status --format=json | jq | less
...
"warnings": []
But
$ pro status --format=json | jq | less
"warnings": [
{
"message": "Failed to check for change in machine contract. Reason: Unauthorized: [https://contracts.canonical.com/v1/contracts/<xxxxx>?architecture=amd64&kernel=5.15.0-56-generic&series=jammy], unauthorized",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
{
"message": "Trying to remove notice as non-root user",
"message_code": null,
"service": null,
"type": "system"
},
many of them |
|
2023-04-06 21:30:44 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Kinetic): status |
New |
Fix Committed |
|
2023-04-06 21:30:46 |
Andreas Hasenack |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-04-06 21:30:49 |
Andreas Hasenack |
bug |
|
|
added subscriber SRU Verification |
2023-04-06 21:30:52 |
Andreas Hasenack |
tags |
|
verification-needed verification-needed-kinetic |
|
2023-04-06 21:35:28 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Jammy): status |
New |
Fix Committed |
|
2023-04-06 21:35:34 |
Andreas Hasenack |
tags |
verification-needed verification-needed-kinetic |
verification-needed verification-needed-jammy verification-needed-kinetic |
|
2023-04-06 21:40:11 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Focal): status |
New |
Fix Committed |
|
2023-04-06 21:40:18 |
Andreas Hasenack |
tags |
verification-needed verification-needed-jammy verification-needed-kinetic |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic |
|
2023-04-06 21:46:10 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Bionic): status |
New |
Fix Committed |
|
2023-04-06 21:46:17 |
Andreas Hasenack |
tags |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic |
|
2023-04-06 21:51:46 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Xenial): status |
New |
Fix Committed |
|
2023-04-06 21:51:53 |
Andreas Hasenack |
tags |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial |
|
2023-04-10 17:35:02 |
Lucas Albuquerque Medeiros de Moura |
attachment added |
|
results-2006138.tar.xz https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2006138/+attachment/5662774/+files/results-2006138.tar.xz |
|
2023-04-10 17:35:38 |
Lucas Albuquerque Medeiros de Moura |
tags |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial |
verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-xenial |
|
2023-04-19 01:31:25 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2023-04-19 01:32:05 |
Chris Halse Rogers |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2023-04-19 01:32:48 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|
2023-04-19 01:33:17 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2023-04-19 01:33:44 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|
2023-04-19 01:34:12 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Kinetic): status |
Fix Committed |
Fix Released |
|