Enabling of Pro Services Does Not Update when using airgapped mirrors over http://
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
High
|
Lucas Albuquerque Medeiros de Moura | ||
Xenial |
Fix Committed
|
Undecided
|
Unassigned | ||
Bionic |
Fix Committed
|
Undecided
|
Unassigned | ||
Focal |
Fix Committed
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
Undecided
|
Unassigned | ||
Mantic |
Fix Committed
|
Undecided
|
Unassigned | ||
Noble |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
[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://
http://
http://
http://
http://
http://
As we can see, all services share the
http://
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-
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 subscriptioncon
next
pro enable service is creating /etc/apt/
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-
["2023-
["2023-
["2023-
["2023-
["2023-
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.
summary: |
- Enabling of Pro Service Does Not Update when using airgapped mirrors + Enabling of Pro Services Does Not Update when using airgapped mirrors over http:// |
description: | updated |
description: | updated |
Hi motosteven,
Thanks for reporting this. I have one idea, which I want to verify if it will work.
On clean machine, please setup the airgapped contract server so that the services repo paths already have the http:// protocol on them. After that, try attaching again and let me know what happens.