summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2018-02-14 16:27:27 -0800
committerDmitry Tantsur <divius.inside@gmail.com>2018-02-22 09:18:37 +0000
commit780ab207a1b2e46a7fd131f4cbb7c026f3a1b390 (patch)
tree0790b2e4f1de07f2e384c7a7a367079b60067a63
parente2694188ba1e1f1337a07fcf12c372f500f8618c (diff)
downloadironic-780ab207a1b2e46a7fd131f4cbb7c026f3a1b390.tar.gz
Disable .pyc files for grenade multinode
Ironic's grenade multinode suffers from some of unique issues. * Nova can never be upgraded as there is a static pin that increments higher. As such, newer nova can never run with older ironic. * As Nova cannot be upgraded, it is left running throughout the test sequence. The above two conditions result in possible breaking package upgrades as the python environments are shared between the old and new installations. In order to better isolate the running processes, as would be in most actual production environments, we need to minimize underlying inter-reactions due to python library upgrades. Credit goes to Jim Rollenhagen for coming up with this idea, once the massive conundrum was fully explained. Thanks Jim! Partial-Bug: #1744139 Change-Id: Ifdd119d9cdde2ead6c3e36862cc77da67d10f7d1 (cherry picked from commit 93f376f3450b611842816f7248943350e4fd1a73)
-rw-r--r--playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml29
1 files changed, 29 insertions, 0 deletions
diff --git a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
index e408b9253..57d87a7b4 100644
--- a/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
+++ b/playbooks/legacy/grenade-dsvm-ironic-multinode-multitenant/run.yaml
@@ -15,6 +15,35 @@
path: '{{ ansible_user_dir }}/workspace'
state: directory
+ # NOTE(TheJulia): Python supports recompiling bytecode if a precompiled
+ # (.pyc) file is written to disk. Python will automatically recompile
+ # should that file disappear and attempt to load and use that bytecode.
+ # This can lead to unexpected and undesirable behavior such as python
+ # crashing.
+ #
+ # As this job scenario upgrades across possible structural changes to
+ # python modules, and operates in a mixed environment between releases
+ # it is a good idea to prevent scenarios where newer modules installed
+ # by packages are leveraged by un-upgraded services because their
+ # underlying python packages have been updated during runtime.
+ #
+ # This is unique to Ironic's rolling upgrade grenade job, as Nova is
+ # excluded from being upgraded in the stack, and Ironic is left in
+ # a half-upgraded situation. The net result of which is we have an
+ # unstable Nova installation.
+ # https://bugs.launchpad.net/ironic/+bug/1744139
+ #
+ # TODO(TheJulia): We either need to find a better way to test rolling
+ # upgrades. Something which supports virtualenvs would be ideal, as
+ # well as something that allows us greater upgrade order control as
+ # the Ironic upgrade sequence is problematic and breaks towards the end
+ # of every cycle.
+ - shell:
+ cmd: |
+ echo 'DefaultEnvironment="PYTHONDONTWRITEBYTECODE=1"' >>/etc/systemd/system.conf
+ systemctl daemon-reexec
+ become: yes
+
- shell:
cmd: |
set -e