Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up2.6.0: opening storage failed: mkdir data/: read-only file system #5043
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I see that the new Docker image now makes |
This comment has been minimized.
This comment has been minimized.
|
@cmoad Hi, your |
This comment has been minimized.
This comment has been minimized.
|
@aixeshunter Here is the volume claim definition. Minikube takes care of the rest.
|
This comment has been minimized.
This comment has been minimized.
Dravere
commented
Jan 3, 2019
|
I can confirm that old data is not loaded in Prometheus Docker v2.6.0 when the data is located in a mounted volume. My docker run -d \
--name prometheus \
--hostname prometheus \
--restart always \
--volume /opt/prometheus/conf:/etc/prometheus/conf:ro \
--volume /opt/prometheus/data:/prometheus \
--log-opt max-size=1m --log-opt max-file=5 \
--env "TZ=Europe/Zurich" \
--network monitoring \
prom/prometheus:v2.6.0 --web.external-url=https://nowhere.example.org --config.file=/etc/prometheus/conf/prometheus.yml |
This comment has been minimized.
This comment has been minimized.
chlunde
commented
Jan 3, 2019
|
We also had this issue. It works when changing the data path: - name: data
mountPath: /prometheus-data args:
- '--config.file=/etc/prometheus/prometheus.yaml'
+ - '--storage.tsdb.path=/prometheus-data' |
This comment has been minimized.
This comment has been minimized.
ezraroi
commented
Jan 3, 2019
|
yes indeed, we also faced the same issue when we upgraded from 2.5.0. to 2.6.0 docker |
This comment has been minimized.
This comment has been minimized.
|
This breaking change was reported 17 days ago and still not reflected on release notes for 2.6.0. This is very sad. |
This comment has been minimized.
This comment has been minimized.
lparet-yseop
commented
Jan 8, 2019
|
Same issue for me when I upgrade Prometheus from 2.5.0. to 2.6.0 Some news about this issue ? I think it is a real breaking change for many people |
simonpasquier
referenced this issue
Jan 8, 2019
Closed
Update changelog to reflect container changes #5078
This comment has been minimized.
This comment has been minimized.
|
First of all, we're truly sorry for the hassle this change has introduced for some of you. When we reviewed PR #4976, we genuinely thought that we had a solution that would improve the container image without breaking things. Reverting the change might hurt deployments that have already been updated so I'm hesitant to go this path. I've updated the changelog text for v2.6.0 in the Releases page to flag it as a change and submitted #5078 as well. In the future, I'll do my best to be more strict and flag appropriately changes that might be breaking for the community. |
This comment has been minimized.
This comment has been minimized.
|
Yes, sorry for not also replying here. I'm not a Docker expert, but I also thought this wasn't going to cause as many issues as it has. I wanted to our Docker file into a state where it's as clean as possible. The original layout was extremely messy, and I thought we could clean it up. I'm also open to rolling back to the previous layout, and designing a new layout for a future release. |
This comment has been minimized.
This comment has been minimized.
Dravere
commented
Jan 8, 2019
|
What would be good if there was a recommended way to upgrade now. Should we use the way chlunde wrote? Or should we map the mounted volume to |
epuertat
added a commit
to rhcs-dashboard/ceph-dev
that referenced
this issue
Jan 11, 2019
This comment has been minimized.
This comment has been minimized.
ilude
commented
Jan 18, 2019
|
Please take this as constructive criticism and not some rant on the team owing me or anyone else anything! You're doing great work! I'm at a loss to see how the symlink introduced in #4976 improves anything. I was trying to setup and test prometheus and spent the better part of two days trying to figure out why i was getting this perm issue as Google does not find this issue. And even once I did find it, without looking at the changes in the commit its still nearly impossible to understand whats going on and why anything mentioned in this thread fixes things. "opening storage failed: mkdir data/: permission denied" is a relative path error and distinctly unhelpful in troubleshooting the issue. Symlinking your data directory into /etc makes no sense to me and is against several decades of Unix file system convention. Configs go in /etc, data should be in /opt, /var or in docker's case /prometheus, /data or /prometheus/data would be acceptable. On top of all this, you've outdated and broken every promethues docker tutorial out on the web with this change. I would urge you to reconsider and possibly revert the symlink or at least make a section in the main README that addresses this change, the permission denied error it causes, the changes needed to fix it, and a well thought out explanation of why you needed to do this. I can only imagine that its going to affect your adoption/use rates for the next year, at least, as folk get frustrated following an online docker tutorials that all no longer work. In closing please understand that I'm not mad and understand changes happen and are often needed. I don't have the time to dig into this change and understand why the symlink was needed, so I may in fact be the one that's in the wrong! |
This comment has been minimized.
This comment has been minimized.
|
@ilude The improvement we were trying to make was to get rid of all of the flag changes in the The overall problem we were trying to solve is if a user wants to use the container, but add one additional flag change, like The main problem here is we're stuck with how all of this works due to existing deployments, and the original configuration was really annoying. Had I done this in the first place, I would have started with the I just didn't think about all the permutations of how people been using this Dockerfile before making the symlink change. |
This comment has been minimized.
This comment has been minimized.
|
IMHO, the best way to fix this issue at the |
This comment has been minimized.
This comment has been minimized.
ilude
commented
Jan 18, 2019
|
@SuperQ that makes it a bit more clear, but still not sure you're going about it in the right way. I would humbly recommend you consider rolling back the change, and spin up a 2.0 branch that fixes the WORKDIR. Which seems to be the real problem, instead of trying to mess with the existing versions image file layout. The way it is now you are breaking existing deployments when they upgrade and there current volume setups cause these issus. And you are invalidating any tutorials that were written by the community to this point. I understand that the rollback has its own risks to folks who have already dealt with this. But that's what README and CHANGELOG files are for. Make it clear what you are doing, why you are doing it and continue to update the docs/wiki with info on how to deal with the common issues that may come up from the revert.
|
This comment has been minimized.
This comment has been minimized.
|
Yes, I know, you don't need to mansplain semver. This is already our policy. We didn't expect this to be a breaking change, hence why it didn't get documented this way. I have already considered a simple rollback to the previous Dockerfile and making changes in 3.0. But like @roman-vynar says, rollback is now just as problematic. |
This comment has been minimized.
This comment has been minimized.
|
To be fair, we do not know for sure it's more problematic to roll back or to keep it like it is now. It depends on how many people have already upgraded to this version. If I had to guess, then I'd say a lot more people will still be on older Prometheus versions and still have this upgrade pain ahead of them. Thus I'm slightly in favor of rolling it back. Wondering if it is still possible to do in 2.7.0 though (rc0 released today) /cc @gouthamve. |
This comment has been minimized.
This comment has been minimized.
|
Consider this my vote for a rollback. |
This comment has been minimized.
This comment has been minimized.
Dravere
commented
Jan 18, 2019
|
If we would follow Semver even the rollback would be a major version change. I wonder if this actually shows another problem. The docker version isn't really part of the Prometheus version. They might want to follow independent versions or at least partially related? |
This comment has been minimized.
This comment has been minimized.
|
@Dravere The Dockerfile wasn't explicitly mentioned in the stability guarantees in https://prometheus.io/blog/2016/07/18/prometheus-1-0-released/#what-does-1-0-mean-for-you, so we don't have an official rule for that. Most likely we would not have made a breaking change intentionally though. While rolling back would be another breaking change, you could also see a rollback as a bugfix of a previous unintentional breakage that should never have happened. Especially if most users still have to hit it. |
This comment has been minimized.
This comment has been minimized.
Dravere
commented
Jan 18, 2019
|
Well according to Semver rollback of breaking change is a breaking change. But I get your point. I mean I'm not opposed to it, I rolled back to 2.5.0 and currently waiting for the solution of this issue. Another possible solution to fix this without breaking everything again might be to have an entry via a bash/shell file or similar. Something that I have seen in a lot of places. You could do some additional checks in there before deciding how you want to startup. Arguments could be passed forward without a problem. There is even a mention of such a method on the Docker docs: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#entrypoint (example of how Postgres does it) |
This comment has been minimized.
This comment has been minimized.
|
After more thinking and although most attention on this issue is from people that have been hurt by the change, I would also be inclined to revert to the previous behavior. But @gouthamve being the release shepherd for v2.7, he has the final word on this. |
cmoad commentedDec 26, 2018
Bug Report
What did you do?
Upgrading from Docker 2.5.0 to 2.6.0 introduces a fatal error, "opening storage failed: mkdir data/: read-only file system". Deleting everything and reverting to 2.5.0 with the exact same configuration does not have this problem.
What did you expect to see?
I don't see that any changes are required for 2.6.0.
Environment
This is running in a vanilla minikube running k8s 1.11.6.
System information:
quay.io/prometheus/prometheus:v2.6.0
Prometheus version:
v2.6.0
Logs: