edf-hpc / clara

Cluster Administration tools
Other
18 stars 12 forks source link

clara repo init fails but creates the repository anyway #104

Closed rezib closed 5 years ago

rezib commented 7 years ago

Clara repo init fails because of missing GPG key:

# clara repo init calibre9
Could not find any key matching 'AD3C2E2B'!
ERROR: Could not finish exporting 'calibre9'!
There have been errors!
clara - reprepro --ask-passphrase --basedir /root/ccnhpc/admin/local-mirror/calibre9 --outdir /var/www/system/mirror/calibre9/calibre9-cluster export calibre9

But a second run reports success:

# clara repo init calibre9
# echo $?
0
# ls /var/www/system/mirror/calibre9/calibre9-cluster
dists
# ls /root/ccnhpc/admin/local-mirror/calibre9/
conf  db

This is misleading. If the repo already exists, the second init must fail to tell the repo already exists. On its side, the first run should have removed the created directories if the repository has not been initialized properly.