laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/32252 )
Change subject: contrib/jenkins.sh: clone libnftnl and libnftables via git:// ......................................................................
contrib/jenkins.sh: clone libnftnl and libnftables via git://
From time to time we see sporadic master build failures on Jenkins because git fails to clone one of the repositories:
``` Cloning into 'nftables'... error: garbage at end of loose object '0ca03ecd6ab3cfdc94f8f9ef6e3a7c40d1aa7195' fatal: loose object 0ca03ecd6ab3cfdc94f8f9ef6e3a7c40d1aa7195 (stored in /build/libnftnl/nftables/.git/objects/0c/a03ecd6ab3cfdc94f8f9ef6e3a7c40d1aa7195) is corrupt
Cloning into 'libnftnl'... fatal: unable to access 'https://git.netfilter.org/libnftnl/': Failed to connect to git.netfilter.org port 443: Connection timed out ```
Running git with GIT_CURL_VERBOSE=true reveals that the server is using an old "dumb" git protocol, so the client is sending hundreds of HTTP requests to the server. I also noticed that cloning via http[s]:// takes significantly more time than cloning via git://, because of the old protocol being used.
``` $ time git clone https://git.netfilter.org/nftables ... real 1m16.848s user 0m4.867s sys 0m1.883s
$ time git clone git://git.netfilter.org/nftables ... real 0m2.453s user 0m1.180s sys 0m0.158s ```
According to [1], there is a more modern "smart" protocol, which is relatively more stable and fast. However it's not supported by the remote server, so let's use git:// as a workaround.
[1] https://www.git-scm.com/docs/http-protocol
Change-Id: I8e943c74052cc74eae8dc1d80ab243f792a90156 --- M contrib/jenkins.sh 1 file changed, 50 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3b395ef..807774a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -47,7 +47,7 @@ if [ -d "./$project" ]; then rm -rf "./$project" fi - git clone "https://git.netfilter.org/$project" "$project" + git clone "git://git.netfilter.org/$project" "$project" cd "$project" autoreconf --install --force ./configure \