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

fix clean target of e2e/Makefile #103

Merged
merged 1 commit into from
Mar 9, 2022
Merged

Conversation

daichimukai
Copy link
Contributor

make -C e2e clean fails with the following error:

rm: cannot remove '/tmp/autoresizer/controller/pods': Permission denied
rm: cannot remove '/tmp/autoresizer/worker/pods': Permission denied
make: *** [Makefile:95: clean] Error 1

Even if executing with sudo, we get something like:

rm: cannot remove '/tmp/autoresizer/worker/pods/78b7ad42-aeb2-48b3-8c01-ef37cba63a00/volume-subpaths/web-config/prometheus/4': Device or resource busy
rm: cannot remove '/tmp/autoresizer/worker/pods/c4169fcb-6297-4053-9faa-9ae965962f3b/volume-subpaths/web-config/prometheus/4': Device or resource busy
make: *** [Makefile:95: clean] Error 1

These files are mount points. To teardown properly, unmount these before removing TMPDIR.

@toshipp toshipp requested review from a team, toshipp, satoru-takeuchi and cupnes and removed request for a team and toshipp March 8, 2022 05:34
e2e/Makefile Outdated
@@ -92,6 +92,12 @@ kube-prometheus:

.PHONY: clean
clean: stop-lvmd
for d in $$($(SUDO) find $(TMPDIR) -type f); do \
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be "-type d"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"type -f" is correct. There are only file mount points left because the directory mount points are already unmounted here (called by make stop-lvmd -> make -C $(TMPDIR)/topolvm/example stop-lvmd -> make -C $(TMPDIR)/topolvm/example shutdown-kind)
https://github.com/topolvm/topolvm/blob/e00d2f66180b9058e3c78268ce095de34805291f/example/Makefile#L76-L80

The variable name "d" may be changed to "f".

Copy link
Member

Choose a reason for hiding this comment

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

OK, I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed variable name d to f.

satoru-takeuchi
satoru-takeuchi previously approved these changes Mar 9, 2022
e2e/Makefile Outdated
@@ -92,6 +92,12 @@ kube-prometheus:

.PHONY: clean
clean: stop-lvmd
for d in $$($(SUDO) find $(TMPDIR) -type f); do \
Copy link
Member

Choose a reason for hiding this comment

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

OK, I see.

cupnes
cupnes previously approved these changes Mar 9, 2022
`make -C e2e clean` fails with the following error:

rm: cannot remove '/tmp/autoresizer/controller/pods': Permission denied
rm: cannot remove '/tmp/autoresizer/worker/pods': Permission denied
make: *** [Makefile:95: clean] Error 1

Even if executing with sudo, we get something like:

rm: cannot remove '/tmp/autoresizer/worker/pods/78b7ad42-aeb2-48b3-8c01-ef37cba63a00/volume-subpaths/web-config/prometheus/4': Device or resource busy
rm: cannot remove '/tmp/autoresizer/worker/pods/c4169fcb-6297-4053-9faa-9ae965962f3b/volume-subpaths/web-config/prometheus/4': Device or resource busy
make: *** [Makefile:95: clean] Error 1

These files are mount points. To teardown properly, unmount these before
removing TMPDIR.
@satoru-takeuchi satoru-takeuchi merged commit 5546067 into main Mar 9, 2022
@satoru-takeuchi satoru-takeuchi deleted the fix-e2e-make-clean branch March 9, 2022 08:47
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.

3 participants