pro service enabling fails due to incorrect aptURL format

Bug #2065095 reported by Bayani Carbone
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

When using an on-prem contract server (ua-airgapped) with the following configuration for aptURL:

  esm-infra:
    directives:
      aptURL: http://landscape.example.com/repository/standalone/esm.ubuntu.com-infra
    obligations:
      enableByDefault: true
  cis:
    directives:
      aptURL: http://landscape.example.com/repository/standalone/esm.ubuntu.com-cis
    obligations:
      enableByDefault: true

The pro client on a machine reports the following error when enabling a feature as it seems to be adding the `/ubuntu` suffix to the URL:

["2024-05-07T13:31:38.632", "DEBUG", "ubuntupro.system", "subp", 718, "Failed running command '/usr/lib/apt/apt-helper download-file http://bearer:<redacted>@landscape.example.com/repository/standalone/esm.
ubuntu.com-cis/ubuntu/pool/ /tmp/tmpk0abvk3p/apt-helper-output' [exit(100)]. Message: W: Download is performed unsandboxed as root as file '/tmp/tmpk0abvk3p/apt-helper-output' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13
: Permission denied)\nE: Failed to fetch http://landscape.example.com/repository/standalone/esm.ubuntu.com-cis/ubuntu/pool/ 404 Not Found [IP: 10.18.2.10 80]\nE: Download Failed\n", {}]
["2024-05-07T13:31:38.633", "DEBUG", "ubuntupro.system", "subp", 719, "Retrying 3 more times.", {}]

Our directory structure is the following:
repository/standalone/esm.ubuntu.com-infra/
├── dists
├── pool

We've used a symlink for the ubuntu directory as a workaround for the time being i.e.
repository/standalone/esm.ubuntu.com-infra/
├── dists
├── pool
└── ubuntu -> repository/standalone/esm.ubuntu.com-infra

ua-airgapped:
  Installed: 1.5

ubuntu-advantage-tools:
  Installed: 31.2.2~22.04
  Candidate: 31.2.2~22.04

description: updated
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Hello, bcarbone, thanks for reporting this.

I can see how this fails, it looks indeed like a bug. I will bring it to the team, and update you about a solution.

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Triaged
Revision history for this message
Peter Jose De Sousa (pjds) wrote :

Hello @Renan - can we get an ETA on this? I suspect this will block a deployment tomorrow.

Revision history for this message
Peter Jose De Sousa (pjds) wrote :

After speaking with Bayani - it seems I should be able to workaround it!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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