Hashicorp repository sync error

Bug #2060064 reported by Andy Wu
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Server
New
Undecided
Unassigned

Bug Description

Sync hashicorp mirror fail with error:

 "summary": "Sync pocket 'release' of series 'hashicorp-jammy' in distribution 'ubuntu'",
    "result_text": "b\"ERROR: Condition 'AA16FCBCA621E701+' not fulfilled for './lists/update-hashicorp-jammy_jammy_InRelease'.\\r\\nSignatures in './lists/update-hashicorp-jammy_jammy_InRelease':\\r\\n'AA16FCBCA621E701' (signed 1970-01-01): bad signature\\r\\nError: Not enough signatures found for remote repository update-hashicorp-jammy (https://apt.releases.hashicorp.com jammy)!\\r\\nThere have been errors!\\r\\n\"",

Step to reproduce:

#Get hashcorp gpg key
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg

#export hashcorp gpg key
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --export --armor > hashicorp-public-key.asc

#import hashcorp key to landscape
landscape-api import-gpg-key hashicorp-public-key hashicorp-public-key.asc

#import landscape-mirror key
gpg --batch --gen-key ./landscape_gpg_key_param
landscape-api import-gpg-key mirror-key landscape-gpg-key.asc

# create hashicorp series
landscape-api create-series hashicorp-jammy ubuntu \
  --pockets release \
  --components main \
  --architectures amd64 \
  --gpg-key mirror-key \
  --mirror-gpg-key hashicorp-public-key \
  --mirror-uri https://apt.releases.hashicorp.com \
  --mirror-series jammy

# sync pocket
landscape-api sync-mirror-pocket release hashicorp-jammy ubuntu --json

Then check the activity id will see the gpg key error

There is a support case that talks about the same error,
https://canonical.lightning.force.com/lightning/r/Case/500N1000004q9hjIAA/view

The case conclude with a workaround to manually setup mirror using reprepro, I wonder if landscape-api can address this issue directly

Andy Wu (qch2012)
information type: Proprietary → Public
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.