Skip to content
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

refactor: set lxcfs managed by systemd #885

Merged
merged 1 commit into from
Mar 27, 2018

Conversation

CodeJuan
Copy link
Contributor

Ⅰ. Describe what this PR did

To improve availability, lxcfs process should be managed by other process, such as systemd.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how you did it

  1. Remove the code of starting lxcfs in Pouchd.
  2. Check if the mount point of lxcfs is existed when starting Pouchd.

Ⅳ. Describe how to verify it

  1. Make sure lxcfs is running, and the mount point of lxcfs is /var/lib/lxcfs
  2. pouchd --enable-lxcfs
  3. pouch run -m 512M --enableLxcfs=true registry.hub.docker.com/library/busybox:latest head -n 1 /proc/meminfo
  4. The output should be 524288 kB

Ⅴ. Special notes for reviews

@codecov-io
Copy link

Codecov Report

Merging #885 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #885      +/-   ##
==========================================
- Coverage   14.62%   14.58%   -0.04%     
==========================================
  Files         115      116       +1     
  Lines        6940     6958      +18     
==========================================
  Hits         1015     1015              
- Misses       5839     5857      +18     
  Partials       86       86
Impacted Files Coverage Δ
cli/remount_lxcfs.go 0% <0%> (ø)
cli/main.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3c2f20...e9f5177. Read the comment docs.

@Letty5411
Copy link
Contributor

hack/make.sh also need to be edited to install fuse.

@@ -10,6 +10,7 @@ KillMode=process
Restart=on-failure
ExecStopPost=-/usr/bin/fusermount -u /var/lib/lxcfs
Delegate=yes
ExecStartPost=pouch remount-lxcfs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need to change ./package/deb/systemd/pouch.service

@HusterWan
Copy link
Contributor

LGTM

@HusterWan HusterWan merged commit 1b9e8c6 into AliyunContainerService:master Mar 27, 2018
@jcxian
Copy link

jcxian commented Sep 5, 2018

@Letty5411 I modify the service file like you do, but after restarting lxcfs, still can't see the file /proc/meminfo in the container. This error still exists. “cat: /proc/meminfo: Transport endpoint is not connected”

@xigang
Copy link

xigang commented Oct 31, 2019

The same problem. After starting the lxcfs service,Execute the following mount command:

image

in container:

# cat /var/lib/lxc/lxcfs/proc/cpuinfo
cat: /var/lib/lxc/lxcfs/proc/cpuinfo: Transport endpoint is not connected

@CodeJuan @Letty5411 Please help😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants