livepatch on-prem snap version points to the wrong address

Bug #2019002 reported by Pedro Victor Lourenço Fragola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Livepatch On-Prem
Fix Released
Undecided
Unassigned

Bug Description

canonical-livepatch-server-admin.livepatch-admin sync trigger
Patch snapshot download started succesfully.
To track the status, run:
livepatch-admin job-status 15cb298ee1c4499184abae2bc5c03d30root@livepatchsnap:~# livepatch-admin job-status 15cb298ee1c4499184abae2bc5c03d30
Error: 'Post https://livepatch.canonical.com/v1/patches/snapshot: unauthorized'
Output: null
Status: Error
root@livepatchsnap:~# livepatch-admin job-status 15cb298ee1c4499184abae2bc5c03d30
Error: 'Post https://livepatch.canonical.com/v1/patches/snapshot: unauthorized'
Output: null
Status: Error

Note: The job is showing the public site and not the internal address

Revision history for this message
Kian Parvin (kian-parvin) wrote (last edit ):

Hi Pedro,

This is intentional, the `sync trigger` is the process that syncs patches from Canonical's hosted Livepatch server down to customer's on-prem server.

I notice your device name is "livepatchsnap" so I assume you are testing the Livepatch-server Snap (re-reading this I realise the title already mentioned the Snap). The Snap should require you to configure a sync token, similar to how the charm requires it as a config option, and then will enable the on-prem server to authenticate with the hosted. We'll look into whether this bit is documented and working properly.

Revision history for this message
@les (alesstimec) wrote :

@pedrovlf could you please provide steps to reproduce this issue? How was the livepatch server installed (charm/snap), etc.

Did you set the LIVEPATCH_URL environment variable in both cases when triggering the sync job and when querying for jib status?

Revision history for this message
Pedro Victor Lourenço Fragola (pedrovlf) wrote :

Hey @les o/ it was using snap package following the instructions[0]

[0] https://snapcraft.io/canonical-livepatch-server

Revision history for this message
Kian Parvin (kian-parvin) wrote :

Hey Pedro,

This has now been fixed in the latest release of the snap, available in latest/stable. Patch sync should now work as expected.

If you'd like to test it locally just be prepared to download a large number of patches. Alternatively, you can limit patch sync based on kernel flavor, much like the charm. It isn't documented how to do this with the Snap but the command
sudo snap set canonical-livepatch-server lp.patch-sync.flavors="aws-fips,aws,generic"
lets you set that.

Changed in livepatch-onprem:
status: New → Fix Released
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.