Jaymon / chef-cookbooks

Various Chef cookbooks
MIT License
2 stars 0 forks source link

uwsgi upgrade doesn't stop uwsgi so provision/uwsgi upgrade fails #35

Open Jaymon opened 3 years ago

Jaymon commented 3 years ago

Error will look like this:

Expected process to exit with [0], but received '1'
out: ---- Begin output of cp -R "/var/chef/cache/uwsgi-2.0.18/uwsgi-2.0.18"/* "/opt/uwsgi" ----
out: STDOUT:
out: STDERR: cp: cannot create regular file '/opt/uwsgi/uwsgi': Text file busy
out: ---- End output of cp -R "/var/chef/cache/uwsgi-2.0.18/uwsgi-2.0.18"/* "/opt/uwsgi" ----
out: Ran cp -R "/var/chef/cache/uwsgi-2.0.18/uwsgi-2.0.18"/* "/opt/uwsgi" returned 1

Solution, to get the provision to work is to stop the server:

$ sudo systemctl stop <SERVER NAME>

But it would be better to just stop the server in the chef run if it sees it needs to upgrade.