Skip to content

BB-1576: Add variables required to gate playbook reconfiguration

This PR adds a flag to gate load balancer reconfiguration on Ocim.

Testing instructions:

  1. Checkout this branch on your Ocim devstack
  2. Run tests related to this change and check that they pass.
make test.one instance.tests.models.test_openedx_appserver.OpenEdXAppServerTestCase.test_make_active_no_load_balancer_reconfiguration
make test.one instance.tests.models.test_openedx_appserver.OpenEdXAppServerTestCase.test_make_active
make test.one instance.tests.models.test_load_balanced_mixin
  1. Configure Ocim with the .env used for development and add DISABLE_LOAD_BALANCER_CONFIGURATION = True.
  2. Run Ocim Shell and check that the setting is correctly set.
  3. Create a new instance:
from instance.factories import production_instance_factory
production_instance_factory(name='123', sub_domain='bb1576-test')
  1. Run Ocim with make run.dev and spawn a new appserver. Check that the following log appears on the instance log:
Direct load balancer reconfiguration disabled. Skipping 123 (bb1576-test.plebia.net) configuration...

Make sure you clean up the instance afterwards.

Reviewer:

FYI @SSPJ

Merge request reports