2023-08-11 22:15:58 |
Steven LaCosse |
bug |
|
|
added bug |
2023-08-11 22:16:31 |
Steven LaCosse |
summary |
Enabling of Pro Service Does Not Update when using airgapped mirrors over http:// |
Enabling of Pro Services Does Not Update when using airgapped mirrors over http:// |
|
2023-08-11 22:20:18 |
Steven LaCosse |
description |
contract server is airgapped and running
uaclient is pointing to the airgapped contract server to get entitlements
Additionally, using a landscape server and it's underlying reprepro to mirror ESM and FIPs for airgap, this forces using http
apt update is working over landscape over multiple repos.
pro attach subscriptioncontract, is working
next
pro enable service is creating /etc/apt/auth.conf.d/90ubuntu-advantage with correct apt entry, apt update can pickup the airgapped repo but with warning of http://
For example: pro enable esm-apps
Service Status is not getting updating
pro status is showing after enablement of esm-apps
SERVICE ENTITLED STATUS DESCRIPTION
esm-apps yes disabled Expanded Security Maintenance for Applications
esm-infra yes disabled Expanded Security Maintenance for Infrastructure
Editing 90ubuntu-advantage to append http:// get rids of the apt update working but service status is not changing.
Issuing pro enable esm-apps appends another entry and is a loop
ubuntu-advantage.log is showing the following
["2023-08-11T16:54:20.596", "DEBUG", "uaclient.files.files", "read", 55, "File does not exist: /var/lib/ubuntu-advantage/user-config.json", {}]
["2023-08-11T16:54:22.233", "DEBUG", "root", "subp", 634, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n", {}]
["2023-08-11T16:54:22.233", "WARNING", "root", "subp", 636, "Stderr: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n\nStdout: ", {}]
["2023-08-11T16:54:22.234", "DEBUG", "root", "subp", 640, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n Retrying 3 more times.", {}]
["2023-08-11T16:54:23.213", "DEBUG", "root", "_subp", 581, "Ran cmd: apt-get update, rc: 0 stderr: b''", {}] |
contract server is airgapped and running
uaclient is pointing to the airgapped contract server to get entitlements
Additionally, using a landscape server and it's underlying reprepro to mirror ESM and FIPs for airgap, this forces using http
apt update is working over landscape over multiple repos.
pro attach subscriptioncontract, is working
next
pro enable service is creating /etc/apt/auth.conf.d/90ubuntu-advantage with correct apt entry, apt update can pickup the airgapped repo but with warning of http://
For example: pro enable esm-apps
Service Status is not getting updating
pro status is showing after enablement of esm-apps
SERVICE ENTITLED STATUS DESCRIPTION
esm-apps yes disabled Expanded Security Maintenance for Applications
esm-infra yes disabled Expanded Security Maintenance for Infrastructure
Editing 90ubuntu-advantage to append http:// get rids of the apt update working but service status is not changing.
Issuing pro enable esm-apps appends another entry and is a loop
ubuntu-advantage.log is showing the following
["2023-08-11T16:54:20.596", "DEBUG", "uaclient.files.files", "read", 55, "File does not exist: /var/lib/ubuntu-advantage/user-config.json", {}]
["2023-08-11T16:54:22.233", "DEBUG", "root", "subp", 634, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n", {}]
["2023-08-11T16:54:22.233", "WARNING", "root", "subp", 636, "Stderr: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n\nStdout: ", {}]
["2023-08-11T16:54:22.234", "DEBUG", "root", "subp", 640, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n Retrying 3 more times.", {}]
["2023-08-11T16:54:23.213", "DEBUG", "root", "_subp", 581, "Ran cmd: apt-get update, rc: 0 stderr: b''", {}]
For auditing purposes the status of subscription and it's services is important to be correct. Additionally to insure correct packages for fips get installed. |
|
2023-08-17 15:16:11 |
Lucas Albuquerque Medeiros de Moura |
ubuntu-advantage-tools (Ubuntu): assignee |
|
Lucas Albuquerque Medeiros de Moura (lamoura) |
|
2023-08-17 15:16:19 |
Lucas Albuquerque Medeiros de Moura |
ubuntu-advantage-tools (Ubuntu): status |
New |
Triaged |
|
2023-09-05 13:31:59 |
Grant Orndorff |
ubuntu-advantage-tools (Ubuntu): importance |
Undecided |
High |
|
2024-04-10 17:54:28 |
Lucas Albuquerque Medeiros de Moura |
description |
contract server is airgapped and running
uaclient is pointing to the airgapped contract server to get entitlements
Additionally, using a landscape server and it's underlying reprepro to mirror ESM and FIPs for airgap, this forces using http
apt update is working over landscape over multiple repos.
pro attach subscriptioncontract, is working
next
pro enable service is creating /etc/apt/auth.conf.d/90ubuntu-advantage with correct apt entry, apt update can pickup the airgapped repo but with warning of http://
For example: pro enable esm-apps
Service Status is not getting updating
pro status is showing after enablement of esm-apps
SERVICE ENTITLED STATUS DESCRIPTION
esm-apps yes disabled Expanded Security Maintenance for Applications
esm-infra yes disabled Expanded Security Maintenance for Infrastructure
Editing 90ubuntu-advantage to append http:// get rids of the apt update working but service status is not changing.
Issuing pro enable esm-apps appends another entry and is a loop
ubuntu-advantage.log is showing the following
["2023-08-11T16:54:20.596", "DEBUG", "uaclient.files.files", "read", 55, "File does not exist: /var/lib/ubuntu-advantage/user-config.json", {}]
["2023-08-11T16:54:22.233", "DEBUG", "root", "subp", 634, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n", {}]
["2023-08-11T16:54:22.233", "WARNING", "root", "subp", 636, "Stderr: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n\nStdout: ", {}]
["2023-08-11T16:54:22.234", "DEBUG", "root", "subp", 640, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n Retrying 3 more times.", {}]
["2023-08-11T16:54:23.213", "DEBUG", "root", "_subp", 581, "Ran cmd: apt-get update, rc: 0 stderr: b''", {}]
For auditing purposes the status of subscription and it's services is important to be correct. Additionally to insure correct packages for fips get installed. |
[Impact]
When users create an airgapped environement, they may create APT mirrors for the ESM services that share a common base URL. For example, in this bug here, the user was mirroring their services one:
http://landscaperepo.com/repository/standalone/ubuntu/dists/bionic-esm-apps-security
http://landscaperepo.com/repository/standalone/ubuntu/dists/bionic-esm-apps-updates
http://landscaperepo.com/repository/standalone/ubuntu/dists/bionic-esm-infra-security/
http://landscaperepo.com/repository/standalone/ubuntu/dists/bionic-esm-infra-updates/
http://landscaperepo.com/repository/standalone/ubuntu/dists/fips-bionic/
http://landscaperepo.com/repository/standalone/ubuntu/dists/jammy-esm-apps-security/
As we can see, all services share the
http://landscaperepo.com/repository/standalone/ APT url.
Since the Pro client was looking for unique urls to distinguish enabled services in the machine, this setup was not working.
Now, instead of looking at the APT url, we are also looking at the suite (i.e. bionic-esm-apps-security)
If we identify that both APT url and suite are in the output of apt-cache policy
with the right permission number, we say that the service is enabled.
This will unblock users that want to use the same APT url for their airgapped setup.
Additionally, we have discussed this issue with the Landscape team and they assured us that we will always have an unique combination of APT url and suite.
[Test cases]
We have setup an integration test for this scenario on the Pro client codebase.
We will link the test result here.
[ Regression Potential ]
We believe we are now improving our check to see if the service is enabled or not, as we are now considering a combination that we now will be unique. Therefore, the only regression potential we can think is the situation were we mistakenly create that combination (APT url + suite) or check it in a wrong way in the output of apt-cache policy.
However, we believe our integration tests should be enough to assert that this is not the case.
[ Original Description]
contract server is airgapped and running
uaclient is pointing to the airgapped contract server to get entitlements
Additionally, using a landscape server and it's underlying reprepro to mirror ESM and FIPs for airgap, this forces using http
apt update is working over landscape over multiple repos.
pro attach subscriptioncontract, is working
next
pro enable service is creating /etc/apt/auth.conf.d/90ubuntu-advantage with correct apt entry, apt update can pickup the airgapped repo but with warning of http://
For example: pro enable esm-apps
Service Status is not getting updating
pro status is showing after enablement of esm-apps
SERVICE ENTITLED STATUS DESCRIPTION
esm-apps yes disabled Expanded Security Maintenance for Applications
esm-infra yes disabled Expanded Security Maintenance for Infrastructure
Editing 90ubuntu-advantage to append http:// get rids of the apt update working but service status is not changing.
Issuing pro enable esm-apps appends another entry and is a loop
ubuntu-advantage.log is showing the following
["2023-08-11T16:54:20.596", "DEBUG", "uaclient.files.files", "read", 55, "File does not exist: /var/lib/ubuntu-advantage/user-config.json", {}]
["2023-08-11T16:54:22.233", "DEBUG", "root", "subp", 634, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n", {}]
["2023-08-11T16:54:22.233", "WARNING", "root", "subp", 636, "Stderr: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n\nStdout: ", {}]
["2023-08-11T16:54:22.234", "DEBUG", "root", "subp", 640, "Failed running command 'apt-cache policy' [exit(100)]. Message: E: Problem renaming the file /var/cache/apt/pkgcache.bin.K4g76Q to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)\nW: You may want to run apt-get update to correct these problems\nE: The package cache file is corrupted\n Retrying 3 more times.", {}]
["2023-08-11T16:54:23.213", "DEBUG", "root", "_subp", 581, "Ran cmd: apt-get update, rc: 0 stderr: b''", {}]
For auditing purposes the status of subscription and it's services is important to be correct. Additionally to insure correct packages for fips get installed. |
|
2024-05-10 21:15:48 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Noble): status |
New |
Fix Committed |
|
2024-05-10 21:15:49 |
Andreas Hasenack |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2024-05-10 21:15:52 |
Andreas Hasenack |
bug |
|
|
added subscriber SRU Verification |
2024-05-10 21:15:56 |
Andreas Hasenack |
tags |
airgapped |
airgapped verification-needed verification-needed-noble |
|
2024-05-10 21:18:44 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Mantic): status |
New |
Fix Committed |
|
2024-05-10 21:18:49 |
Andreas Hasenack |
tags |
airgapped verification-needed verification-needed-noble |
airgapped verification-needed verification-needed-mantic verification-needed-noble |
|
2024-05-10 21:19:39 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Jammy): status |
New |
Fix Committed |
|
2024-05-10 21:19:44 |
Andreas Hasenack |
tags |
airgapped verification-needed verification-needed-mantic verification-needed-noble |
airgapped verification-needed verification-needed-jammy verification-needed-mantic verification-needed-noble |
|
2024-05-10 21:20:35 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Focal): status |
New |
Fix Committed |
|
2024-05-10 21:20:40 |
Andreas Hasenack |
tags |
airgapped verification-needed verification-needed-jammy verification-needed-mantic verification-needed-noble |
airgapped verification-needed verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble |
|
2024-05-10 21:21:38 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Bionic): status |
New |
Fix Committed |
|
2024-05-10 21:21:43 |
Andreas Hasenack |
tags |
airgapped verification-needed verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble |
airgapped verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble |
|
2024-05-10 21:23:30 |
Andreas Hasenack |
ubuntu-advantage-tools (Ubuntu Xenial): status |
New |
Fix Committed |
|
2024-05-10 21:23:34 |
Andreas Hasenack |
tags |
airgapped verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble |
airgapped verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble verification-needed-xenial |
|
2024-05-18 12:43:46 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu): status |
Triaged |
Fix Released |
|
2024-05-29 13:05:44 |
Renan Rodrigo |
tags |
airgapped verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-mantic verification-needed-noble verification-needed-xenial |
airgapped verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-mantic verification-done-noble verification-done-xenial |
|
2024-05-29 15:05:10 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Noble): status |
Fix Committed |
Fix Released |
|
2024-05-29 15:05:25 |
Andreas Hasenack |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2024-05-29 15:06:08 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Mantic): status |
Fix Committed |
Fix Released |
|
2024-05-29 15:06:34 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|
2024-05-29 15:06:56 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2024-05-29 15:07:19 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|
2024-05-29 15:07:43 |
Launchpad Janitor |
ubuntu-advantage-tools (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|