Opened 3 years ago

Closed 3 years ago

#20179 closed defect (fixed)

Require absolute path for `$TARBALLTARGETDIR` in `src/main/resources/create-tarballs.sh`

Reported by: karsten Owned by: karsten
Priority: Medium Milestone: CollecTor 1.1.0
Component: Metrics/CollecTor Version:
Severity: Normal Keywords:
Cc: iwakeh Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The comment in src/main/resources/create-tarballs.sh says that "OUTDIR and TARBALLTARGETDIR have to be given absolute or relative to WORKDIR", but a relative path for $TARBALLTARGETDIR doesn't work anymore since that script also updates symlinks (commit 94278aa). Here's what the script is running on the main CollecTor instance with default values:

cd /srv/collector.torproject.org/collector/
ln -f -s -t archive/bridge-descriptors/statuses/ ../data/bridge-statuses-20??-??.tar.xz

That last path does not exist, so ln places a link to that non-existant path into its archive/ directory structure. So, this won't work with a path that is relative to $WORKDIR, which is required for creating tarballs. I'd say it's easiest to just require an absolute path there. At least that's how I resolved the issue on the main CollecTor instance.

Child Tickets

Change History (3)

comment:1 Changed 3 years ago by iwakeh

Milestone: CollecTor 1.1.0

comment:2 Changed 3 years ago by iwakeh

Owner: set to karsten
Status: newassigned

Hope this assignment is correct as there are most of the necessary changes on the main instance already.

comment:3 Changed 3 years ago by karsten

Resolution: fixed
Status: assignedclosed

Yep, changed and pushed to master. Closing.

Note: See TracTickets for help on using tickets.