Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for removeContainers (0.27 sec)

  1. cmd/kubeadm/app/cmd/phases/reset/cleanupnode.go

    		}
    	}
    
    	return nil
    }
    
    func removeContainers(criSocketPath string) error {
    	containerRuntime := utilruntime.NewContainerRuntime(criSocketPath)
    	if err := containerRuntime.Connect(); err != nil {
    		return err
    	}
    	containers, err := containerRuntime.ListKubeContainers()
    	if err != nil {
    		return err
    	}
    	return containerRuntime.RemoveContainers(containers)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/runtime/runtime.go

    	}
    
    	pods := []string{}
    	for _, sandbox := range sandboxes {
    		pods = append(pods, sandbox.GetId())
    	}
    	return pods, nil
    }
    
    // RemoveContainers removes running k8s pods
    func (runtime *CRIRuntime) RemoveContainers(containers []string) error {
    	errs := []error{}
    	for _, container := range containers {
    		var lastErr error
    		for i := 0; i < constants.RemoveContainerRetry; i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/runtime/runtime_test.go

    			containerRuntime := NewContainerRuntime("")
    			mock := &fakeImpl{}
    			if tc.prepare != nil {
    				tc.prepare(mock)
    			}
    			containerRuntime.SetImpl(mock)
    
    			err := containerRuntime.RemoveContainers(tc.containers)
    
    			assert.Equal(t, tc.shouldError, err != nil)
    		})
    	}
    }
    
    func TestPullImage(t *testing.T) {
    	for _, tc := range []struct {
    		name        string
    		prepare     func(*fakeImpl)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. subprojects/core/src/integTest/groovy/org/gradle/api/FinalizerTaskIntegrationTest.groovy

                    finalizedBy 'dockerStop' // dependsOn removeContainer
                }
    
                task dockerUp(type: BreakingTask) {
                    dependsOn 'createContainer'
                }
    
                task dockerStop(type: BreakingTask) {
                    dependsOn 'removeContainer'
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 13:27:33 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/cpumanager/policy_static_test.go

    				testCase.description, testCase.expCSetAfterAlloc, st.defaultCPUSet)
    		}
    
    		// remove
    		policy.RemoveContainer(st, string(pod.UID), testCase.containerName)
    
    		if !reflect.DeepEqual(st.defaultCPUSet, testCase.expCSetAfterRemove) {
    			t.Errorf("StaticPolicy RemoveContainer() error (%v). expected default cpuset %v but got %v",
    				testCase.description, testCase.expCSetAfterRemove, st.defaultCPUSet)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  6. pkg/kubelet/kuberuntime/kuberuntime_container.go

    			}
    			// prune all other init containers that match this container name
    			klog.V(4).InfoS("Removing init container", "containerName", status.Name, "containerID", status.ID.ID, "count", count)
    			if err := m.removeContainer(ctx, status.ID.ID); err != nil {
    				utilruntime.HandleError(fmt.Errorf("failed to remove pod init container %q: %v; Skipping pod %q", status.Name, err, format.Pod(pod)))
    				continue
    			}
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  7. pkg/kubelet/kuberuntime/kuberuntime_container_test.go

    	expectedContainerLogSymlink := legacyLogSymlink(containerID, "foo", "bar", "new")
    
    	fakeOS.Create(expectedContainerLogPath)
    	fakeOS.Create(expectedContainerLogPathRotated)
    
    	err = m.removeContainer(ctx, containerID)
    	assert.NoError(t, err)
    
    	// Verify container log is removed.
    	// We could not predict the order of `fakeOS.Removes`, so we use `assert.ElementsMatch` here.
    	assert.ElementsMatch(t,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 28K bytes
    - Viewed (0)
  8. pkg/kubelet/kuberuntime/kuberuntime_gc.go

    				klog.ErrorS(err, "Failed to stop container", "containerID", containers[i].id)
    				continue
    			}
    		}
    		if err := cgc.manager.removeContainer(ctx, containers[i].id); err != nil {
    			klog.ErrorS(err, "Failed to remove container", "containerID", containers[i].id)
    		}
    	}
    
    	// Assume we removed the containers so that we're not too aggressive.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 15.3K bytes
    - Viewed (0)
Back to top