Jaymon / chef-cookbooks

Various Chef cookbooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Jaymon opened this issue · comments

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.