Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
62c92997
Commit
62c92997
authored
Jul 23, 2015
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More updates to make it work with devstack.
This still needs to be more thouroughly tested with fullstack.
parent
15e92f15
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
util/vagrant/migrate.sh
+27
-6
No files found.
util/vagrant/migrate.sh
View file @
62c92997
...
...
@@ -4,6 +4,7 @@
CONFIGURATION
=
"fullstack"
TARGET
=
"named-release/cypress.rc"
INTERACTIVE
=
true
OPENEDX_ROOT
=
"/edx"
read
-d
''
HELP_TEXT
<<-
EOM
Attempts to migrate your Open edX installation to a different release.
...
...
@@ -15,6 +16,8 @@ Attempts to migrate your Open edX installation to a different release.
Migrate to the given git ref. Defaults to \"
$TARGET
\"
-y
Run in non-interactive mode (reply \"yes\" to all questions)
-r EDX_ROOT
The root directory under which all edx applications are installed.
-h
Show this help and exit.
EOM
...
...
@@ -35,6 +38,9 @@ while getopts "hc:t:y" opt; do
y
)
INTERACTIVE
=
false
;;
r
)
OPENEDX_ROOT
=
$OPTARG
;;
esac
done
...
...
@@ -74,16 +80,23 @@ if [[ $TARGET == *cypress* && $INTERACTIVE == true ]] ; then
cat
<<
"EOM"
WARNING WARNING WARNING WARNING WARNING
The Cypress release of Open edX upgraded the version of Celery used
by edx-platform workers. This change was introduced to fix the fact
that or restart the celery worker sometimes blocks indefinitely and
does not get shutdon. In order to reduce the risks during the upgrade
we will pre-emptively
kill
all celery workers on this machine.
by the edx-platform workers. This change was introduced to fix the fact
that when trying to restart the celery worker, the process hangs
while
trying to shutdown. This will cause it to block indefinitely. In order
to prevent this from happening during the upgrade we will pre-emptively
kill
all celery workers on this machine.
Birch also introduced a change that breaks the newer version of
ansible when it tries to update the forums rbenv repository. In order
to fix the issue, uncommited modifications made to the /edx/app/forum/.rbenv
repo will be reverted.
Note: that this script assumes the standard location
for
all tools
installed by edx-ansible
(
under the
'/edx'
)
directory
if
this is
not the
case
for
you please re-run this script after setting the
'OPENEDX_ROOT'
environment variable to your equivalent of
'/edx'
and re-running this script.
Do you wish to proceed?
EOM
read
input
...
...
@@ -92,8 +105,16 @@ EOM
exit
1
else
echo
"Killing all celery worker processes."
sudo
${
OPENEDX_ROOT
}
/bin/supervisorctl stop edxapp_worker:
*
&
# Supervisor restarts the process a couple of times so we have to kill it multiple times.
sudo
pgrep
-lf
celery
|
grep
worker
|
awk
'{ print $1}'
|
sudo
xargs
-I
{}
kill
-9
{}
sleep 2
sudo
pgrep
-lf
celery
|
grep
worker
|
awk
'{ print $1}'
|
sudo
xargs
-I
{}
kill
-9
{}
sleep 2
sudo
pgrep
-lf
celery
|
grep
worker
|
awk
'{ print $1}'
|
sudo
xargs
-I
{}
kill
-9
{}
sleep 2
sudo
pgrep
-lf
celery
|
grep
worker
|
awk
'{ print $1}'
|
sudo
xargs
-I
{}
kill
-9
{}
sudo
-u
forum git
-C
/edx
/app/forum/.rbenv reset
--hard
sudo
-u
forum git
-C
${
OPENEDX_ROOT
}
/app/forum/.rbenv reset
--hard
fi
fi
...
...
@@ -126,5 +147,5 @@ if [ $exitcode != 0 ]; then
exit
$exitcode
;
fi
cd
/
rm
-rf
$TEMPDIR
sudo
rm
-rf
$TEMPDIR
echo
"Migration complete. Please reboot your machine."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment