Skip to content

Commit 4198fdf

Browse files
committed
Fix possible race condition in install_module
The pe_xl::install_module function previously used the code-manager-cli task to perform a 'file-sync commit' action. However, at the end of this action the live-dir is not guaranteed to be synchronized yet. This means if a Puppet run starts fast enough it could happen before any code in the staging-dir is actually available for use. This commit changes the code-manager-cli action to be 'commit', which is a combination of 'file-sync commit' and 'file-sync force-sync', at the end of which code is guaranteed to be ready for use.
1 parent 352cb09 commit 4198fdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/install_module.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function pe_xl::install_module(
2323

2424
run_command('chown -R pe-puppet:pe-puppet /etc/puppetlabs/code-staging', $target)
2525
run_task('pe_xl::code_manager', $target,
26-
action => 'file-sync commit',
26+
action => 'commit',
2727
)
2828

2929
}

0 commit comments

Comments
 (0)