The orchestrator's file sync client has a built-in locking mechanism that ensures
your plans run in a consistent environment state. The locking mechanism prevents plans from
starting while a code deployment is in progress, and it prevents new code deployments from
starting while a plan is running. If necessary, it is possible to disable this locking
mechanism if you need to run plans and deploy code simultaneously. Consider the tradeoffs
before deciding whether to disable the plan locking mechanism.
You might want to disable the plan locking mechanism if:
- You want to allow code deployments to start while plans are running.
- You want to allow a plan run to start while a code deployment is in
progress.
- Your code deployments don't frequently or substantially change the
environment state that plans run in.
- You aren't concerned if the environment state changes during a plan run (due
to a concurrent code deployment).
CAUTION:
When you disable the plan locking mechanism, the environment states your plans
run in might be inconsistent or change while the plans are starting, running, or
finishing. This depends on when your code deployments happen and whether they
happen while a plan is running. Puppet functions
and plans that call other plans might behave unexpectedly if a code deployment
occurs while a plan is running.
If it is important to you that your plans always run in a consistent environment
state, you probably don't want to disable the plan locking mechanism.
-
In the PE console, go to .
-
On the Classes tab, locate (or add) the
puppet_enterprise::profile::plan_executor
class, and
set the versioned_deploys
parameter to true
. The full declaration is:
puppet_enterprise::profile::plan_executor::versioned_deploys: true
Copied!
Important: Setting this parameter to
true
disables the orchestrator file sync client's locking mechanism that
usually enforces a consistent environment state for your plans. It does this
by preventing plans from running while a code deployment occurs and by
stopping new code deployments from starting while a plan is in
progress.
Tasks, scripts, and apply block compilations always use the
latest synced version of your code, regardless of this setting. However,
after you set versioned_deploys
to
true
, Puppet functions and plans that call
other plans also use the latest synced version of your code, instead of
the version of the code that was present when the plan started. Due to
the possibility for the code to change during the plan run, Puppet functions and plans that call
other plans might behave unexpectedly if a code deployment occurs while
a plan is running.
-
Commit your changes.
-
The orchestrator server doesn't automatically restart after setting this
parameter, so you need to restart the
pe-orchestration-services
service to finish applying the change.
To do this, run the following command on the primary server:
service pe-orchestration-services reload
Copied!
Results
The orchestrator can now run plans without blocking your code deployments, and code
deployments can start without waiting for plans to finish.