diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..598a9d33f9fdc6a5504ed935aa58f901e6b08648 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +Generated by moby since openEuler-24.03-LTS-SP1 + +https://gitee.com/src-openeuler/libnetwork/issues/IB4FCZ diff --git a/backport-clean-up-inDelete-network-atomically.patch b/backport-clean-up-inDelete-network-atomically.patch deleted file mode 100644 index 8db938c3ab95aa2d6c3b89beb9b83ee23d3f0d6d..0000000000000000000000000000000000000000 --- a/backport-clean-up-inDelete-network-atomically.patch +++ /dev/null @@ -1,48 +0,0 @@ -From dbbf124db33cbe4640da59fa03d91902162d7b8e Mon Sep 17 00:00:00 2001 -From: Cory Snider -Date: Tue, 25 Apr 2023 11:49:58 -0400 -Subject: [PATCH] Clean up inDelete network atomically - -The (*network).ipamRelease function nils out the network's IPAM info -fields, putting the network struct into an inconsistent state. The -network-restore startup code panics if it tries to restore a network -from a struct which has fewer IPAM config entries than IPAM info -entries. Therefore (*network).delete contains a critical section: by -persisting the network to the store after ipamRelease(), the datastore -will contain an inconsistent network until the deletion operation -completes and finishes deleting the network from the datastore. If for -any reason the deletion operation is interrupted between ipamRelease() -and deleteFromStore(), the daemon will crash on startup when it tries to -restore the network. - -Updating the datastore after releasing the network's IPAM pools may have -served a purpose in the past, when a global datastore was used for -intra-cluster communication and the IPAM allocator had persistent global -state, but nowadays there is no global datastore and the IPAM allocator -has no persistent state whatsoever. Remove the vestigial datastore -update as it is no longer necessary and only serves to cause problems. -If the network deletion is interrupted before the network is deleted -from the datastore, the deletion will resume during the next daemon -startup, including releasing the IPAM pools. - -Signed-off-by: Cory Snider -(cherry picked from commit moby/moby@c957ad006747df00730ce3aeaf4ac9df14baa998) -Signed-off-by: Cory Snider ---- - network.go | 3 --- - 1 file changed, 3 deletions(-) - -diff --git libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/network.go libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-b/network.go -index 734bb83cdd..7895ea53b1 100644 ---- libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/network.go -+++ libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-b/network.go -@@ -1064,9 +1064,6 @@ func (n *network) delete(force bool, rmLBEndpoint bool) error { - } - - n.ipamRelease() -- if err = c.updateToStore(n); err != nil { -- logrus.Warnf("Failed to update store after ipam release for network %s (%s): %v", n.Name(), n.ID(), err) -- } - - // We are about to delete the network. Leave the gossip - // cluster for the network to stop all incoming network diff --git a/backport-fix-deadlock-between-getSvcRecords-and-processEndpointDelete.patch b/backport-fix-deadlock-between-getSvcRecords-and-processEndpointDelete.patch deleted file mode 100644 index 39b03063dec6e7b22d1ff4bb57cac4cff2656774..0000000000000000000000000000000000000000 --- a/backport-fix-deadlock-between-getSvcRecords-and-processEndpointDelete.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -apurN libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/store.go libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-new/store.go ---- libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/store.go 2018-07-07 07:28:11.000000000 +0800 -+++ libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-new/store.go 2024-06-18 15:47:02.153424400 +0800 -@@ -421,11 +421,14 @@ func (c *controller) processEndpointDele - return - } - -+ networkID := n.ID() -+ endpointID := ep.ID() -+ - c.Lock() -- nw, ok := nmap[n.ID()] -+ nw, ok := nmap[networkID] - - if ok { -- delete(nw.localEps, ep.ID()) -+ delete(nw.localEps, endpointID) - c.Unlock() - - // Update the svc db about local endpoint leave right away -@@ -439,9 +442,8 @@ func (c *controller) processEndpointDele - - // This is the last container going away for the network. Destroy - // this network's svc db entry -- delete(c.svcRecords, n.ID()) -- -- delete(nmap, n.ID()) -+ delete(c.svcRecords, networkID) -+ delete(nmap, networkID) - } - } - c.Unlock() diff --git a/libnetwork-d00ceed.tar.gz b/libnetwork-d00ceed.tar.gz deleted file mode 100644 index be3580934653216a202db2f7b4d26d65beb34bb3..0000000000000000000000000000000000000000 Binary files a/libnetwork-d00ceed.tar.gz and /dev/null differ diff --git a/libnetwork.spec b/libnetwork.spec deleted file mode 100644 index 232525b596821fe564292712c69e1ed23b97ba23..0000000000000000000000000000000000000000 --- a/libnetwork.spec +++ /dev/null @@ -1,91 +0,0 @@ -%define debug_package %{nil} -Name: libnetwork -Version: 0.8.0.dev.2 -Release: 107 -Summary: Proxy used for docker port mapping -License: CC-BY-SA-4.0 and MIT and Apache-2.0 and MPL-2.0 -URL: https://github.com/docker/libnetwork -Source: libnetwork-d00ceed.tar.gz - -Patch0001: backport-fix-deadlock-between-getSvcRecords-and-processEndpointDelete.patch -Patch0002: backport-clean-up-inDelete-network-atomically.patch - -BuildRequires: golang >= 1.8.3 -BuildRequires: make -Provides: docker-proxy -Obsoletes: docker-proxy - - -%description - -%prep -%setup -c -n libnetwork -%patch 0001 -%patch 0002 - - -%build -cd libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9 -export GO111MODULE=off -export CGO_ENABLED=0 -export GOPATH=`pwd`/.gopath -mkdir -p $GOPATH/src/github.com/docker/ -ln -sfn `pwd` $GOPATH/src/github.com/docker/libnetwork -cd $GOPATH/src/github.com/docker/libnetwork -CGO_ENABLED=1 \ -CGO_CFLAGS="-fstack-protector-strong -fPIE" \ -CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \ -CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \ -CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \ -%if "%toolchain" == "clang" - go build -buildmode=pie -ldflags="-linkmode=external -s -w -buildid=IdByIsula -extldflags=-Wl,-z,relro,-z,now " -o docker-proxy ./cmd/proxy -%else - go build -buildmode=pie -ldflags="-linkmode=external -s -w -buildid=IdByIsula -extldflags=-zrelro -extldflags=-znow " -o docker-proxy ./cmd/proxy -%endif - -%install -install -d $RPM_BUILD_ROOT/%{_bindir} -install -p -m 755 libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy - -%clean -%{__rm} -rf %{_bindir}/docker-proxy - -%files -%{_bindir}/docker-proxy - -%changelog -* Thu Jul 18 2024 guojunding - 0.8.0.dev.2-107 -- Clean up inDelete network atomically - -* Tue Jun 18 2024 guojunding - 0.8.0.dev.2-106 -- Fix deadlock between getSvcRecords and processEndpointDelete - -* Sat May 06 2023 yoo - 0.8.0.dev.2-105 -- fix clang build error - -* Fri May 20 2022 liukuo - 0.8.0.dev.2-104 -- License compliance rectification - -* Mon Jan 10 2022 xiadanni 0.8.0.dev.2-103 -- Type:bugfix -- Id:NA -- SUG:NA -- DESC:disable go module build - -* Thu Mar 18 2021 xiadanni 0.8.0.dev.2-102 -- Type:bugfix -- Id:NA -- SUG:NA -- DESC:compile option compliance - -* Thu Aug 20 2020 xiadanni 0.8.0.dev.2-101 -- Type:cleancode -- Id:NA -- SUG:NA -- DESC:modify source code struct - -* Mon Sep 30 2019 songnannan 0.8.0.dev.2-2.h1 -- Type:bugfix -- Id:NA -- SUG:NA -- DESC:the debuginfo and debugsource packages are not generated by default diff --git a/libnetwork.yaml b/libnetwork.yaml deleted file mode 100644 index f3616cdbdd88b0ea04c43876c340bf146675c5ee..0000000000000000000000000000000000000000 --- a/libnetwork.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: github -src_repo: moby/libnetwork -tag_prefix: ^v -seperator: .