Skip to content

Commit

Permalink
Use named volume to hold Prometheus data
Browse files Browse the repository at this point in the history
When /var/lib/docker and the Git checkout live on different filesystems,
Prometheus will fail to startup because it cannot mmap files the files
mounted into its container from the git checkout's filesystem. Use a
named volume instead, as this will allow the mmap to succeed. This will
continue to maintain data across restarts for workflows that don't
explicitly remove volumes. For volumes that do remove volumes, then this
will result in a behavior change, as the Prometheus data will be removed
as well.

Since we are no longer dumping data into the prometheus/data directory,
we can also remove the .gitignore. This also has the side effect of
reducing the amount of extra data in the git checkout.

Fixes #4847
  • Loading branch information
cirego committed Nov 21, 2020
1 parent 675d52a commit aebcb90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion demo/chbench/mzcompose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ services:
- *prometheus
volumes:
# ensure that data doesn't get lost across restarts
- ./prometheus/data:/prometheus
# data will be lost if you remove docker volumes (using nuke, for example)
- prometheus:/prometheus
- grafana:/var/lib/grafana
# specialized configurations
# this load test customizes prometheus to scrape tpcch and peeker
Expand Down Expand Up @@ -250,6 +251,7 @@ services:
volumes:
chbench-gen:
grafana:
prometheus:

mzconduct:
name: chbench
Expand Down
1 change: 0 additions & 1 deletion demo/chbench/prometheus/.gitignore

This file was deleted.

0 comments on commit aebcb90

Please sign in to comment.