Code Manager deployments might fail if a path within your code repository has the same path but has changed type (file, directory, or symbolic link). For example, subsequent code deployment might fail if a file in a control repository located at modules/example_module/files/config
is removed and a directory is created at the same path.
Error messages and logs
Errors vary, but puppetserver.log
might contain a timeout error citing a JGitInternalException: Checkout conflict with files
:
[root@server ~]# puppet code deploy production --wait
The deploys job failed to sync before the sync timeout was exceeded.
{
"errored-deploys": [],
"timeout": 600,
"unsynced-deploys": [
{
"deploy-signature": "1849df...",
"environment": "production",
"file-sync": {
"code-commit": "b7d9a...",
"environment-commit": "b88fa..."
},
"id": 3,
"status": "complete",
"sync-clients-status": {
"server.example.com": {
"cause": {
"last_check_in_time": "2020-04-20T21:01:58.069Z",
"last_sync": {
"puppet-code": {
"cause": "org.eclipse.jgit.api.errors.JGitInternalException: Checkout conflict with files: \nmodules/example_module/files/config/config.file\nmodules/example_module/files/config/config2.file",
"kind": ":puppetlabs.enterprise.file-sync-errors/sync-error",
"live-dir": "/etc/puppetlabs/code",
"live-dir-diff": null,
"msg": "Error while sync'ing live code directory",
"repo-name": "puppet-code",
"repo-path": "/opt/puppetlabs/server/data/puppetserver/filesync/client/puppet-code.git"
}
}
},
"status": "error"
}
}
}
]
}
Version and installation information
PE version: All supported versions
Installation type: Any supported architecture
Solution
To avoid the conflict, change the path of any conflicting files, directories, or links.
Using the above example where modules/example_module/files/config
was a file and is now a directory:
-
Rename the
modules/example_module/files/config
directory so that it doesn’t share the same path as the file, such asmodules/example_module/files/config.d
-
Commit the change to your repository.
-
Deploy code:
puppet code deploy production --wait
If deployment fails with the same error, check the error message for paths that have the same issue and modify the paths to avoid further conflicts.
If deployment fails with a file sync client error, then your file sync cache might be corrupt. For help clearing and resetting the cache, open a Support ticket.
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles