Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for Setns (0.2 sec)

  1. cni/pkg/nodeagent/netns_linux.go

    // limitations under the License.
    
    package nodeagent
    
    import (
    	"fmt"
    	"runtime"
    	"sync"
    
    	netns "github.com/containernetworking/plugins/pkg/ns"
    	"golang.org/x/sys/unix"
    )
    
    type NetnsWrapper struct {
    	innerNetns netns.NetNS
    	inode      uint64
    }
    
    func (n *NetnsWrapper) Inode() uint64 {
    	return n.inode
    }
    
    func (n *NetnsWrapper) Close() error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jan 31 10:05:36 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. manifests/charts/ztunnel/templates/daemonset.yaml

                - ALL
                add: # See https://man7.org/linux/man-pages/man7/capabilities.7.html
                - NET_ADMIN # Required for TPROXY and setsockopt
                - SYS_ADMIN # Required for `setns` - doing things in other netns
                - NET_RAW # Required for RAW/PACKET sockets, TPROXY
              readOnlyRootFilesystem: true
              runAsGroup: 1337
              runAsNonRoot: false
              runAsUser: 0
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 11 01:33:52 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s

    	MOVD $·Sethostname(SB), R8
    	MOVD R8, ret+0(FP)
    	RET
    
    // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    
    TEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8
    	MOVD $·Setns(SB), R8
    	MOVD R8, ret+0(FP)
    	RET
    
    // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    
    TEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8
    	MOVD $·Symlinkat(SB), R8
    	MOVD R8, ret+0(FP)
    	RET
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/netns.go

    import "io"
    
    type NetnsFd interface {
    	Fd() uintptr
    }
    
    type Netns interface {
    	NetnsFd
    	Inode() uint64
    }
    type NetnsCloser interface {
    	io.Closer
    	Netns
    }
    
    type NetnsWithFd struct {
    	netns io.Closer
    	fd    uintptr
    	inode uint64
    }
    
    func (n *NetnsWithFd) Close() error {
    	if n.netns == nil {
    		return nil
    	}
    
    	ret := n.netns.Close()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. cni/pkg/repair/netns.go

    	for _, p := range procs {
    		match := false
    		ns := getPidNamespace(p.PID)
    
    		err := netns.WithNetNSPath(ns, func(_ netns.NetNS) error {
    			var err error
    			match, err = checkInterfacesForMatchingAddr(parsedPodAddr)
    			return err
    		})
    		if err != nil {
    			log.Warnf("failed to check proc %d netns interfaces: %v", p.PID, err)
    			continue
    		}
    
    		if !match {
    			// Not the network we want, skip
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 04:07:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. cni/pkg/plugin/sidecar_iptables_linux.go

    	cfg.DualStack = rdrct.dualStack
    	if err := cfg.FillConfigFromEnvironment(); err != nil {
    		return err
    	}
    
    	netNs, err := getNs(netns)
    	if err != nil {
    		err = fmt.Errorf("failed to open netns %q: %s", netns, err)
    		return err
    	}
    	defer netNs.Close()
    
    	return netNs.Do(func(_ ns.NetNS) error {
    		log.Infof("============= Start iptables configuration for %v =============", podName)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 17:36:41 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. cni/pkg/plugin/plugin_dryrun_test.go

    	path string
    }
    
    func (ns *mockNetNs) Do(toRun func(ns.NetNS) error) error {
    	return toRun(ns)
    }
    
    func (*mockNetNs) Set() error {
    	return nil
    }
    
    func (ns *mockNetNs) Path() string {
    	return ns.path
    }
    
    func (*mockNetNs) Fd() uintptr {
    	return 0
    }
    
    func (*mockNetNs) Close() error {
    	return nil
    }
    
    type netNsFunc func(nspath string) (ns.NetNS, error)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 10 00:31:55 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/pod_cache.go

    	if existing := p.currentPodCache[uid]; existing.Netns != nil {
    		if existing.Netns.Inode() == workload.Netns.Inode() {
    			workload.Netns.Close()
    			// Replace the workload, but keep the old Netns
    			p.currentPodCache[uid] = WorkloadInfo{
    				Workload: workload.Workload,
    				Netns:    existing.Netns,
    			}
    			// already in cache
    			return existing.Netns
    		}
    		log.Debug("netns inode mismatch, using the new one")
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 17:18:11 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/cni-watcher_test.go

    	valid := CNIPluginAddEvent{
    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    		PodNamespace: "funkyns",
    	}
    
    	payload, _ := json.Marshal(valid)
    
    	addEvent, err := processAddEvent(payload)
    
    	assert.NoError(t, err)
    	assert.Equal(t, valid, addEvent)
    }
    
    func TestProcessAddEventBadPayload(t *testing.T) {
    	valid := CNIPluginAddEvent{
    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 21:31:35 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/pod_cache_test.go

    	nspath1 := "/path/to/netns/1"
    	nspath2 := "/path/to/netns/2"
    
    	netns1, err := p.UpsertPodCache(pod, nspath1)
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	netns2, err := p.UpsertPodCache(pod, nspath2)
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	if !reflect.DeepEqual(netns1, netns2) {
    		t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, netns2)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top