Commit 9d149e5f authored by Héctor Orón Martínez's avatar Héctor Orón Martínez

Merge branch 'update-migration' into 'debian/master'

Update migration

See merge request !26
parents 54cdaa2a 7d71ef52
......@@ -18,6 +18,8 @@ open-build-service (2.9.4-3) UNRELEASED; urgency=medium
[ Lucas Kanashiro ]
* debian/NEWS: add new entry to notify users to check the default Passenger
user when upgrading.
* debian/rake-tasks.sh: update migration task to restart all OBS related
services.
* debian/README.Debian: add instructions on how to upgrade an exitent instance
-- Lucas Kanashiro <kanashiro@debian.org> Tue, 09 Apr 2019 15:36:09 -0300
......
......@@ -77,12 +77,25 @@ case "$1" in
reload_apache restart
;;
migrate)
# Migrade the database
cd /usr/share/obs/api
RAILS_ENV=production bundle exec rake db:migrate:with_data >> log/db_migrate.log
# Migrate the database
cd /usr/share/obs/api
RAILS_ENV=production bundle exec rake db:migrate:with_data >> log/db_migrate.log
# Restart Apache to really enable the module and load obs.conf
reload_apache restart
# Restart all daemons
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d obsapi-clockwork.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-consistency_check.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-default.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-issuetracking.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-mailers.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-project_log_rotate.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-quick.service restart 3>/dev/null || true
invoke-rc.d obsapi-delayedjob-queue-releasetracking.service restart 3>/dev/null || true
echo "obsapi restarted."
fi
# Restart Apache to really enable the module and load obs.conf
reload_apache restart
;;
*)
echo "Usage: $0 {setup|migrate}"
......
......@@ -109,16 +109,6 @@ override_dh_systemd_start:
obspublisher.service \
obsservice.service \
obssigner.service
dh_systemd_start -p obs-api \
obsapi.target \
obsapi-clockwork.service \
obsapi-delayedjob-queue-consistency_check.service \
obsapi-delayedjob-queue-default.service \
obsapi-delayedjob-queue-issuetracking.service \
obsapi-delayedjob-queue-mailers.service \
obsapi-delayedjob-queue-project_log_rotate.service \
obsapi-delayedjob-queue-quick.service \
obsapi-delayedjob-queue-releasetracking.service
override_dh_auto_test:
dh_auto_test || true # temporary ignore
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment