intel / Edge-Software-Provisioner

BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

Wondering if there's a safe way to shutdown the ESP services? #5

Closed ychen2u closed 3 years ago

ychen2u commented 3 years ago

Hi, Maintainers,

How can we shutdown ESP services safely after I finished the node provisioning?

There's no script to tear down the services.

I tried to run "docker-compose down", but after the service containers are down, I failed to delete the ESP folder and got the following "Device busy" issue:

rm: cannot remove 'esp/template/nginx/index.html': Device or resource busy
rm: cannot remove 'esp/data/srv/tftp': Device or resource busy
rm: cannot remove 'esp/data/usr/share/nginx/html/tftp': Device or resource busy

I have to manually "sudo umount" those locations, then I can clean up the folders.

Please help to check this issue and let me know if anything wrong.

Thanks!

ychen2u commented 3 years ago

The tested version is 1.6.2.

dvintel commented 3 years ago

Have you tried running "run.sh -d"?

https://github.com/intel/Edge-Software-Provisioner/blob/b0704ad6cfa19156897907d52cd5001b140f83aa/run.sh#L26

brod-intel commented 3 years ago

Unfortunately v1.6.2 does not have have "-d" option for run.sh, you will have to upgrade to v2.0 for this support. v2.0 is backwards compatible with v1.6.2 Profiles

ychen2u commented 3 years ago

Thanks, will try!

inteltiger commented 2 years ago

the following worked for me

umount /root/dek/esp/data/usr/share/nginx/html/tftp rm -rf /root/dek/esp/data/usr/share/nginx/html/tftp

ychen2u commented 2 years ago

Yep, this works. But I think the script should take care of these mounts.

zhajianl commented 2 years ago

@ychen2u Patch for this issue: https://github.com/intel/Edge-Software-Provisioner/pull/30