Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

[stable][1.5.x] vm_factory: Add clean_vm_template in setup#1434

Merged
chavafg merged 1 commit into
kata-containers:stable-1.5from
jcvenegas:stable-1.5-vmcache-fix
Apr 10, 2019
Merged

[stable][1.5.x] vm_factory: Add clean_vm_template in setup#1434
chavafg merged 1 commit into
kata-containers:stable-1.5from
jcvenegas:stable-1.5-vmcache-fix

Conversation

@jcvenegas
Copy link
Copy Markdown
Member

Clean the vm_template dir before test executes.

Fixes: #1363

Clean the vm_template dir before test executes.

Fixes: kata-containers#1363

Signed-off-by: Hui Zhu <teawater@hyper.sh>
@jcvenegas
Copy link
Copy Markdown
Member Author

/test

while [ $(mount | grep ${template_tmpfs_path} | wc -l) -ne 0 ]
do
echo "cleaning vm template"
{ umount ${template_tmpfs_path} ; res=$?; } || true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this work? this looks like you are unmounting the same destingation (template_tmpfs_path) over and over.
Maybe a 'for m in $(mount | grep blah)` loop would be better, then you can specify exactly what you are unmounting (but, you would also probably have to grep out the actual mount path from the grep result).

Copy link
Copy Markdown
Member Author

@jcvenegas jcvenegas Apr 9, 2019

Choose a reason for hiding this comment

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

edit: @grahamwhaley ah I just cherry pick the PR. It is already merged in master

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think is trying multiples times until is able to do it. The issue there is that could be and endless loop. I suggest to bring this in a new PR if want to fix it as this is just a cherry pick to have stable branches testing 'stable'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does this work? this looks like you are unmounting the same destingation (template_tmpfs_path) over and over.
Maybe a 'for m in $(mount | grep blah)` loop would be better, then you can specify exactly what you are unmounting (but, you would also probably have to grep out the actual mount path from the grep result).

Currently, "kata-runtime factory init" doesn't check if vm factory initialized before it mount template tmpfs path. So loop umount is useful.

PS, this comments remind me that kata-runtime factory init should do a check before mount. I will open a issue for it.

@chavafg chavafg merged commit 49f7ba0 into kata-containers:stable-1.5 Apr 10, 2019
@jcvenegas jcvenegas deleted the stable-1.5-vmcache-fix branch May 22, 2019 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants