Public bug reported:

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

** Affects: ubuntu-advantage-tools (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  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
+   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 as it seems to
- be adding the `/ubuntu` suffix to the URL:
+ 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
+   Installed: 1.5
  
  ubuntu-advantage-tools:
-   Installed: 31.2.2~22.04
-   Candidate: 31.2.2~22.04
+   Installed: 31.2.2~22.04
+   Candidate: 31.2.2~22.04

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2065095

Title:
  pro service enabling fails due to incorrect aptURL format

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2065095/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to