Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for UID (0.14 sec)

  1. cni/pkg/nodeagent/ztunnelserver_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name: fmt.Sprintf("name-%d", id),
    			UID:  types.UID(fmt.Sprintf("uid-%d", id)),
    		},
    		Spec:   v1.PodSpec{},
    		Status: v1.PodStatus{},
    	}
    	return pod, newFakeNs(devNull.Fd())
    }
    
    func connect(ctx context.Context) struct {
    	ztunClient *net.UnixConn
    	ztunServer *ztunnelServer
    	uid        string
    } {
    	pods := &fakePodCache{}
    
    	pod, ns := podAndNetns()
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. cmd/local-locker_test.go

    		uid := mustGetUUID()
    		arg := dsync.LockArgs{
    			UID:       uid,
    			Resources: []string{name},
    			Source:    t.Name(),
    			Owner:     "owner",
    			Quorum:    0,
    		}
    		ok, err := l.RLock(ctx, arg)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if !ok {
    			t.Fatal("did not get write lock")
    		}
    		rUIDs = append(rUIDs, uid)
    
    		// RLock twice, different uid
    		uid = mustGetUUID()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  3. cmd/local-locker.go

    			if !ok {
    				// Inconsistent. Delete UID.
    				delete(l.lockUID, formatUUID(args.UID, idx))
    				return idx > 0, nil
    			}
    			for i := range lris {
    				if lris[i].UID == args.UID {
    					lris[i].TimeLastRefresh = UTCNow()
    				}
    			}
    			idx++
    			resource, ok = l.lockUID[formatUUID(args.UID, idx)]
    			if !ok {
    				// No more resources for UID, but we did update at least one.
    				return true, nil
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/pod_cache_test.go

    	pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{UID: "testUID"}}
    	ns := newFakeNs(inc())
    	wl := WorkloadInfo{
    		Workload: podToWorkload(pod),
    		Netns:    ns,
    	}
    	netns1 := p.UpsertPodCacheWithNetns(string(pod.UID), wl)
    	netnsTaken := p.Take(string(pod.UID))
    	if netns1 != netnsTaken {
    		t.Fatalf("Expected the original Netns for the same uid, got %p and %p", netns1, ns)
    	}
    	if nil != p.Take(string(pod.UID)) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. internal/dsync/drwmutex.go

    func sendRelease(ctx context.Context, ds *Dsync, c NetLocker, owner string, uid string, isReadLock bool, names ...string) bool {
    	if c == nil {
    		log("Unable to call RUnlock failed with %s\n", errors.New("netLocker is offline"))
    		return false
    	}
    
    	if len(uid) == 0 {
    		return false
    	}
    
    	args := LockArgs{
    		Owner:     owner,
    		UID:       uid,
    		Resources: names,
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  6. cmd/lock-rest-server-common_test.go

    		Writer:          true,
    		UID:             "89ab-cdef",
    		Timestamp:       UTCNow(),
    		TimeLastRefresh: UTCNow(),
    	}
    
    	locker.ll.lockMap["name"] = []lockRequesterInfo{
    		lockRequesterInfo1,
    		lockRequesterInfo2,
    	}
    
    	lri := locker.ll.lockMap["name"]
    
    	// test unknown uid
    	if locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "unknown-uid",
    	}, &lri) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 23 17:26:21 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  7. cni/pkg/repair/repaircontroller.go

    	if uid, f := c.repairedPods[key]; f {
    		if uid == pod.UID {
    			log.Debugf("Skipping pod, already repaired")
    		} else {
    			// This is unexpected, bubble up to an error. Might be missing event, or invalid assumption in our code.
    			// Either way, we will skip.
    			log.Errorf("Skipping pod, already repaired with an unexpected UID %v vs %v", uid, pod.UID)
    		}
    		return nil
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/pod_cache.go

    	}
    	return p.UpsertPodCacheWithNetns(string(pod.UID), wl), nil
    }
    
    // Update the cache with the given Netns. If there is already a Netns for the given uid, we return it, and close the one provided.
    func (p *podNetnsCache) UpsertPodCacheWithNetns(uid string, workload WorkloadInfo) Netns {
    	// lock current snapshot pod map
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	if existing := p.currentPodCache[uid]; existing.Netns != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  9. internal/dsync/lock-args_gen.go

    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		switch msgp.UnsafeString(field) {
    		case "UID":
    			z.UID, err = dc.ReadString()
    			if err != nil {
    				err = msgp.WrapError(err, "UID")
    				return
    			}
    		case "Resources":
    			var zb0002 uint32
    			zb0002, err = dc.ReadArrayHeader()
    			if err != nil {
    				err = msgp.WrapError(err, "Resources")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/net.go

    func (s *NetServer) buildZtunnelSnapshot(ambientPodUIDs map[types.UID]*corev1.Pod) error {
    	// first add all the pods as empty:
    	for uid := range ambientPodUIDs {
    		s.currentPodSnapshot.Ensure(string(uid))
    	}
    
    	// populate full pod snapshot from cgroups
    	return s.scanProcForPodsAndCache(ambientPodUIDs)
    }
    
    func (s *NetServer) scanProcForPodsAndCache(pods map[types.UID]*corev1.Pod) error {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.1K bytes
    - Viewed (1)
Back to top