diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index f2604d4cbf6..4978a3eefe5 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -31,12 +31,12 @@ jobs: include: - module: manager image: manager - image-tag: v2.2.1-rc.2 + image-tag: v2.2.1-rc.3 chart-name: manager skip: "Rate Limit" - module: scheduler image: scheduler - image-tag: v2.2.1-rc.2 + image-tag: v2.2.1-rc.3 chart-name: scheduler skip: "Rate Limit" - module: client diff --git a/scheduler/resource/standard/host_manager.go b/scheduler/resource/standard/host_manager.go index ba75003ac82..3e3923dab40 100644 --- a/scheduler/resource/standard/host_manager.go +++ b/scheduler/resource/standard/host_manager.go @@ -24,7 +24,6 @@ import ( "d7y.io/dragonfly/v2/pkg/container/set" pkggc "d7y.io/dragonfly/v2/pkg/gc" - "d7y.io/dragonfly/v2/pkg/types" "d7y.io/dragonfly/v2/scheduler/config" ) @@ -185,15 +184,6 @@ func (h *hostManager) RunGC() error { return true } - // Reclaim the host. - if host.PeerCount.Load() == 0 && - host.ConcurrentUploadCount.Load() == 0 && - host.Type == types.HostTypeNormal { - host.Log.Info("host has been reclaimed") - h.Delete(host.ID) - return true - } - return true }) diff --git a/scheduler/resource/standard/host_manager_test.go b/scheduler/resource/standard/host_manager_test.go index e683a0a38e4..c596cf7811b 100644 --- a/scheduler/resource/standard/host_manager_test.go +++ b/scheduler/resource/standard/host_manager_test.go @@ -433,21 +433,6 @@ func TestHostManager_RunGC(t *testing.T) { mock func(m *gc.MockGCMockRecorder) expect func(t *testing.T, hostManager HostManager, mockHost *Host, mockPeer *Peer) }{ - { - name: "host reclaimed", - mock: func(m *gc.MockGCMockRecorder) { - m.Add(gomock.Any()).Return(nil).Times(1) - }, - expect: func(t *testing.T, hostManager HostManager, mockHost *Host, mockPeer *Peer) { - assert := assert.New(t) - hostManager.Store(mockHost) - err := hostManager.RunGC() - assert.NoError(err) - - _, loaded := hostManager.Load(mockHost.ID) - assert.Equal(loaded, false) - }, - }, { name: "host has peers", mock: func(m *gc.MockGCMockRecorder) { diff --git a/test/e2e/v2/dfcache_test.go b/test/e2e/v2/dfcache_test.go index 558d1f22748..fc7b8c1c2f4 100644 --- a/test/e2e/v2/dfcache_test.go +++ b/test/e2e/v2/dfcache_test.go @@ -60,7 +60,7 @@ var _ = Describe("Import and Export Using Dfcache", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() + importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --persistent-replica-count 1 --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() fmt.Println(string(importOut), err) Expect(err).NotTo(HaveOccurred()) @@ -116,7 +116,7 @@ var _ = Describe("Import and Export Using Dfcache", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() + importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --persistent-replica-count 1 --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() fmt.Println(string(importOut), err) Expect(err).NotTo(HaveOccurred()) @@ -172,7 +172,7 @@ var _ = Describe("Import and Export Using Dfcache", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() + importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --persistent-replica-count 1 --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() fmt.Println(string(importOut), err) Expect(err).NotTo(HaveOccurred()) @@ -228,7 +228,7 @@ var _ = Describe("Import and Export Using Dfcache", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() + importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --persistent-replica-count 1 --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() fmt.Println(string(importOut), err) Expect(err).NotTo(HaveOccurred()) @@ -284,7 +284,7 @@ var _ = Describe("Import and Export Using Dfcache", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() + importOut, err := clientPod.Command("sh", "-c", fmt.Sprintf("dfcache import %s --persistent-replica-count 1 --id %s", testFile.GetOutputPath(), testFile.GetSha256())).CombinedOutput() fmt.Println(string(importOut), err) Expect(err).NotTo(HaveOccurred()) diff --git a/test/testdata/charts/config-v2-rate-limit.yaml b/test/testdata/charts/config-v2-rate-limit.yaml index 5a81afb73ce..8c746f276d3 100644 --- a/test/testdata/charts/config-v2-rate-limit.yaml +++ b/test/testdata/charts/config-v2-rate-limit.yaml @@ -66,9 +66,9 @@ scheduler: verbose: true scheduler: algorithm: default - retryBackToSourceLimit: 5 - retryLimit: 7 - retryInterval: 500ms + retryBackToSourceLimit: 7 + retryLimit: 10 + retryInterval: 800ms gc: hostGCInterval: 2m diff --git a/test/testdata/charts/config-v2.yaml b/test/testdata/charts/config-v2.yaml index ac7ed4d5c3c..5a58152b89e 100644 --- a/test/testdata/charts/config-v2.yaml +++ b/test/testdata/charts/config-v2.yaml @@ -66,9 +66,9 @@ scheduler: verbose: true scheduler: algorithm: default - retryBackToSourceLimit: 5 - retryLimit: 7 - retryInterval: 500ms + retryBackToSourceLimit: 7 + retryLimit: 10 + retryInterval: 800ms gc: hostGCInterval: 2m