-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove /var/lib/docker volume from containerized node #15105
remove /var/lib/docker volume from containerized node #15105
Conversation
@rhvgoyal just saw your update on the BZ. Is this not needed anymore? |
@sjenning I have created a PR so that oci-umount plugin will take care of removing multiple mounts inside container. But I think modifying unit file to not mount /var/lib/docker/ to begin with is a good idea. IOW, while my PR to oci-umount will take care of this, but we should merge this change anyway (irrespective of my PR). |
[test] |
@csrwng do we need to change cluster up? |
Evaluated for origin test up to 38b2082 |
Reference: openshift#15105 Signed-off-by: Giuseppe Scrivano <[email protected]>
@smarterclayton yes we need to remove it there as well, will create a PR |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/3031/) (Base Commit: 18c5730) (PR Branch Commit: 38b2082) |
@csrwng I am expecting that you don't have to mount /var/lib/docker/ in any circumstance at all. There is one logging case of fluentd which still needs it. Apart from that, if there are other use cases, I want to know. |
@rhvgoyal So for the one fluentd case, is it no longer required? |
@rhvgoyal I think for fluentd case you still require it. As I understand it, for json log based driver, they still go trough container logs under /var/lib/docker. |
@csrwng I myself am trying to figure out who else needs it and what breaks if we don't mount it. |
with /var/lib/docker/containers so we don't leak /var/lib/docker/devicemapper mount points into the container. Reference: openshift#15105 Signed-off-by: Giuseppe Scrivano <[email protected]>
would a build still work? I've tried this change in the system container and if there is no
That happens since files under
I have not tested this with the Docker container, so please ignore my comment if it doesn't happen there. If so though, what is done differently than files in |
with /var/lib/docker/containers so we don't leak /var/lib/docker/devicemapper mount points into the container. Reference: openshift#15105 Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe These seems to be just accessing json logs of a container. /var/lib/docker/containers/ is just a bind mount onto itself. So even if I unmount it, logs are still there. So I doubt this breakage is due to unmounting of /var/lib/docker/containers. That directory and logs with-in should still be accessible. |
@rhvgoyal yes true, my point was that if we just drop the Do we need to add a mount point for |
I don't understand openshift. So you will have to simplify it for me. So why do we need access to logs while doing a build? |
I am not expert either but my guess is that it is needed for |
Ok, so this is the case where "oc logs" is being run from inside a container and it is trying to access logs of a container? This sounds similar to fluentd accessing container logs. So why are we not using "docker logs" to access logs? |
Anyway, if some container does need /var/lib/docker, then yes they will have to volume mount it in. I don't know which containers need it. So openshift service/container needs to decide which containers really need it. oci-umount should take care of unmounting /var/lib/docker/devicemapper and /var/lib/docker/containers from inside the containers. |
@derekwaynecarr @sjennings can you help Vivek at all with questions about
what the kubelet needs access to in order to service logs?
…On Tue, Jul 11, 2017 at 9:39 AM, Vivek Goyal ***@***.***> wrote:
Anyway, if some container does need /var/lib/docker, then yes they will
have to volume mount it in. I don't know which containers need it. So
openshift service/container needs to decide which containers really need it.
oci-umount should take care of unmounting /var/lib/docker/devicemapper and
/var/lib/docker/containers from inside the containers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p_mP3myJM4532122UOJMORSLhQn-ks5sM3ssgaJpZM4ORfFR>
.
|
@smarterclayton I was trying to prove-by-doing but containerized install is busted #15147. I'll have to look at the code in the meantime. |
This is the only thing I can find For that, |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sjenning Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sjenning Assign the PR to them by writing No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/assign sjenning |
with /var/lib/docker/containers so we don't leak /var/lib/docker/devicemapper mount points into the container. Reference: openshift#15105 Signed-off-by: Giuseppe Scrivano <[email protected]>
Automatic merge from submit-queue (batch tested with PRs 17476, 17143, 15115, 17094, 17500). node, syscontainer: drop /var/lib/docker mount point Reference: #15105 Signed-off-by: Giuseppe Scrivano <[email protected]>
@rhvgoyal do we still need this? |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
I think this is handled via other means now |
xref https://bugzilla.redhat.com/show_bug.cgi?id=1467824
tl;dr upstream docker does not allow the forced removal of containers anymore. Before, a forced removal, when using devicemapper graph driver, simply orphaned a thin device and those devices would eventually consume the pool. The upstream docker change was backported to docker-1.12.6-40 to fix this issue.
However, the mounting of
/var/lib/docker
into the containerized node is causing other openshift services from being able to (re)start successfully since the systemd unit files first remove the old container, which fails due to the containerized node holding the mount point, then tries a docker run, which fails because a container with that name already exists.To avoid this, the PR removes
/var/lib/docker
from the volumes mounted into the containerized node.@derekwaynecarr @smarterclayton @eparis