Skip to content

Write the import report somewhere the importer can write - #48

Merged
tamnd merged 1 commit into
mainfrom
m20-import-report
Aug 7, 2026
Merged

Write the import report somewhere the importer can write#48
tamnd merged 1 commit into
mainfrom
m20-import-report

Conversation

@tamnd

@tamnd tamnd commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Found by running the installer on a real Linux host, which is the only place it could have been found.

macOS passed. Linux read all 3.4GB and then died:

Caused by: java.nio.file.AccessDeniedException: /import/import.report

about a directory that plainly belongs to the person who ran the command.

The export is a bind mount owned by whoever downloaded it, and the neo4j image runs as its own user.
On rootless podman, which is what macOS uses, those two are mapped together and everything works.
On a rootful docker host they are different users, and import.report is the one file in the whole import that cannot be written.
Everything else the import produces goes into the volume, which the image owns.

So the report goes into the volume too, and the export is mounted read only now that nothing writes to it.
3.4GB somebody waited to download is worth not being able to damage.

Moving the report needs a flag, and the flag has to come from the caller rather than from the export, because the export format should not know that anybody runs it in a container.
Both import.sh and import.cmd now end by passing their own arguments through to neo4j-admin, where a repeated option takes the last value given.
The container run appends --report-file=/data/import.report and nothing else changes.

Verified by hand on server3 before the change was written: same image, same CSV files, read only mount, report on the volume, 8,175,346 nodes and 9,119,011 relationships in 1m 47s.

The published dataset goes to 2026.08.1, because the scripts inside it are part of it.
That is what the version being separate from the code version is for.

The Linux verification failed where macOS had not. After reading all 3.4GB the
import died with AccessDeniedException on /import/import.report, about a
directory that plainly belongs to the person who ran it.

The export is a bind mount owned by whoever downloaded it and the neo4j image
runs as its own user, so on a rootful docker host those are two different users
and the report is the one file in the whole import that cannot be written.
Rootless podman on macOS maps the two together, which is why the same command
worked there and hid this for a day.

So the report goes on the volume instead, which the image owns by definition,
and the export is mounted read only now that nothing writes to it. Both import
scripts pass their own arguments through to neo4j-admin, where a repeated option
takes the last value, which is how the container run moves the report without
the export format knowing anything about containers.

The published dataset is republished as 2026.08.1, because the scripts inside it
are part of it.
@tamnd
tamnd merged commit f001042 into main Aug 7, 2026
5 checks passed
@tamnd
tamnd deleted the m20-import-report branch August 7, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant