submodule update failing intermittently when there are new changes
I am using git-sync for a repo with submodules. The flow is as follows -
- Push code to subrepo(branch b1)
- CI runs
git submodule update --init --remote --recursiveto update the remote. - This causes git-sync to run submodule update.
I see intermittent failures in the submodule update after pushing the changes. When I restart the deployments I don't get errors anymore. I am using v3.1.5
{
"log": "I0827 09:56:37.466631 17 main.go:529] \"level\"=0 \"msg\"=\"updating submodules\" \n",
"stream": "stderr",
"docker": {
"container_id": "cccc"
},
"kubernetes": {
"container_name": "git-sync-clone",
"namespace_name": "yyyy",
"pod_name": "xxxx",
"pod_id": "zzzz",
"namespace_id": "aaaa",
"namespace_labels": {
"istio-injection": "disabled",
"product_domain": "dd",
"service_name": "ss",
"fluxcd_io/sync-gc-mark": "sha256..."
}
}
}
{
"log": "panic: failed to wait4(): no child processes\n\n\n",
...
}
{
"log": "goroutine 21 [running]:\n",
...
}
{
"log": "k8s.io/git-sync/pkg/pid1.sigchld()\n\t/src/pkg/pid1/pid1.go:54 +0xfc\n",
...
}
{
"log": "k8s.io/git-sync/pkg/pid1.runInit(0x11)\n\t/src/pkg/pid1/pid1.go:39 +0xd8\n",
...
}
{
"log": "created by k8s.io/git-sync/pkg/pid1.ReRun\n\t/src/pkg/pid1/pid1.go:28 +0x170\n",
...
}
We have recently moved to submodules to meet a requirement and didn't face it before.
Bit more context around the deployments: [Maybe not relevant to this issue]
I am using it for running Apache Airflow DAGs and using KubernetesExecutor which would launch a worker pod(task + git-sync container) for each task. The errors are specifically observed when some of the tasks are launch after we push some code change on the DAGs subrepo. Restarting the deployments fixes these.
Does this also happen, when running git-sync locally?
I tried with v3.1.6 and I have not observed errors since on testing locally. Plan to update the version in our other environments soon.
Ok great. Closing this as resolved for now. If it comes up again, let us know. Happy syncing ;)