sync private repo, clone success, sync always error [again]
Hi - I think I'm experiencing the same issue as https://github.com/kubernetes/git-sync/issues/182. I have a Gitlab repository which is an umbrella for eleven submodules, and gitsync successfully performs the full recursive submodule sync (though it is very slow) but then crashes once the sync is complete before the symlink is created.
I0521 13:42:42.380969 11 main.go:700] "level"=0 "msg"="git root exists and is not empty (previous crash?), cleaning up" "path"="/git"
Any ideas? The original thread suggested specifying the URL with ".git" at the end, which doesn't seem to have fixed things for me.
Originally posted by @sglickman in https://github.com/kubernetes/git-sync/issues/182#issuecomment-845962530
Reproduced with git-sync v3.3.0 and v3.2.2
Can you post the logs before the crash and restart (kubectl logs ... --previous or just run it by hand)?
INFO: detected pid 1, running init handler
I0522 20:44:59.261452 12 main.go:495] "level"=0 "msg"="starting up" "args"=["/git-sync"] "pid"=12
I0522 20:44:59.268419 12 main.go:784] "level"=0 "msg"="cloning repo" "origin"="https://git.biome.io/seth/airflow-repo.git" "path"="/git"
I0522 20:44:59.294170 12 main.go:790] "level"=0 "msg"="git root exists and is not empty (previous crash?), cleaning up" "path"="/git"
E0522 20:44:59.359582 12 main.go:168] "msg"="too many failures, aborting" "error"="Run(git clone --no-checkout -b master --depth 1 https://git.biome.io/seth/airflow-repo.git /git): exit status 128: { stdout: \"\", stderr: \"fatal: destination path '/git' already exists and is not an empty directory.\\n\" }" "failCount"=0
this was on restart 4 though, i'll try to grab restart 1
INFO: detected pid 1, running init handler
I0522 20:48:41.275541 13 main.go:495] "level"=0 "msg"="starting up" "args"=["/git-sync"] "pid"=13
I0522 20:48:41.279407 13 main.go:784] "level"=0 "msg"="cloning repo" "origin"="https://git.biome.io/seth/airflow-repo.git" "path"="/git"
I0522 20:48:46.877963 13 main.go:666] "level"=0 "msg"="syncing git" "hash"="0805590c3a88062afd3bb0be54e9bcd89e76a4f1" "rev"="HEAD"
I0522 20:49:02.455749 13 main.go:687] "level"=0 "msg"="adding worktree" "branch"="origin/master" "path"="/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1"
I0522 20:49:03.328530 13 main.go:710] "level"=0 "msg"="reset worktree to hash" "hash"="0805590c3a88062afd3bb0be54e9bcd89e76a4f1" "path"="/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1"
I0522 20:49:03.328563 13 main.go:715] "level"=0 "msg"="updating submodules"
E0522 20:52:33.717853 13 main.go:168] "msg"="too many failures, aborting" "error"="Run(git submodule update --init --recursive --depth 1): context deadline exceeded: { stdout: \"Submodule path 'admin': checked out '239cc1608f8eb6ac33ac2e4b831f2ccda12b5f33'\\nSubmodule path 'auth-cli': checked out '046a1bbe2b3185f4ce9c0a21639536ba20931a33'\\nSubmodule path 'cathpci': checked out '5c4cce25dedbb727aa08f992b6eee76c521b9858'\\nSubmodule path 'cea': checked out 'd6698c7d977c4952bd556591e063ad769bdd3848'\\nSubmodule path 'dags': checked out 'ccb4ff83a4614ba57b7c8215ed902e15797e0270'\\nSubmodule path 'icd': checked out '68d2d85927936424982b7c0fcb3dd1de56056e68'\\nSubmodule path 'mungine': checked out 'f87fdb6891cff5351e044721dd46ebfc9aa7c346'\\nSubmodule path 'perman': checked out '193986f9f2bb3ca824b10adfa8e052e22a10d4fa'\\nSubmodule path 'riskmo': checked out '87f4e1d48825c9693c07e4838279746bf2faf658'\\nSubmodule path 'tvtetl': checked out '61e4bc3bf7b2bf3c6ba7d94efbcd8ba02e2041d4'\\nSubmodule path 'ymlconf': checked out '6002c5dd91a880d81adf6a3b95e725d84befaa48'\\n\", stderr: \"Submodule 'admin' (https://git.biome.io/pipeline/admin) registered for path 'admin'\\nSubmodule 'auth-cli' (https://git.biome.io/platform/auth-cli) registered for path 'auth-cli'\\nSubmodule 'cathpci' (https://git.biome.io/pipeline/cathpci) registered for path 'cathpci'\\nSubmodule 'cea' (https://git.biome.io/pipeline/cea) registered for path 'cea'\\nSubmodule 'dags' (https://git.biome.io/pipeline/dags.git) registered for path 'dags'\\nSubmodule 'icd' (https://git.biome.io/pipeline/icd) registered for path 'icd'\\nSubmodule 'mungine' (https://git.biome.io/pipeline/mungine) registered for path 'mungine'\\nSubmodule 'perman' (https://git.biome.io/pipeline/perman) registered for path 'perman'\\nSubmodule 'riskmo' (https://git.biome.io/pipeline/riskmo) registered for path 'riskmo'\\nSubmodule 'tvtetl' (https://git.biome.io/pipeline/tvtetl) registered for path 'tvtetl'\\nSubmodule 'ymlconf' (https://git.biome.io/platform/ymlconf) registered for path 'ymlconf'\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/admin'...\\nwarning: redirecting to https://git.biome.io/pipeline/admin.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/auth-cli'...\\nwarning: redirecting to https://git.biome.io/platform/auth-cli.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/cathpci'...\\nwarning: redirecting to https://git.biome.io/pipeline/cathpci.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/cea'...\\nwarning: redirecting to https://git.biome.io/pipeline/cea.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/dags'...\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/icd'...\\nwarning: redirecting to https://git.biome.io/pipeline/icd.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/mungine'...\\nwarning: redirecting to https://git.biome.io/pipeline/mungine.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/perman'...\\nwarning: redirecting to https://git.biome.io/pipeline/perman.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/riskmo'...\\nwarning: redirecting to https://git.biome.io/pipeline/riskmo.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/tvtetl'...\\nwarning: redirecting to https://git.biome.io/pipeline/tvtetl.git/\\nCloning into '/git/0805590c3a88062afd3bb0be54e9bcd89e76a4f1/ymlconf'...\\nwarning: redirecting to https://git.biome.io/platform/ymlconf.git/\\n\" }" "failCount"=0
I tried another approach, with a repository which is the same umbrella structure except that instead of using submodules, I've manually copied the files from those eleven repositories into actual folders within the new umbrella repository.
First repository, airflow-repo:
admin/ # submodule
cathpci/ # submodule
[...] # nine other submodules
Readme.md
Second repository, airflow-combined:
admin/ # actual folder created by git clone <url-to-admin-repo>; cd admin; rm -rf .git*; cp -R . ../airflow-combined/admin
cathpci/ # same pattern, all of the files from the actual cathpci repository but manually copied into this folder in airflow-combined
[...] # nine other submodules
This one fails as well.
INFO: detected pid 1, running init handler
I0522 21:01:33.575178 15 main.go:495] "level"=0 "msg"="starting up" "args"=["/git-sync"] "pid"=15
I0522 21:01:33.585309 15 main.go:784] "level"=0 "msg"="cloning repo" "origin"="https://git.biome.io/seth/airflow-combined.git" "path"="/git"
I0522 21:01:47.432331 15 main.go:666] "level"=0 "msg"="syncing git" "hash"="9a52eccb12c474af50ed521e307a783c571b741b" "rev"="HEAD"
I0522 21:02:34.053105 15 main.go:687] "level"=0 "msg"="adding worktree" "branch"="origin/master" "path"="/git/9a52eccb12c474af50ed521e307a783c571b741b"
E0522 21:02:34.063040 15 main.go:168] "msg"="too many failures, aborting" "error"="Run(git worktree add /git/9a52eccb12c474af50ed521e307a783c571b741b origin/master): exit status 128: { stdout: \"Preparing worktree (detached HEAD 9a52ecc)\\n\", stderr: \"Updating files: 1% (16/818)\\rUpdating files: 2% (17/818)\\rUpdating files: 3% (25/818)\\rUpdating files: 3% (30/818)\\rUpdating files: 4% (33/818)\\rUpdating files: 5% (41/818)\\rUpdating files: 5% (43/818)\\rUpdating files: 6% (50/818)\\rUpdating files: 6% (56/818)\\rUpdating files: 7% (58/818)\\rfatal: cannot create directory at 'cathpci/cathpci': Interrupted system call\\n\" }" "failCount"=0
So is this a real issue or the same CIFS problem?
I'm not sure. The message almost reads like a timeout issue to me? "context deadline exceeded"
But if it is a timeout, it's probably just because the CIFS thing is so dang slow.