From 834562dc4d116fe0d12ae220657bd91a1bd284b1 Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Wed, 11 Dec 2024 11:34:17 +0800 Subject: [PATCH 01/19] Fix: Resolved an issue where one NIC's IP pool shortage depleted IPs of other NICs in a multi-NIC setup. Signed-off-by: tao.yang --- pkg/ippoolmanager/ippool_manager.go | 10 +- test/doc/annotation.md | 1 + test/e2e/annotation/annotation_test.go | 170 +++++++++++++++++++++---- 3 files changed, 155 insertions(+), 26 deletions(-) diff --git a/pkg/ippoolmanager/ippool_manager.go b/pkg/ippoolmanager/ippool_manager.go index febbf9e1a6..c6bfc9dfae 100644 --- a/pkg/ippoolmanager/ippool_manager.go +++ b/pkg/ippoolmanager/ippool_manager.go @@ -167,7 +167,15 @@ func (im *ipPoolManager) genRandomIP(ctx context.Context, ipPool *spiderpoolv2be } var used []string - for ip := range allocatedRecords { + for ip, record := range allocatedRecords { + // In a multi-NIC scenario, if one of the NIC pools does not have enough IPs, an allocation failure message will be displayed. + // However, other IP pools still have IPs, which will cause IPs in other pools to be exhausted. + // Check if there is a duplicate Pod UID in IPPool.allocatedRecords. + // If so, we skip this allocation and assume that this Pod has already obtained an IP address in the pool. + if record.PodUID == string(pod.UID) { + logger.Sugar().Warnf("The Pod %s/%s UID %s already exists in the assigned IP %s", pod.Namespace, pod.Name, ip, string(pod.UID)) + return net.ParseIP(ip), nil + } used = append(used, ip) } usedIPs, err := spiderpoolip.ParseIPRanges(*ipPool.Spec.IPVersion, used) diff --git a/test/doc/annotation.md b/test/doc/annotation.md index 184411e526..43a95e3eb6 100644 --- a/test/doc/annotation.md +++ b/test/doc/annotation.md @@ -17,3 +17,4 @@ | A00013 | It's invalid to specify one NIC corresponding IPPool in IPPools annotation with multiple NICs | p2 | | done | | | A00014 | It's invalid to specify same NIC name for IPPools annotation with multiple NICs | p2 | | done | | | A00015 | Use wildcard for 'ipam.spidernet.io/ippools' annotation to specify IPPools | p2 | | done | | +| A00016 | In the annotation ipam.spidernet.io/ippools for multi-NICs, when the IP pool for one NIC runs out of IPs, it should not exhaust IPs from other pools. | p2 | | done | | diff --git a/test/e2e/annotation/annotation_test.go b/test/e2e/annotation/annotation_test.go index f36531701c..ee0ced3f0b 100644 --- a/test/e2e/annotation/annotation_test.go +++ b/test/e2e/annotation/annotation_test.go @@ -15,6 +15,7 @@ import ( "github.com/spidernet-io/e2eframework/tools" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/kubectl/pkg/util/podutils" "k8s.io/utils/ptr" pkgconstant "github.com/spidernet-io/spiderpool/pkg/constant" @@ -623,18 +624,20 @@ var _ = Describe("test annotation", Label("annotation"), func() { }) Context("run pods with multi-NIC ippools annotations successfully", Label("A00010"), func() { - var v4PoolName, v6PoolName, newv4SubnetName, newv6SubnetName string - var v4Pool, v6Pool *spiderpool.SpiderIPPool + var v4PoolName, v6PoolName, v4PoolName1, v6PoolName1, newv4SubnetName, newv6SubnetName string + var v4Pool, v6Pool, v4Pool1, v6Pool1 *spiderpool.SpiderIPPool var newv4SubnetObject, newv6SubnetObject *spiderpool.SpiderSubnet - var err error - + var err, err1 error BeforeEach(func() { Eventually(func() error { ctx, cancel := context.WithTimeout(context.Background(), common.PodStartTimeout) defer cancel() if frame.Info.IpV4Enabled { + v4PoolNum := 1 + v4PoolNum1 := 3 GinkgoWriter.Println("create v4 ippool") - v4PoolName, v4Pool = common.GenerateExampleIpv4poolObject(1) + v4PoolName, v4Pool = common.GenerateExampleIpv4poolObject(v4PoolNum) + v4PoolName1, v4Pool1 = common.GenerateExampleIpv4poolObject(v4PoolNum1) if frame.Info.SpiderSubnetEnabled { newv4SubnetName, newv4SubnetObject = common.GenerateExampleV4SubnetObject(frame, 100) err = common.CreateSubnet(frame, newv4SubnetObject) @@ -642,18 +645,27 @@ var _ = Describe("test annotation", Label("annotation"), func() { GinkgoWriter.Printf("Failed to create v4 Subnet %v: %v \n", newv4SubnetName, err) return err } - err = common.CreateIppoolInSpiderSubnet(ctx, frame, newv4SubnetName, v4Pool, 1) + err = common.CreateIppoolInSpiderSubnet(ctx, frame, newv4SubnetName, v4Pool, v4PoolNum) + err1 = common.CreateIppoolInSpiderSubnet(ctx, frame, newv4SubnetName, v4Pool1, v4PoolNum1) } else { err = common.CreateIppool(frame, v4Pool) + err1 = common.CreateIppool(frame, v4Pool1) } if err != nil { GinkgoWriter.Printf("Failed to create v4 IPPool %v: %v \n", v4PoolName, err) return err } + if err1 != nil { + GinkgoWriter.Printf("Failed to create v4 IPPool %v: %v \n", v4PoolName1, err1) + return err1 + } } if frame.Info.IpV6Enabled { + v6PoolNum := 1 + v6PoolNum1 := 3 GinkgoWriter.Println("create v6 ippool") - v6PoolName, v6Pool = common.GenerateExampleIpv6poolObject(1) + v6PoolName, v6Pool = common.GenerateExampleIpv6poolObject(v6PoolNum) + v6PoolName1, v6Pool1 = common.GenerateExampleIpv6poolObject(v6PoolNum1) if frame.Info.SpiderSubnetEnabled { newv6SubnetName, newv6SubnetObject = common.GenerateExampleV6SubnetObject(frame, 100) err = common.CreateSubnet(frame, newv6SubnetObject) @@ -661,33 +673,42 @@ var _ = Describe("test annotation", Label("annotation"), func() { GinkgoWriter.Printf("Failed to create v6 Subnet %v: %v \n", newv6SubnetName, err) return err } - err = common.CreateIppoolInSpiderSubnet(ctx, frame, newv6SubnetName, v6Pool, 1) + err = common.CreateIppoolInSpiderSubnet(ctx, frame, newv6SubnetName, v6Pool, v6PoolNum) + err1 = common.CreateIppoolInSpiderSubnet(ctx, frame, newv6SubnetName, v6Pool1, v6PoolNum1) } else { err = common.CreateIppool(frame, v6Pool) + err1 = common.CreateIppool(frame, v6Pool1) } if err != nil { GinkgoWriter.Printf("Failed to create v6 IPPool %v: %v \n", v6PoolName, err) return err } + if err1 != nil { + GinkgoWriter.Printf("Failed to create v6 IPPool %v: %v \n", v6PoolName1, err1) + return err1 + } + } return nil }).WithTimeout(time.Minute).WithPolling(time.Second * 3).Should(BeNil()) DeferCleanup(func() { + if CurrentSpecReport().Failed() { + GinkgoWriter.Println("If the use case fails, the cleanup step will be skipped") + return + } // Delete IPV4Pool and IPV6Pool if frame.Info.IpV4Enabled { GinkgoWriter.Printf("delete v4 ippool %v. \n", v4PoolName) Expect(common.DeleteIPPoolByName(frame, v4PoolName)).To(Succeed()) - if frame.Info.SpiderSubnetEnabled { - Expect(common.DeleteSubnetByName(frame, v4SubnetName)).NotTo(HaveOccurred()) - } + GinkgoWriter.Printf("delete v4 ippool1 %v. \n", v4PoolName1) + Expect(common.DeleteIPPoolByName(frame, v4PoolName1)).To(Succeed()) } if frame.Info.IpV6Enabled { GinkgoWriter.Printf("delete v6 ippool %v. \n", v6PoolName) Expect(common.DeleteIPPoolByName(frame, v6PoolName)).To(Succeed()) - if frame.Info.SpiderSubnetEnabled { - Expect(common.DeleteSubnetByName(frame, v6SubnetName)).NotTo(HaveOccurred()) - } + GinkgoWriter.Printf("delete v6 ippool %v. \n", v6PoolName1) + Expect(common.DeleteIPPoolByName(frame, v6PoolName1)).To(Succeed()) } }) }) @@ -815,16 +836,15 @@ var _ = Describe("test annotation", Label("annotation"), func() { GinkgoWriter.Printf("delete pod %v/%v. \n", nsName, podName) Expect(frame.DeletePod(podName, nsName)).To(Succeed()) }) - - }) - - Context("wrong IPPools annotation usage", func() { - It("It's invalid to specify one NIC corresponding IPPool in IPPools annotation with multiple NICs", Label("A00013"), func() { + It("It's invalid to specify same NIC name for IPPools annotation with multiple NICs", Label("A00014"), func() { // set pod annotation for nics podIppoolsAnno := types.AnnoPodIPPoolsValue{ { NIC: common.NIC2, }, + { + NIC: common.NIC2, + }, } if frame.Info.IpV4Enabled { podIppoolsAnno[0].IPv4Pools = []string{common.SpiderPoolIPv4SubnetVlan100} @@ -839,7 +859,7 @@ var _ = Describe("test annotation", Label("annotation"), func() { pkgconstant.AnnoPodIPPools: string(podIppoolsAnnoMarshal), common.MultusNetworks: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan100), } - GinkgoWriter.Printf("succeeded to generate pod yaml with IPPools annotation: %+v. \n", podYaml) + GinkgoWriter.Printf("succeeded to generate pod yaml with same NIC name annotation: %+v. \n", podYaml) Expect(frame.CreatePod(podYaml)).To(Succeed()) ctx, cancel := context.WithTimeout(context.Background(), time.Minute*1) @@ -849,15 +869,115 @@ var _ = Describe("test annotation", Label("annotation"), func() { Expect(err).To(HaveOccurred()) }) - It("It's invalid to specify same NIC name for IPPools annotation with multiple NICs", Label("A00014"), func() { + It("In the annotation ipam.spidernet.io/ippools for multi-NICs, when the IP pool for one NIC runs out of IPs, it should not exhaust IPs from other pools.", Label("A00016"), func() { + // 1. Set up multiple NICs for Pods using the annotation ipam.spidernet.io/ippools. + podIppoolsAnno := types.AnnoPodIPPoolsValue{{NIC: common.NIC1}, {NIC: common.NIC2}} + if frame.Info.IpV4Enabled { + podIppoolsAnno[0].IPv4Pools = []string{v4PoolName} + podIppoolsAnno[1].IPv4Pools = []string{v4PoolName1} + } + if frame.Info.IpV6Enabled { + podIppoolsAnno[0].IPv6Pools = []string{v6PoolName} + podIppoolsAnno[1].IPv6Pools = []string{v6PoolName1} + } + podIppoolsAnnoMarshal, err := json.Marshal(podIppoolsAnno) + Expect(err).NotTo(HaveOccurred()) + + // 2. Set the number of Deploy replicas to be greater than the number of IPs in one of the pools, so that the IPs in one of the pools are exhausted. + depYaml := common.GenerateExampleDeploymentYaml(podName, nsName, 2) + depYaml.Spec.Template.Annotations = map[string]string{ + pkgconstant.AnnoPodIPPools: string(podIppoolsAnnoMarshal), + common.MultusDefaultNetwork: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan100), + common.MultusNetworks: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan200), + } + Expect(frame.CreateDeployment(depYaml)).To(Succeed()) + + // 3. Check if the pod IP is allocated normally. + Eventually(func() bool { + podList, err := frame.GetPodListByLabel(depYaml.Spec.Template.Labels) + if err != nil { + GinkgoWriter.Printf("failed to get podlist %v/%v = %v\n", depYaml.Namespace, depYaml.Name, err) + return false + } + if len(podList.Items) != 2 { + GinkgoWriter.Printf("podList.Items: %v, expected 2, got %v \n", podList.Items, len(podList.Items)) + return false + } + + runningPod := 0 + failedPods := 0 + for _, pod := range podList.Items { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + if err := frame.WaitExceptEventOccurred(ctx, common.OwnerPod, pod.Name, nsName, "all IP addresses used out"); err != nil { + GinkgoWriter.Printf("failed to wait except event occurred: %v \n", err) + if podutils.IsPodReady(&pod) { + runningPod++ + } + } else { + failedPods++ + GinkgoWriter.Printf("pod %s/%s is not ready, but event occurred \n", pod.Namespace, pod.Name) + } + } + + // There should be one Pod in the running state and one Pod in the containerCreating state. + if failedPods != 1 || runningPod != 1 { + GinkgoWriter.Printf("failedPods: %v, runningPod: %v\n", failedPods, runningPod) + return false + } + + // 4. Check whether the IP allocation fails and whether a circular allocation of IP addresses occurs, + // causing the pool IP to be exhausted. + // It takes time to allocate an IP address. We try to wait for 1 minute. + // Check whether allocatedIPCount is abnormal and check the robustness of the IP pool. + if frame.Info.IpV4Enabled { + v4Pool1, err := common.GetIppoolByName(frame, v4PoolName) + if err != nil { + GinkgoWriter.Printf("failed to get v4Pool %v, error is %v \n", v4PoolName, err) + return false + } + + v4pool2, err := common.GetIppoolByName(frame, v4PoolName1) + if err != nil { + GinkgoWriter.Printf("failed to get v4Pool %v, error is %v \n", v4PoolName1, err) + return false + } + if *v4Pool1.Status.AllocatedIPCount != int64(1) || *v4pool2.Status.AllocatedIPCount != int64(2) { + GinkgoWriter.Printf("v4Pool1.Status.AllocatedIPCount: %v, v4pool2.Status.AllocatedIPCount: %v\n", *v4Pool1.Status.AllocatedIPCount, *v4pool2.Status.AllocatedIPCount) + return false + } + } + + if frame.Info.IpV6Enabled { + v6Pool1, err := common.GetIppoolByName(frame, v6PoolName) + if err != nil { + GinkgoWriter.Printf("failed to get v6Pool %v, error is %v \n", v6PoolName, err) + return false + } + + v6Pool2, err := common.GetIppoolByName(frame, v6PoolName1) + if err != nil { + GinkgoWriter.Printf("failed to get v6Pool %v, error is %v \n", v6PoolName1, err) + return false + } + if *v6Pool1.Status.AllocatedIPCount != int64(1) || *v6Pool2.Status.AllocatedIPCount != int64(2) { + GinkgoWriter.Printf("v6Pool1.Status.AllocatedIPCount: %v, v6Pool2.Status.AllocatedIPCount: %v\n", *v6Pool1.Status.AllocatedIPCount, *v6Pool2.Status.AllocatedIPCount) + return false + } + } + return true + }, common.PodStartTimeout, common.ForcedWaitingTime).Should(BeTrue()) + }) + }) + + Context("wrong IPPools annotation usage", func() { + It("It's invalid to specify one NIC corresponding IPPool in IPPools annotation with multiple NICs", Label("A00013"), func() { // set pod annotation for nics podIppoolsAnno := types.AnnoPodIPPoolsValue{ { NIC: common.NIC2, }, - { - NIC: common.NIC2, - }, } if frame.Info.IpV4Enabled { podIppoolsAnno[0].IPv4Pools = []string{common.SpiderPoolIPv4SubnetVlan100} @@ -872,7 +992,7 @@ var _ = Describe("test annotation", Label("annotation"), func() { pkgconstant.AnnoPodIPPools: string(podIppoolsAnnoMarshal), common.MultusNetworks: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan100), } - GinkgoWriter.Printf("succeeded to generate pod yaml with same NIC name annotation: %+v. \n", podYaml) + GinkgoWriter.Printf("succeeded to generate pod yaml with IPPools annotation: %+v. \n", podYaml) Expect(frame.CreatePod(podYaml)).To(Succeed()) ctx, cancel := context.WithTimeout(context.Background(), time.Minute*1) From 07e5b60f48be51173cb7ecc93bc4d521bccae632 Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Mon, 2 Dec 2024 16:43:14 +0800 Subject: [PATCH 02/19] Fixed the issue of IP resources being exhausted when using multiple NICs Signed-off-by: tao.yang --- pkg/ipam/allocate.go | 109 ++++++-- pkg/ipam/utils.go | 27 +- pkg/ippoolmanager/ippool_manager.go | 3 +- .../workloadendpoint_manager.go | 32 ++- .../workloadendpoint_manager_test.go | 47 ++++ test/doc/annotation.md | 4 +- test/doc/ippoolcr.md | 1 - ...imparameter.md => spiderclaimparameter.md} | 10 +- test/e2e/affinity/affinity_test.go | 6 +- test/e2e/annotation/annotation_test.go | 237 ++++++++++++++++++ 10 files changed, 418 insertions(+), 58 deletions(-) rename test/doc/{spidercclaimparameter.md => spiderclaimparameter.md} (80%) diff --git a/pkg/ipam/allocate.go b/pkg/ipam/allocate.go index 3750bfeb3c..b7314cf1dc 100644 --- a/pkg/ipam/allocate.go +++ b/pkg/ipam/allocate.go @@ -77,7 +77,7 @@ func (i *ipam) Allocate(ctx context.Context, addArgs *models.IpamAddArgs) (*mode releaseStsOutdatedIPFlag := false if i.config.EnableStatefulSet && podTopController.APIVersion == appsv1.SchemeGroupVersion.String() && podTopController.Kind == constant.KindStatefulSet { if endpoint != nil { - releaseStsOutdatedIPFlag, err = i.releaseStsOutdatedIPIfNeed(ctx, addArgs, pod, endpoint, podTopController) + releaseStsOutdatedIPFlag, err = i.releaseStsOutdatedIPIfNeed(ctx, addArgs, pod, endpoint, podTopController, IsMultipleNicWithNoName(pod.Annotations)) if err != nil { return nil, err } @@ -114,13 +114,15 @@ func (i *ipam) Allocate(ctx context.Context, addArgs *models.IpamAddArgs) (*mode } func (i *ipam) releaseStsOutdatedIPIfNeed(ctx context.Context, addArgs *models.IpamAddArgs, - pod *corev1.Pod, endpoint *spiderpoolv2beta1.SpiderEndpoint, podTopController types.PodTopController) (bool, error) { + pod *corev1.Pod, endpoint *spiderpoolv2beta1.SpiderEndpoint, podTopController types.PodTopController, isMultipleNicWithNoName bool) (bool, error) { logger := logutils.FromContext(ctx) preliminary, err := i.getPoolCandidates(ctx, addArgs, pod, podTopController) if err != nil { return false, err } + logger.Sugar().Infof("Preliminary IPPool candidates: %s", preliminary) + poolMap := make(map[string]map[string]struct{}) for _, candidates := range preliminary { if _, ok := poolMap[candidates.NIC]; !ok { @@ -131,38 +133,97 @@ func (i *ipam) releaseStsOutdatedIPIfNeed(ctx context.Context, addArgs *models.I poolMap[candidates.NIC][pool] = struct{}{} } } - endpointMap := make(map[string]map[string]struct{}) - for _, ip := range endpoint.Status.Current.IPs { - if _, ok := endpointMap[ip.NIC]; !ok { - endpointMap[ip.NIC] = make(map[string]struct{}) - } + logger.Sugar().Debugf("The current mapping between the Pod's IPPool candidates and NICs: %v", poolMap) + + // Spiderpool assigns IP addresses to NICs one by one. + // Some NICs may have their IP pools changed, while others may remain unchanged. + // Record these changes and differences to handle specific NICs accordingly. + releaseEndpointIPsFlag := false + needReleaseEndpointIPs := []spiderpoolv2beta1.IPAllocationDetail{} + noReleaseEndpointIPs := []spiderpoolv2beta1.IPAllocationDetail{} + for index, ip := range endpoint.Status.Current.IPs { if ip.IPv4Pool != nil && *ip.IPv4Pool != "" { - endpointMap[ip.NIC][*ip.IPv4Pool] = struct{}{} + if isMultipleNicWithNoName { + if _, ok := poolMap[strconv.Itoa(index)][*ip.IPv4Pool]; !ok { + // If using the multi-NIC feature through ipam.spidernet.io/ippools without specifying interface names, + // and if the IP pool of one NIC changes, only reclaiming the corresponding endpoint IP could cause the IPAM allocation method to lose allocation records. + // When the interface name is not specified, the allocated NIC name might be "", which cannot be handled properly. + // If isMultipleNicWithNoName is true, all NIC IP addresses will be reclaimed and reallocated. + logger.Sugar().Infof("StatefulSet Pod need to release IP, owned pool: %v, expected pools: %v", *ip.IPv4Pool, poolMap[strconv.Itoa(index)]) + releaseEndpointIPsFlag = true + break + } + } + // All other cases determine here whether an IP address needs to be reclaimed. + if _, ok := poolMap[ip.NIC][*ip.IPv4Pool]; !ok && ip.NIC == *addArgs.IfName { + // The multi-NIC feature can be used in the following two ways: + // 1. By specifying additional NICs through k8s.v1.cni.cncf.io/networks and configure the default pool. + // 2. By using ipam.spidernet.io/ippools (excluding cases where the interface name is empty). + // When a change is detected in the corresponding NIC's IP pool, + // the IP information for that NIC will be automatically reclaimed and reallocated. + logger.Sugar().Infof("StatefulSet Pod need to release IP, owned pool: %v, expected pools: %v", *ip.IPv4Pool, poolMap[ip.NIC]) + releaseEndpointIPsFlag = true + needReleaseEndpointIPs = append(needReleaseEndpointIPs, ip) + continue + } } if ip.IPv6Pool != nil && *ip.IPv6Pool != "" { - endpointMap[ip.NIC][*ip.IPv6Pool] = struct{}{} + if isMultipleNicWithNoName { + if _, ok := poolMap[strconv.Itoa(index)][*ip.IPv6Pool]; !ok { + logger.Sugar().Infof("StatefulSet Pod need to release IP, owned pool: %v, expected pools: %v", *ip.IPv6Pool, poolMap[strconv.Itoa(index)]) + releaseEndpointIPsFlag = true + break + } + } + if _, ok := poolMap[ip.NIC][*ip.IPv6Pool]; !ok && ip.NIC == *addArgs.IfName { + logger.Sugar().Infof("StatefulSet Pod need to release IP, owned pool: %v, expected pools: %v", *ip.IPv6Pool, poolMap[ip.NIC]) + releaseEndpointIPsFlag = true + needReleaseEndpointIPs = append(needReleaseEndpointIPs, ip) + continue + } } + + // According to the NIC allocation mechanism, we check whether the pool information for each NIC has changed. + // If there is no change, we do not need to reclaim the corresponding endpoint and IP for that NIC. + noReleaseEndpointIPs = append(noReleaseEndpointIPs, ip) } - if !checkNicPoolExistence(endpointMap, poolMap) { - logger.Sugar().Info("StatefulSet Pod need to release IP: owned pool %v, expected pools: %v", endpointMap, poolMap) - if endpoint.DeletionTimestamp == nil { - logger.Sugar().Infof("delete outdated endpoint of statefulset pod: %v/%v", endpoint.Namespace, endpoint.Name) - if err := i.endpointManager.DeleteEndpoint(ctx, endpoint); err != nil { + + if releaseEndpointIPsFlag { + if isMultipleNicWithNoName || len(needReleaseEndpointIPs) == len(endpoint.Status.Current.IPs) { + // The endpoint should be deleted in the following cases: + // 1. If the multi-NIC feature is used through ipam.spidernet.io/ippools without specifying the interface name, and the IPPool has changed. + // 2. In other multi-NIC or single-NIC scenarios, if the IPPool of all NICs has changed. + logger.Sugar().Infof("remove outdated of StatefulSet pod %s/%s: %v", endpoint.Namespace, endpoint.Name, endpoint.Status.Current.IPs) + if endpoint.DeletionTimestamp == nil { + logger.Sugar().Infof("delete outdated endpoint of statefulset pod: %v/%v", endpoint.Namespace, endpoint.Name) + if err := i.endpointManager.DeleteEndpoint(ctx, endpoint); err != nil { + return false, err + } + } + if err := i.endpointManager.RemoveFinalizer(ctx, endpoint); err != nil { + return false, fmt.Errorf("failed to clean statefulset pod's endpoint when expected ippool was changed: %v", err) + } + err := i.release(ctx, endpoint.Status.Current.UID, endpoint.Status.Current.IPs) + if err != nil { return false, err } + logger.Sugar().Infof("remove outdated of StatefulSet Pod IPs: %v in Pool", endpoint.Status.Current.IPs) + } else { + // Only update the endpoint and IP corresponding to the changed NIC. + logger.Sugar().Infof("try to update the endpoint IPs of the StatefulSet Pod. Old: %+v, New: %+v.", endpoint.Status.Current.IPs, noReleaseEndpointIPs) + if err := i.endpointManager.PatchEndpointAllocationIPs(ctx, endpoint, noReleaseEndpointIPs); err != nil { + return false, err + } + err := i.release(ctx, endpoint.Status.Current.UID, needReleaseEndpointIPs) + if err != nil { + return false, err + } + logger.Sugar().Infof("remove outdated of StatefulSet Pod IPs: %v in Pool", needReleaseEndpointIPs) } - err := i.release(ctx, endpoint.Status.Current.UID, endpoint.Status.Current.IPs) - if err != nil { - return false, err - } - logger.Sugar().Info("remove outdated of StatefulSet pod %s/%s: %v", endpoint.Namespace, endpoint.Name, endpoint.Status.Current.IPs) - if err := i.endpointManager.RemoveFinalizer(ctx, endpoint); err != nil { - return false, fmt.Errorf("failed to clean statefulset pod's Endpoint when expected ippool was changed: %v", err) - } - endpoint = nil + return true, nil } else { - logger.Sugar().Debugf("StatefulSet Pod does not need to release IP: owned pool %v, expected pools: %v", endpointMap, poolMap) + logger.Sugar().Debugf("StatefulSet Pod does not need to release IP: %v", endpoint.Status.Current.IPs) } return false, nil } diff --git a/pkg/ipam/utils.go b/pkg/ipam/utils.go index 433b513682..7c51f25407 100644 --- a/pkg/ipam/utils.go +++ b/pkg/ipam/utils.go @@ -7,12 +7,13 @@ import ( "context" "encoding/json" "fmt" + "net" + "strconv" + appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" "k8s.io/utils/strings/slices" - "net" - "strconv" "github.com/spidernet-io/spiderpool/api/v1/agent/models" subnetmanagercontrollers "github.com/spidernet-io/spiderpool/pkg/applicationcontroller/applicationinformers" @@ -177,10 +178,10 @@ func IsMultipleNicWithNoName(anno map[string]string) bool { return false } - result := true + result := false for _, v := range annoPodIPPools { - if v.NIC != "" { - result = false + if v.NIC == "" { + result = true } } @@ -224,19 +225,3 @@ func validateAndMutateMultipleNICAnnotations(annoIPPoolsValue types.AnnoPodIPPoo return nil } - -func checkNicPoolExistence(endpointMap, poolMap map[string]map[string]struct{}) bool { - for outerKey, innerMap := range endpointMap { - poolInnerMap, exists := poolMap[outerKey] - if !exists { - return false - } - - for innerKey := range innerMap { - if _, exists := poolInnerMap[innerKey]; !exists { - return false - } - } - } - return true -} diff --git a/pkg/ippoolmanager/ippool_manager.go b/pkg/ippoolmanager/ippool_manager.go index c6bfc9dfae..d63d9997ae 100644 --- a/pkg/ippoolmanager/ippool_manager.go +++ b/pkg/ippoolmanager/ippool_manager.go @@ -173,11 +173,12 @@ func (im *ipPoolManager) genRandomIP(ctx context.Context, ipPool *spiderpoolv2be // Check if there is a duplicate Pod UID in IPPool.allocatedRecords. // If so, we skip this allocation and assume that this Pod has already obtained an IP address in the pool. if record.PodUID == string(pod.UID) { - logger.Sugar().Warnf("The Pod %s/%s UID %s already exists in the assigned IP %s", pod.Namespace, pod.Name, ip, string(pod.UID)) + logger.Sugar().Infof("The Pod %s/%s UID %s already exists in the assigned IP %s", pod.Namespace, pod.Name, ip, string(pod.UID)) return net.ParseIP(ip), nil } used = append(used, ip) } + usedIPs, err := spiderpoolip.ParseIPRanges(*ipPool.Spec.IPVersion, used) if err != nil { return nil, err diff --git a/pkg/workloadendpointmanager/workloadendpoint_manager.go b/pkg/workloadendpointmanager/workloadendpoint_manager.go index ef68cc6aa9..22b952479f 100644 --- a/pkg/workloadendpointmanager/workloadendpoint_manager.go +++ b/pkg/workloadendpointmanager/workloadendpoint_manager.go @@ -34,6 +34,7 @@ type WorkloadEndpointManager interface { UpdateAllocationNICName(ctx context.Context, endpoint *spiderpoolv2beta1.SpiderEndpoint, nic string) (*spiderpoolv2beta1.PodIPAllocation, error) ReleaseEndpointIPs(ctx context.Context, endpoint *spiderpoolv2beta1.SpiderEndpoint, uid string) ([]spiderpoolv2beta1.IPAllocationDetail, error) ReleaseEndpointAndFinalizer(ctx context.Context, namespace, podName string, cached bool) error + PatchEndpointAllocationIPs(ctx context.Context, endpoint *spiderpoolv2beta1.SpiderEndpoint, endpointIPs []spiderpoolv2beta1.IPAllocationDetail) error } type workloadEndpointManager struct { @@ -164,7 +165,21 @@ func (em *workloadEndpointManager) PatchIPAllocationResults(ctx context.Context, return nil } - endpoint.Status.Current.IPs = append(endpoint.Status.Current.IPs, convert.ConvertResultsToIPDetails(results, isMultipleNicWithNoName)...) + // Using ipam.spidernet.io/ippools to specify multiple NICs, + // if only one NIC's IP pool changes, only the changed NIC needs to have its IP address reassigned, while the other NICs remain unaffected. + convertResults := convert.ConvertResultsToIPDetails(results, isMultipleNicWithNoName) + for _, result := range convertResults { + exists := false + for _, existingIP := range endpoint.Status.Current.IPs { + if existingIP.NIC == result.NIC { + exists = true + break + } + } + if !exists { + endpoint.Status.Current.IPs = append(endpoint.Status.Current.IPs, result) + } + } logger.Sugar().Infof("try to update SpiderEndpoint %s", endpoint) return em.client.Update(ctx, endpoint) } @@ -218,7 +233,6 @@ func (em *workloadEndpointManager) UpdateAllocationNICName(ctx context.Context, break } } - err := em.client.Update(ctx, endpoint) if nil != err { return nil, err @@ -227,6 +241,20 @@ func (em *workloadEndpointManager) UpdateAllocationNICName(ctx context.Context, return &endpoint.Status.Current, nil } +// PatchEndpointAllocationIPs will patch the SpiderEndpoint status recorded IPs. +func (em *workloadEndpointManager) PatchEndpointAllocationIPs(ctx context.Context, endpoint *spiderpoolv2beta1.SpiderEndpoint, newEndpointIPs []spiderpoolv2beta1.IPAllocationDetail) error { + log := logutils.FromContext(ctx) + + endpoint.Status.Current.IPs = newEndpointIPs + log.Sugar().Debugf("try to update SpiderEndpoint recorded IPs: %s", endpoint) + err := em.client.Update(ctx, endpoint) + if nil != err { + return err + } + + return nil +} + // ReleaseEndpointIPs will release the SpiderEndpoint status recorded IPs. func (em *workloadEndpointManager) ReleaseEndpointIPs(ctx context.Context, endpoint *spiderpoolv2beta1.SpiderEndpoint, podUID string) ([]spiderpoolv2beta1.IPAllocationDetail, error) { log := logutils.FromContext(ctx) diff --git a/pkg/workloadendpointmanager/workloadendpoint_manager_test.go b/pkg/workloadendpointmanager/workloadendpoint_manager_test.go index 13d892026c..e396f181cd 100644 --- a/pkg/workloadendpointmanager/workloadendpoint_manager_test.go +++ b/pkg/workloadendpointmanager/workloadendpoint_manager_test.go @@ -718,5 +718,52 @@ var _ = Describe("WorkloadEndpointManager", Label("workloadendpoint_manager_test Expect(err).To(MatchError(constant.ErrUnknown)) }) }) + + Describe("PatchEndpointAllocationIPs", func() { + var endpointT *spiderpoolv2beta1.SpiderEndpoint + var newEndpointIPs []spiderpoolv2beta1.IPAllocationDetail + + BeforeEach(func() { + endpointT = &spiderpoolv2beta1.SpiderEndpoint{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-endpoint", + Namespace: "default", + }, + Status: spiderpoolv2beta1.WorkloadEndpointStatus{ + Current: spiderpoolv2beta1.PodIPAllocation{ + IPs: []spiderpoolv2beta1.IPAllocationDetail{ + {NIC: "eth0", IPv4: ptr.To("192.168.1.1/24")}, + }, + }, + }, + } + + newEndpointIPs = []spiderpoolv2beta1.IPAllocationDetail{ + {NIC: "eth0", IPv4: ptr.To("192.168.1.2/24")}, + {NIC: "eth1", IPv4: ptr.To("192.168.1.3/24")}, + } + }) + + It("successfully patches the SpiderEndpoint with new IPs", func() { + err := fakeClient.Create(ctx, endpointT) + Expect(err).NotTo(HaveOccurred()) + + err = endpointManager.PatchEndpointAllocationIPs(ctx, endpointT, newEndpointIPs) + Expect(err).NotTo(HaveOccurred()) + + var updatedEndpoint spiderpoolv2beta1.SpiderEndpoint + err = fakeClient.Get(ctx, types.NamespacedName{Namespace: endpointT.Namespace, Name: endpointT.Name}, &updatedEndpoint) + Expect(err).NotTo(HaveOccurred()) + Expect(updatedEndpoint.Status.Current.IPs).To(Equal(newEndpointIPs)) + }) + + It("fails to patch the SpiderEndpoint due to update error", func() { + patches := gomonkey.ApplyMethodReturn(fakeClient, "Update", constant.ErrUnknown) + defer patches.Reset() + + err := endpointManager.PatchEndpointAllocationIPs(ctx, endpointT, newEndpointIPs) + Expect(err).To(MatchError(constant.ErrUnknown)) + }) + }) }) }) diff --git a/test/doc/annotation.md b/test/doc/annotation.md index 43a95e3eb6..c91932ae1e 100644 --- a/test/doc/annotation.md +++ b/test/doc/annotation.md @@ -17,4 +17,6 @@ | A00013 | It's invalid to specify one NIC corresponding IPPool in IPPools annotation with multiple NICs | p2 | | done | | | A00014 | It's invalid to specify same NIC name for IPPools annotation with multiple NICs | p2 | | done | | | A00015 | Use wildcard for 'ipam.spidernet.io/ippools' annotation to specify IPPools | p2 | | done | | -| A00016 | In the annotation ipam.spidernet.io/ippools for multi-NICs, when the IP pool for one NIC runs out of IPs, it should not exhaust IPs from other pools. | p2 | | done | | +| A00016 | In the annotation ipam.spidernet.io/ippools for multi-NICs, when the IP pool for one NIC runs out of IPs, it should not exhaust IPs from other pools. | p2 | | done | | +| A00017 | Stateful applications can use multiple NICs via k8s.v1.cni.cncf.io/networks, enabling creation, restart, and IP address changes. | p3 | | done | | +| A00018 | Stateful applications using the annotation ipam.spidernet.io/ippools without specifying a NIC name can still create Pods, restart them, and update their IP addresses. | p3 | | done | | diff --git a/test/doc/ippoolcr.md b/test/doc/ippoolcr.md index 16185b25f1..02706524aa 100644 --- a/test/doc/ippoolcr.md +++ b/test/doc/ippoolcr.md @@ -19,4 +19,3 @@ | D00015 | The namespace where the pod resides does not match the namespaceName, and the IP cannot be assigned | p2 | | done | | | D00016 | namespaceName has higher priority than namespaceAffinity | p3 | | done | | | D00017 | Large IPv6 pool, correct statistics of IP number. | p3 | | done | | - diff --git a/test/doc/spidercclaimparameter.md b/test/doc/spiderclaimparameter.md similarity index 80% rename from test/doc/spidercclaimparameter.md rename to test/doc/spiderclaimparameter.md index 0b2921baf0..95608c09d0 100644 --- a/test/doc/spidercclaimparameter.md +++ b/test/doc/spiderclaimparameter.md @@ -2,8 +2,8 @@ | Case ID | Title | Priority | Smoke | Status | Other | | ------- | ------| -------- | ----- | ------ | ----- | -| Y00001 | test create spiderclaimparameter | p3 | | done | -| Y00002 | test create spiderclaimparameter for empty staticNics | p3 | | done | -| Y00003 | verify spidermultusconfig of the secondaryNics if is exist | p3 | | | -| Y00004 | if defaultNic is empty, webhook set default cluster network | p3 | | | -| Y00005 | the cniType of all the secondaryNics should be same | p3 | | | +| Y00001 | test create spiderclaimparameter | p3 | | done | | +| Y00002 | test create spiderclaimparameter for empty staticNics | p3 | | done | | +| Y00003 | verify spidermultusconfig of the secondaryNics if is exist | p3 | | | | +| Y00004 | if defaultNic is empty, webhook set default cluster network | p3 | | | | +| Y00005 | the cniType of all the secondaryNics should be same | p3 | | | | diff --git a/test/e2e/affinity/affinity_test.go b/test/e2e/affinity/affinity_test.go index 540714ac24..9c80f368a7 100644 --- a/test/e2e/affinity/affinity_test.go +++ b/test/e2e/affinity/affinity_test.go @@ -447,7 +447,7 @@ var _ = Describe("test Affinity", Label("affinity"), func() { }) }) - It("Successfully restarted statefulSet/pod with matching podSelector, ip remains the same", Label("L00008", "A00009"), func() { + It("After the statefulset changes the IP pool and restarts, the IP is changed correctly and the UID recorded in the endpoint is synchronized correctly.", Label("L00008", "A00009"), func() { // A00009:Modify the annotated IPPool for a specified StatefulSet pod // Generate ippool annotation string podIppoolAnnoStr := common.GeneratePodIPPoolAnnotations(frame, common.NIC1, defaultV4PoolNameList, defaultV6PoolNameList) @@ -496,7 +496,7 @@ var _ = Describe("test Affinity", Label("affinity"), func() { object, err := common.GetWorkloadByName(frame, pod.Namespace, pod.Name) Expect(err).NotTo(HaveOccurred()) Expect(object).NotTo(BeNil()) - uidMap[string(object.UID)] = pod.Name + uidMap[string(object.Status.Current.UID)] = pod.Name } GinkgoWriter.Printf("StatefulSet %s/%s corresponding Pod IP allocations: %v \n", stsObject.Namespace, stsObject.Name, ipMap) @@ -569,7 +569,7 @@ var _ = Describe("test Affinity", Label("affinity"), func() { // WorkloadEndpoint UID remains the same object, err := common.GetWorkloadByName(frame, pod.Namespace, pod.Name) Expect(err).NotTo(HaveOccurred(), "Failed to get the same uid") - d, ok := uidMap[string(object.UID)] + d, ok := uidMap[string(object.Status.Current.UID)] Expect(ok).To(BeFalse(), "Unexpectedly got the same uid") GinkgoWriter.Printf("Pod %v workloadendpoint UID %v remains the same \n", d, object.UID) } diff --git a/test/e2e/annotation/annotation_test.go b/test/e2e/annotation/annotation_test.go index ee0ced3f0b..832a4289af 100644 --- a/test/e2e/annotation/annotation_test.go +++ b/test/e2e/annotation/annotation_test.go @@ -18,10 +18,12 @@ import ( "k8s.io/kubectl/pkg/util/podutils" "k8s.io/utils/ptr" + "github.com/spidernet-io/spiderpool/pkg/constant" pkgconstant "github.com/spidernet-io/spiderpool/pkg/constant" spiderpool "github.com/spidernet-io/spiderpool/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1" "github.com/spidernet-io/spiderpool/pkg/types" "github.com/spidernet-io/spiderpool/test/e2e/common" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var _ = Describe("test annotation", Label("annotation"), func() { @@ -969,6 +971,241 @@ var _ = Describe("test annotation", Label("annotation"), func() { return true }, common.PodStartTimeout, common.ForcedWaitingTime).Should(BeTrue()) }) + + It("Stateful applications can use multiple NICs via k8s.v1.cni.cncf.io/networks, enabling creation, restart, and IP address changes.", Label("A00017"), func() { + // 1. Define multus cni NetworkAttachmentDefinition and create + spiderMultusNadName := "test-multus-" + common.GenerateString(10, true) + nad := &spiderpool.SpiderMultusConfig{ + ObjectMeta: metav1.ObjectMeta{ + Name: spiderMultusNadName, + Namespace: nsName, + }, + Spec: spiderpool.MultusCNIConfigSpec{ + CniType: ptr.To(constant.MacvlanCNI), + MacvlanConfig: &spiderpool.SpiderMacvlanCniConfig{ + Master: []string{common.NIC1}, + SpiderpoolConfigPools: &spiderpool.SpiderpoolPools{}, + }, + }, + } + + if frame.Info.IpV4Enabled { + nad.Spec.MacvlanConfig.SpiderpoolConfigPools.IPv4IPPool = []string{v4PoolName} + } + if frame.Info.IpV6Enabled { + nad.Spec.MacvlanConfig.SpiderpoolConfigPools.IPv6IPPool = []string{v6PoolName} + } + Expect(frame.CreateSpiderMultusInstance(nad)).NotTo(HaveOccurred()) + Eventually(func() bool { + _, err := frame.GetSpiderMultusInstance(nsName, spiderMultusNadName) + return !errors.IsNotFound(err) + }, common.SpiderSyncMultusTime, common.ForcedWaitingTime).Should(BeTrue()) + + // 2. Stateful applications use annotation `k8s.v1.cni.cncf.io/networks` + stsYaml := common.GenerateExampleStatefulSetYaml(podName, nsName, int32(1)) + stsYaml.Spec.Template.Annotations = map[string]string{ + common.MultusDefaultNetwork: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanUnderlayVlan0), + common.MultusNetworks: fmt.Sprintf("%s/%s", nsName, spiderMultusNadName), + } + Expect(stsYaml).NotTo(BeNil()) + GinkgoWriter.Printf("succeeded to generate sts yaml: %+v. \n", stsYaml) + + // 3. Stateful applications with multiple NICs can be successfully created. + Expect(frame.CreateStatefulSet(stsYaml)).To(Succeed()) + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + Expect(frame.WaitPodListRunning(stsYaml.Spec.Template.Labels, 1, ctx)).NotTo(HaveOccurred()) + + if frame.Info.IpV4Enabled { + Expect(common.CheckIppoolSanity(frame, globalDefaultV4IpoolList[0])).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", globalDefaultV4IpoolList[0]) + Expect(common.CheckIppoolSanity(frame, v4PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", v4PoolName) + } + + if frame.Info.IpV6Enabled { + Expect(common.CheckIppoolSanity(frame, globalDefaultV6IpoolList[0])).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", globalDefaultV6IpoolList[0]) + Expect(common.CheckIppoolSanity(frame, v6PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", v6PoolName) + } + + // 4. Multi-NIC stateful applications without a specified interface can update their IP pools, + // allowing Pods to change IP addresses, and the IPs from the pools are correctly reclaimed. + newSpiderMultusConfig, err := frame.GetSpiderMultusInstance(nsName, spiderMultusNadName) + Expect(err).NotTo(HaveOccurred()) + if frame.Info.IpV4Enabled { + newSpiderMultusConfig.Spec.MacvlanConfig.SpiderpoolConfigPools.IPv4IPPool = []string{v4PoolName1} + } + if frame.Info.IpV6Enabled { + newSpiderMultusConfig.Spec.MacvlanConfig.SpiderpoolConfigPools.IPv6IPPool = []string{v6PoolName1} + } + Expect(frame.UpdateResource(newSpiderMultusConfig)).NotTo(HaveOccurred()) + Eventually(func() bool { + _, err := frame.GetSpiderMultusInstance(nsName, spiderMultusNadName) + return !errors.IsNotFound(err) + }, common.SpiderSyncMultusTime, common.ForcedWaitingTime).Should(BeTrue()) + + // 5.After the corresponding NIC's IP pool is changed, the IP of the stateful application can also be updated. + Expect(frame.DeletePodListByLabel(stsYaml.Spec.Template.Labels)).NotTo(HaveOccurred()) + newPodList := &corev1.PodList{} + Eventually(func() bool { + newPodList, err = frame.GetPodListByLabel(stsYaml.Spec.Template.Labels) + if err != nil { + GinkgoWriter.Printf("failed to get podlist %v/%v = %v\n", stsYaml.Namespace, stsYaml.Name, err) + return false + } + if len(newPodList.Items) != 1 || !podutils.IsPodReady(&newPodList.Items[0]) { + return false + } + + var tmpV4PoolNameList []string + var tmpV6PoolNameList []string + if frame.Info.IpV4Enabled { + tmpV4PoolNameList = []string{v4PoolName1} + } + if frame.Info.IpV6Enabled { + tmpV6PoolNameList = []string{v6PoolName1} + } + ok, _, _, e := common.CheckPodIpRecordInIppool(frame, tmpV4PoolNameList, tmpV6PoolNameList, newPodList) + if e != nil { + GinkgoWriter.Printf("failed to check pod ip record in ippool %v\n", e) + return false + } + + if !ok { + GinkgoWriter.Println("failed to check pod ip record in ippool, maybe the IP has not been synchronized yet, please wait... \n") + return false + } + return true + }, common.IPReclaimTimeout, common.ForcedWaitingTime).Should(BeTrue()) + + // 6.The IPs from the old IP pool should be reclaimed. + if frame.Info.IpV4Enabled { + Expect(common.CheckIppoolSanity(frame, v4PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", v4PoolName) + } + if frame.Info.IpV6Enabled { + Expect(common.CheckIppoolSanity(frame, v6PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", v6PoolName) + } + }) + + It("Stateful applications using the annotation ipam.spidernet.io/ippools without specifying a NIC name can still create Pods, restart them, and update their IP addresses.", Label("A00018"), func() { + // 1. Stateful applications use annotation `ipam.spidernet.io/ippools` with NIC name not specified + podIppoolsAnno := types.AnnoPodIPPoolsValue{{}, {}} + if frame.Info.IpV4Enabled { + podIppoolsAnno[0].IPv4Pools = globalDefaultV4IpoolList + podIppoolsAnno[1].IPv4Pools = []string{v4PoolName} + } + if frame.Info.IpV6Enabled { + podIppoolsAnno[0].IPv6Pools = globalDefaultV6IpoolList + podIppoolsAnno[1].IPv6Pools = []string{v6PoolName} + } + + podIppoolsAnnoMarshal, err := json.Marshal(podIppoolsAnno) + Expect(err).NotTo(HaveOccurred()) + annoPodIPPoolsStr := string(podIppoolsAnnoMarshal) + stsYaml := common.GenerateExampleStatefulSetYaml(podName, nsName, int32(1)) + stsYaml.Spec.Template.Annotations = map[string]string{ + pkgconstant.AnnoPodIPPools: annoPodIPPoolsStr, + common.MultusDefaultNetwork: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanUnderlayVlan0), + common.MultusNetworks: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan100), + } + Expect(stsYaml).NotTo(BeNil()) + GinkgoWriter.Printf("succeeded to generate sts yaml: %+v. \n", stsYaml) + + // 2. Stateful applications with multiple NICs can be successfully created. + Expect(frame.CreateStatefulSet(stsYaml)).To(Succeed()) + ctx, cancel := context.WithTimeout(context.Background(), time.Minute*2) + defer cancel() + Expect(frame.WaitPodListRunning(stsYaml.Spec.Template.Labels, 1, ctx)).NotTo(HaveOccurred()) + + if frame.Info.IpV4Enabled { + Expect(common.CheckIppoolSanity(frame, globalDefaultV4IpoolList[0])).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", globalDefaultV4IpoolList[0]) + Expect(common.CheckIppoolSanity(frame, v4PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", v4PoolName) + } + + if frame.Info.IpV6Enabled { + Expect(common.CheckIppoolSanity(frame, globalDefaultV6IpoolList[0])).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", globalDefaultV6IpoolList[0]) + Expect(common.CheckIppoolSanity(frame, v6PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", v6PoolName) + } + + // 3. Stateful applications with multiple NICs can successfully restart without any changes to their IP addresses. + Expect(common.RestartAndValidateStatefulSetPodIP(frame, stsYaml.Spec.Template.Labels)).NotTo(HaveOccurred()) + + // 4. Multi-NIC stateful applications without a specified interface can update their IP pools, + // allowing Pods to change IP addresses, and the IPs from the pools are correctly reclaimed. + newPodIppoolsAnno := types.AnnoPodIPPoolsValue{{}, {}} + if frame.Info.IpV4Enabled { + newPodIppoolsAnno[0].IPv4Pools = globalDefaultV4IpoolList + newPodIppoolsAnno[1].IPv4Pools = []string{v4PoolName1} + } + if frame.Info.IpV6Enabled { + newPodIppoolsAnno[0].IPv6Pools = globalDefaultV6IpoolList + newPodIppoolsAnno[1].IPv6Pools = []string{v6PoolName1} + } + + newPodIppoolsAnnoMarshal, err := json.Marshal(newPodIppoolsAnno) + Expect(err).NotTo(HaveOccurred()) + newAnnoPodIPPoolsStr := string(newPodIppoolsAnnoMarshal) + + stsObj, err := frame.GetStatefulSet(stsYaml.Name, nsName) + Expect(err).NotTo(HaveOccurred()) + stsObj.Spec.Template.Annotations = map[string]string{ + pkgconstant.AnnoPodIPPools: newAnnoPodIPPoolsStr, + common.MultusDefaultNetwork: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanUnderlayVlan0), + common.MultusNetworks: fmt.Sprintf("%s/%s", common.MultusNs, common.MacvlanVlan100), + } + Expect(frame.UpdateResource(stsObj)).NotTo(HaveOccurred()) + + // 5.After the corresponding NIC's IP pool is changed, the IP of the stateful application can also be updated. + newPodList := &corev1.PodList{} + Eventually(func() bool { + newPodList, err = frame.GetPodListByLabel(stsYaml.Spec.Template.Labels) + if err != nil { + GinkgoWriter.Printf("failed to get podlist %v/%v = %v\n", stsYaml.Namespace, stsYaml.Name, err) + return false + } + if len(newPodList.Items) != 1 || !podutils.IsPodReady(&newPodList.Items[0]) { + return false + } + + var tmpV4PoolNameList []string + var tmpV6PoolNameList []string + if frame.Info.IpV4Enabled { + tmpV4PoolNameList = []string{v4PoolName1} + } + if frame.Info.IpV6Enabled { + tmpV6PoolNameList = []string{v6PoolName1} + } + ok, _, _, e := common.CheckPodIpRecordInIppool(frame, tmpV4PoolNameList, tmpV6PoolNameList, newPodList) + if e != nil { + GinkgoWriter.Printf("failed to check pod ip record in ippool %v\n", e) + return false + } + + if !ok { + GinkgoWriter.Println("failed to check pod ip record in ippool, maybe the IP has not been synchronized yet, please wait... \n") + return false + } + return true + }, common.IPReclaimTimeout, common.ForcedWaitingTime).Should(BeTrue()) + + // 6.The IPs from the old IP pool should be reclaimed. + if frame.Info.IpV4Enabled { + Expect(common.CheckIppoolSanity(frame, v4PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv4 SpiderIPPool %v\n", v4PoolName) + } + if frame.Info.IpV6Enabled { + Expect(common.CheckIppoolSanity(frame, v6PoolName)).NotTo(HaveOccurred()) + GinkgoWriter.Printf("Successfully checked sanity of IPv6 SpiderIPPool %v\n", v6PoolName) + } + }) }) Context("wrong IPPools annotation usage", func() { From 56a75e8c219b0ef45a0f70351d7d46edc9297336 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:11:55 +0000 Subject: [PATCH 03/19] build(deps): bump golang.org/x/crypto from 0.24.0 to 0.31.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.31.0. - [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 10 +- go.sum | 19 +- vendor/golang.org/x/crypto/LICENSE | 4 +- vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 2 +- vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 2 +- vendor/golang.org/x/crypto/scrypt/scrypt.go | 2 +- vendor/golang.org/x/sync/LICENSE | 4 +- vendor/golang.org/x/sys/LICENSE | 4 +- vendor/golang.org/x/sys/unix/README.md | 2 +- vendor/golang.org/x/sys/unix/ioctl_linux.go | 96 ++++++++ vendor/golang.org/x/sys/unix/mkerrors.sh | 18 +- vendor/golang.org/x/sys/unix/mremap.go | 5 + vendor/golang.org/x/sys/unix/syscall_aix.go | 2 +- .../golang.org/x/sys/unix/syscall_darwin.go | 61 +++++ vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 + vendor/golang.org/x/sys/unix/syscall_linux.go | 65 ++++- .../x/sys/unix/syscall_linux_arm64.go | 2 + .../x/sys/unix/syscall_linux_loong64.go | 2 + .../x/sys/unix/syscall_linux_riscv64.go | 2 + .../golang.org/x/sys/unix/syscall_openbsd.go | 1 + vendor/golang.org/x/sys/unix/syscall_unix.go | 9 + .../x/sys/unix/syscall_zos_s390x.go | 104 +++++++- .../golang.org/x/sys/unix/vgetrandom_linux.go | 13 + .../x/sys/unix/vgetrandom_unsupported.go | 11 + .../x/sys/unix/zerrors_darwin_amd64.go | 12 + .../x/sys/unix/zerrors_darwin_arm64.go | 12 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 82 ++++++- .../x/sys/unix/zerrors_linux_386.go | 27 ++ .../x/sys/unix/zerrors_linux_amd64.go | 27 ++ .../x/sys/unix/zerrors_linux_arm.go | 27 ++ .../x/sys/unix/zerrors_linux_arm64.go | 28 +++ .../x/sys/unix/zerrors_linux_loong64.go | 27 ++ .../x/sys/unix/zerrors_linux_mips.go | 27 ++ .../x/sys/unix/zerrors_linux_mips64.go | 27 ++ .../x/sys/unix/zerrors_linux_mips64le.go | 27 ++ .../x/sys/unix/zerrors_linux_mipsle.go | 27 ++ .../x/sys/unix/zerrors_linux_ppc.go | 27 ++ .../x/sys/unix/zerrors_linux_ppc64.go | 27 ++ .../x/sys/unix/zerrors_linux_ppc64le.go | 27 ++ .../x/sys/unix/zerrors_linux_riscv64.go | 27 ++ .../x/sys/unix/zerrors_linux_s390x.go | 27 ++ .../x/sys/unix/zerrors_linux_sparc64.go | 27 ++ .../x/sys/unix/zerrors_zos_s390x.go | 2 + .../x/sys/unix/zsyscall_darwin_amd64.go | 101 ++++++++ .../x/sys/unix/zsyscall_darwin_amd64.s | 25 ++ .../x/sys/unix/zsyscall_darwin_arm64.go | 101 ++++++++ .../x/sys/unix/zsyscall_darwin_arm64.s | 25 ++ .../golang.org/x/sys/unix/zsyscall_linux.go | 43 ++-- .../x/sys/unix/zsyscall_openbsd_386.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_386.s | 5 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_arm.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 24 ++ .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 + .../x/sys/unix/zsysnum_linux_386.go | 1 + .../x/sys/unix/zsysnum_linux_amd64.go | 2 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 3 +- .../x/sys/unix/zsysnum_linux_loong64.go | 3 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_riscv64.go | 3 +- .../x/sys/unix/zsysnum_linux_s390x.go | 1 + .../x/sys/unix/zsysnum_linux_sparc64.go | 1 + .../x/sys/unix/ztypes_darwin_amd64.go | 73 ++++++ .../x/sys/unix/ztypes_darwin_arm64.go | 73 ++++++ .../x/sys/unix/ztypes_freebsd_386.go | 1 + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 230 ++++++++++++++---- .../x/sys/unix/ztypes_linux_riscv64.go | 33 +++ .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 6 + .../golang.org/x/sys/windows/dll_windows.go | 2 +- .../x/sys/windows/security_windows.go | 24 +- .../x/sys/windows/syscall_windows.go | 52 ++-- .../golang.org/x/sys/windows/types_windows.go | 199 ++++++++++++++- .../x/sys/windows/zsyscall_windows.go | 151 ++++++++++++ vendor/golang.org/x/term/LICENSE | 4 +- vendor/golang.org/x/term/README.md | 11 +- vendor/golang.org/x/term/term_windows.go | 1 + vendor/golang.org/x/text/LICENSE | 4 +- vendor/modules.txt | 12 +- 98 files changed, 2218 insertions(+), 140 deletions(-) create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_linux.go create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go diff --git a/go.mod b/go.mod index 10c31e7f34..b7dfd6d60a 100644 --- a/go.mod +++ b/go.mod @@ -46,8 +46,8 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.25.0 golang.org/x/net v0.26.0 - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v2 v2.4.0 @@ -174,12 +174,12 @@ require ( github.com/yusufpapurcu/wmi v1.2.3 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect go.uber.org/dig v1.17.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 8318a42d30..710f0317f7 100644 --- a/go.sum +++ b/go.sum @@ -611,8 +611,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -728,8 +728,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -795,14 +795,15 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.1-0.20230616193735-e0c3b6e6ae3b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -815,8 +816,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/crypto/LICENSE +++ b/vendor/golang.org/x/crypto/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index 5577c0f939..dc9311870a 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -4,7 +4,7 @@ // Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing // algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf -package bcrypt // import "golang.org/x/crypto/bcrypt" +package bcrypt // The code is a port of Provos and Mazières's C implementation. import ( diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go index 213bf204af..0898956807 100644 --- a/vendor/golang.org/x/crypto/blowfish/cipher.go +++ b/vendor/golang.org/x/crypto/blowfish/cipher.go @@ -11,7 +11,7 @@ // Deprecated: any new system should use AES (from crypto/aes, if necessary in // an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from // golang.org/x/crypto/chacha20poly1305). -package blowfish // import "golang.org/x/crypto/blowfish" +package blowfish // The code is a port of Bruce Schneier's C implementation. // See https://www.schneier.com/blowfish.html. diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go index 904b57e01d..28cd99c7f3 100644 --- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To choose, you can pass the `New` functions from the different SHA packages to pbkdf2.Key. */ -package pbkdf2 // import "golang.org/x/crypto/pbkdf2" +package pbkdf2 import ( "crypto/hmac" diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go index c971a99fa6..76fa40fb20 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -5,7 +5,7 @@ // Package scrypt implements the scrypt key derivation function as defined in // Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard // Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). -package scrypt // import "golang.org/x/crypto/scrypt" +package scrypt import ( "crypto/sha256" diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/sync/LICENSE +++ b/vendor/golang.org/x/sync/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/sys/LICENSE +++ b/vendor/golang.org/x/sys/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md index 7d3c060e12..6e08a76a71 100644 --- a/vendor/golang.org/x/sys/unix/README.md +++ b/vendor/golang.org/x/sys/unix/README.md @@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these into a common file for each OS. The merge is performed in the following steps: -1. Construct the set of common code that is idential in all architecture-specific files. +1. Construct the set of common code that is identical in all architecture-specific files. 2. Write this common code to the merged file. 3. Remove the common code from all architecture-specific files. diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go index dbe680eab8..7ca4fa12aa 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -58,6 +58,102 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) { return &value, err } +// IoctlGetEthtoolTsInfo fetches ethtool timestamping and PHC +// association for the network device specified by ifname. +func IoctlGetEthtoolTsInfo(fd int, ifname string) (*EthtoolTsInfo, error) { + ifr, err := NewIfreq(ifname) + if err != nil { + return nil, err + } + + value := EthtoolTsInfo{Cmd: ETHTOOL_GET_TS_INFO} + ifrd := ifr.withData(unsafe.Pointer(&value)) + + err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd) + return &value, err +} + +// IoctlGetHwTstamp retrieves the hardware timestamping configuration +// for the network device specified by ifname. +func IoctlGetHwTstamp(fd int, ifname string) (*HwTstampConfig, error) { + ifr, err := NewIfreq(ifname) + if err != nil { + return nil, err + } + + value := HwTstampConfig{} + ifrd := ifr.withData(unsafe.Pointer(&value)) + + err = ioctlIfreqData(fd, SIOCGHWTSTAMP, &ifrd) + return &value, err +} + +// IoctlSetHwTstamp updates the hardware timestamping configuration for +// the network device specified by ifname. +func IoctlSetHwTstamp(fd int, ifname string, cfg *HwTstampConfig) error { + ifr, err := NewIfreq(ifname) + if err != nil { + return err + } + ifrd := ifr.withData(unsafe.Pointer(cfg)) + return ioctlIfreqData(fd, SIOCSHWTSTAMP, &ifrd) +} + +// FdToClockID derives the clock ID from the file descriptor number +// - see clock_gettime(3), FD_TO_CLOCKID macros. The resulting ID is +// suitable for system calls like ClockGettime. +func FdToClockID(fd int) int32 { return int32((int(^fd) << 3) | 3) } + +// IoctlPtpClockGetcaps returns the description of a given PTP device. +func IoctlPtpClockGetcaps(fd int) (*PtpClockCaps, error) { + var value PtpClockCaps + err := ioctlPtr(fd, PTP_CLOCK_GETCAPS2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpSysOffsetPrecise returns a description of the clock +// offset compared to the system clock. +func IoctlPtpSysOffsetPrecise(fd int) (*PtpSysOffsetPrecise, error) { + var value PtpSysOffsetPrecise + err := ioctlPtr(fd, PTP_SYS_OFFSET_PRECISE2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpSysOffsetExtended returns an extended description of the +// clock offset compared to the system clock. The samples parameter +// specifies the desired number of measurements. +func IoctlPtpSysOffsetExtended(fd int, samples uint) (*PtpSysOffsetExtended, error) { + value := PtpSysOffsetExtended{Samples: uint32(samples)} + err := ioctlPtr(fd, PTP_SYS_OFFSET_EXTENDED2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpPinGetfunc returns the configuration of the specified +// I/O pin on given PTP device. +func IoctlPtpPinGetfunc(fd int, index uint) (*PtpPinDesc, error) { + value := PtpPinDesc{Index: uint32(index)} + err := ioctlPtr(fd, PTP_PIN_GETFUNC2, unsafe.Pointer(&value)) + return &value, err +} + +// IoctlPtpPinSetfunc updates configuration of the specified PTP +// I/O pin. +func IoctlPtpPinSetfunc(fd int, pd *PtpPinDesc) error { + return ioctlPtr(fd, PTP_PIN_SETFUNC2, unsafe.Pointer(pd)) +} + +// IoctlPtpPeroutRequest configures the periodic output mode of the +// PTP I/O pins. +func IoctlPtpPeroutRequest(fd int, r *PtpPeroutRequest) error { + return ioctlPtr(fd, PTP_PEROUT_REQUEST2, unsafe.Pointer(r)) +} + +// IoctlPtpExttsRequest configures the external timestamping mode +// of the PTP I/O pins. +func IoctlPtpExttsRequest(fd int, r *PtpExttsRequest) error { + return ioctlPtr(fd, PTP_EXTTS_REQUEST2, unsafe.Pointer(r)) +} + // IoctlGetWatchdogInfo fetches information about a watchdog device from the // Linux watchdog API. For more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 4ed2e488b6..6ab02b6c31 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -58,6 +58,7 @@ includes_Darwin=' #define _DARWIN_USE_64_BIT_INODE #define __APPLE_USE_RFC_3542 #include +#include #include #include #include @@ -157,6 +158,16 @@ includes_Linux=' #endif #define _GNU_SOURCE +// See the description in unix/linux/types.go +#if defined(__ARM_EABI__) || \ + (defined(__mips__) && (_MIPS_SIM == _ABIO32)) || \ + (defined(__powerpc__) && (!defined(__powerpc64__))) +# ifdef _TIME_BITS +# undef _TIME_BITS +# endif +# define _TIME_BITS 32 +#endif + // is broken on powerpc64, as it fails to include definitions of // these structures. We just include them copied from . #if defined(__powerpc__) @@ -255,6 +266,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -526,6 +538,7 @@ ccflags="$@" $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || + $2 ~ /^PTP_/ || $2 ~ /^RAW_PAYLOAD_/ || $2 ~ /^[US]F_/ || $2 ~ /^TP_STATUS_/ || @@ -551,6 +564,7 @@ ccflags="$@" $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || + $2 ~ /^(CONNECT|SAE)_/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || @@ -654,7 +668,7 @@ errors=$( signals=$( echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort ) @@ -664,7 +678,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_error.grep echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort >_signal.grep echo '// mkerrors.sh' "$@" diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go index fd45fe529d..3a5e776f89 100644 --- a/vendor/golang.org/x/sys/unix/mremap.go +++ b/vendor/golang.org/x/sys/unix/mremap.go @@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [ func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { return mapper.Mremap(oldData, newLength, flags) } + +func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr)) + return unsafe.Pointer(xaddr), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index 67ce6cef2d..6f15ba1eaf 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, var status _C_int var r Pid_t err = ERESTART - // AIX wait4 may return with ERESTART errno, while the processus is still + // AIX wait4 may return with ERESTART errno, while the process is still // active. for err == ERESTART { r, err = wait4(Pid_t(pid), &status, options, rusage) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 59542a897d..099867deed 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq)) } +//sys renamexNp(from string, to string, flag uint32) (err error) + +func RenamexNp(from string, to string, flag uint32) (err error) { + return renamexNp(from, to, flag) +} + +//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) + +func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + return renameatxNp(fromfd, from, tofd, to, flag) +} + //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL func Uname(uname *Utsname) error { @@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { } } +//sys pthread_chdir_np(path string) (err error) + +func PthreadChdir(path string) (err error) { + return pthread_chdir_np(path) +} + +//sys pthread_fchdir_np(fd int) (err error) + +func PthreadFchdir(fd int) (err error) { + return pthread_fchdir_np(fd) +} + +// Connectx calls connectx(2) to initiate a connection on a socket. +// +// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument. +// +// - srcIf is the optional source interface index. 0 means unspecified. +// - srcAddr is the optional source address. nil means unspecified. +// - dstAddr is the destination address. +// +// On success, Connectx returns the number of bytes enqueued for transmission. +func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) { + endpoints := SaEndpoints{ + Srcif: srcIf, + } + + if srcAddr != nil { + addrp, addrlen, err := srcAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Srcaddr = (*RawSockaddr)(addrp) + endpoints.Srcaddrlen = uint32(addrlen) + } + + if dstAddr != nil { + addrp, addrlen, err := dstAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Dstaddr = (*RawSockaddr)(addrp) + endpoints.Dstaddrlen = uint32(addrlen) + } + + err = connectx(fd, &endpoints, associd, flags, iov, &n, connid) + return +} + +//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go index ba46651f8e..a6a2d2fc2b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_hurd.go +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -11,6 +11,7 @@ package unix int ioctl(int, unsigned long int, uintptr_t); */ import "C" +import "unsafe" func ioctl(fd int, req uint, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 5682e2628a..230a94549a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { return &value, err } +// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the "vegas" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPVegasInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the "dctp" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the "bbr" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPBBRInfo)(unsafe.Pointer(&value[0])) + return out, err +} + // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { @@ -1818,6 +1860,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error) //sys ClockGetres(clockid int32, res *Timespec) (err error) //sys ClockGettime(clockid int32, time *Timespec) (err error) +//sys ClockSettime(clockid int32, time *Timespec) (err error) //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) //sys Close(fd int) (err error) //sys CloseRange(first uint, last uint, flags uint) (err error) @@ -1959,7 +2002,26 @@ func Getpgrp() (pid int) { //sysnb Getpid() (pid int) //sysnb Getppid() (ppid int) //sys Getpriority(which int, who int) (prio int, err error) -//sys Getrandom(buf []byte, flags int) (n int, err error) + +func Getrandom(buf []byte, flags int) (n int, err error) { + vdsoRet, supported := vgetrandom(buf, uint32(flags)) + if supported { + if vdsoRet < 0 { + return 0, errnoErr(syscall.Errno(-vdsoRet)) + } + return vdsoRet, nil + } + var p *byte + if len(buf) > 0 { + p = &buf[0] + } + r, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags)) + if e != 0 { + return 0, errnoErr(e) + } + return int(r), nil +} + //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Getsid(pid int) (sid int, err error) //sysnb Gettid() (tid int) @@ -2592,3 +2654,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { } //sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) +//sys Mseal(b []byte, flags uint) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index cf2ee6c75e..745e5c7e6c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 3d0e98451f..dd2262a407 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 6f5a288944..8cf3670bda 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error } return riscvHWProbe(pairs, setSize, set, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index b25343c71a..b86ded549c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -293,6 +293,7 @@ func Uname(uname *Utsname) error { //sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 77081de8c7..4e92e5aa40 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) { return mapper.Munmap(b) } +func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) + return unsafe.Pointer(xaddr), err +} + +func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { + return mapper.munmap(uintptr(addr), length) +} + func Read(fd int, p []byte) (n int, err error) { n, err = read(fd, p) if raceenabled { diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index 312ae6ac1d..7bf5c04bb0 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -768,6 +768,15 @@ func Munmap(b []byte) (err error) { return mapper.Munmap(b) } +func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) + return unsafe.Pointer(xaddr), err +} + +func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { + return mapper.munmap(uintptr(addr), length) +} + //sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) @@ -816,10 +825,10 @@ func Lstat(path string, stat *Stat_t) (err error) { // for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/ func isSpecialPath(path []byte) (v bool) { var special = [4][8]byte{ - [8]byte{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, - [8]byte{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, - [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, - [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} + {'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, + {'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, + {'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, + {'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} var i, j int for i = 0; i < len(special); i++ { @@ -3115,3 +3124,90 @@ func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) { //sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT //sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT //sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT + +func fcntlAsIs(fd uintptr, cmd int, arg uintptr) (val int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), arg) + runtime.ExitSyscall() + val = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +func Fcntl(fd uintptr, cmd int, op interface{}) (ret int, err error) { + switch op.(type) { + case *Flock_t: + err = FcntlFlock(fd, cmd, op.(*Flock_t)) + if err != nil { + ret = -1 + } + return + case int: + return FcntlInt(fd, cmd, op.(int)) + case *F_cnvrt: + return fcntlAsIs(fd, cmd, uintptr(unsafe.Pointer(op.(*F_cnvrt)))) + case unsafe.Pointer: + return fcntlAsIs(fd, cmd, uintptr(op.(unsafe.Pointer))) + default: + return -1, EINVAL + } + return +} + +func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + return sendfile(outfd, infd, offset, count) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + // TODO: use LE call instead if the call is implemented + originalOffset, err := Seek(infd, 0, SEEK_CUR) + if err != nil { + return -1, err + } + //start reading data from in_fd + if offset != nil { + _, err := Seek(infd, *offset, SEEK_SET) + if err != nil { + return -1, err + } + } + + buf := make([]byte, count) + readBuf := make([]byte, 0) + var n int = 0 + for i := 0; i < count; i += n { + n, err := Read(infd, buf) + if n == 0 { + if err != nil { + return -1, err + } else { // EOF + break + } + } + readBuf = append(readBuf, buf...) + buf = buf[0:0] + } + + n2, err := Write(outfd, readBuf) + if err != nil { + return -1, err + } + + //When sendfile() returns, this variable will be set to the + // offset of the byte following the last byte that was read. + if offset != nil { + *offset = *offset + int64(n) + // If offset is not NULL, then sendfile() does not modify the file + // offset of in_fd + _, err := Seek(infd, originalOffset, SEEK_SET) + if err != nil { + return -1, err + } + } + return n2, nil +} diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_linux.go b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go new file mode 100644 index 0000000000..07ac8e09d1 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && go1.24 + +package unix + +import _ "unsafe" + +//go:linkname vgetrandom runtime.vgetrandom +//go:noescape +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go new file mode 100644 index 0000000000..297e97bce9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go @@ -0,0 +1,11 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !linux || !go1.24 + +package unix + +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { + return -1, false +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index e40fa85245..d73c4652e6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index bb02aa6c05..4a55a40058 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 877a62b479..6ebc48b3fe 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -321,6 +321,9 @@ const ( AUDIT_INTEGRITY_STATUS = 0x70a AUDIT_IPC = 0x517 AUDIT_IPC_SET_PERM = 0x51f + AUDIT_IPE_ACCESS = 0x58c + AUDIT_IPE_CONFIG_CHANGE = 0x58d + AUDIT_IPE_POLICY_LOAD = 0x58e AUDIT_KERNEL = 0x7d0 AUDIT_KERNEL_OTHER = 0x524 AUDIT_KERN_MODULE = 0x532 @@ -457,6 +460,7 @@ const ( B600 = 0x8 B75 = 0x2 B9600 = 0xd + BCACHEFS_SUPER_MAGIC = 0xca451a4e BDEVFS_MAGIC = 0x62646576 BINDERFS_SUPER_MAGIC = 0x6c6f6f70 BINFMTFS_MAGIC = 0x42494e4d @@ -488,12 +492,14 @@ const ( BPF_F_ID = 0x20 BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 + BPF_F_REDIRECT_FLAGS = 0x19 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 BPF_F_STRICT_ALIGNMENT = 0x1 BPF_F_TEST_REG_INVARIANTS = 0x80 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_RUN_ON_CPU = 0x1 + BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4 BPF_F_TEST_STATE_FREQ = 0x8 BPF_F_TEST_XDP_LIVE_FRAMES = 0x2 BPF_F_XDP_DEV_BOUND_ONLY = 0x40 @@ -928,6 +934,7 @@ const ( EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_IOC_TYPE = 0x8a EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 ESP_V4_FLOW = 0xa ESP_V6_FLOW = 0xc @@ -941,9 +948,6 @@ const ( ETHTOOL_FEC_OFF = 0x4 ETHTOOL_FEC_RS = 0x8 ETHTOOL_FLAG_ALL = 0x7 - ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 - ETHTOOL_FLAG_OMIT_REPLY = 0x2 - ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_FLASHDEV = 0x33 ETHTOOL_FLASH_MAX_FILENAME = 0x80 ETHTOOL_FWVERS_LEN = 0x20 @@ -1166,6 +1170,7 @@ const ( EXTA = 0xe EXTB = 0xf F2FS_SUPER_MAGIC = 0xf2f52010 + FALLOC_FL_ALLOCATE_RANGE = 0x0 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 @@ -1705,6 +1710,7 @@ const ( KEXEC_ARCH_S390 = 0x160000 KEXEC_ARCH_SH = 0x2a0000 KEXEC_ARCH_X86_64 = 0x3e0000 + KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 KEXEC_FILE_DEBUG = 0x8 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 @@ -1780,6 +1786,7 @@ const ( KEY_SPEC_USER_KEYRING = -0x4 KEY_SPEC_USER_SESSION_KEYRING = -0x5 LANDLOCK_ACCESS_FS_EXECUTE = 0x1 + LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000 LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800 LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40 LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80 @@ -1797,6 +1804,8 @@ const ( LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 + LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1 + LANDLOCK_SCOPE_SIGNAL = 0x2 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef LINUX_REBOOT_CMD_HALT = 0xcdef0123 @@ -1861,6 +1870,19 @@ const ( MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FIXED_NOREPLACE = 0x100000 + MAP_HUGE_16GB = 0x88000000 + MAP_HUGE_16KB = 0x38000000 + MAP_HUGE_16MB = 0x60000000 + MAP_HUGE_1GB = 0x78000000 + MAP_HUGE_1MB = 0x50000000 + MAP_HUGE_256MB = 0x70000000 + MAP_HUGE_2GB = 0x7c000000 + MAP_HUGE_2MB = 0x54000000 + MAP_HUGE_32MB = 0x64000000 + MAP_HUGE_512KB = 0x4c000000 + MAP_HUGE_512MB = 0x74000000 + MAP_HUGE_64KB = 0x40000000 + MAP_HUGE_8MB = 0x5c000000 MAP_HUGE_MASK = 0x3f MAP_HUGE_SHIFT = 0x1a MAP_PRIVATE = 0x2 @@ -1908,6 +1930,8 @@ const ( MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 MNT_ID_REQ_SIZE_VER0 = 0x18 + MNT_ID_REQ_SIZE_VER1 = 0x20 + MNT_NS_INFO_SIZE_VER0 = 0x10 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 @@ -2173,7 +2197,7 @@ const ( NFT_REG_SIZE = 0x10 NFT_REJECT_ICMPX_MAX = 0x3 NFT_RT_MAX = 0x4 - NFT_SECMARK_CTX_MAXLEN = 0x100 + NFT_SECMARK_CTX_MAXLEN = 0x1000 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 NFT_TABLE_F_MASK = 0x7 @@ -2342,9 +2366,11 @@ const ( PERF_MEM_LVLNUM_IO = 0xa PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L2 = 0x2 + PERF_MEM_LVLNUM_L2_MHB = 0x5 PERF_MEM_LVLNUM_L3 = 0x3 PERF_MEM_LVLNUM_L4 = 0x4 PERF_MEM_LVLNUM_LFB = 0xc + PERF_MEM_LVLNUM_MSC = 0x6 PERF_MEM_LVLNUM_NA = 0xf PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd @@ -2417,6 +2443,7 @@ const ( PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 + PROCFS_IOCTL_MAGIC = 'f' PROC_SUPER_MAGIC = 0x9fa0 PROT_EXEC = 0x4 PROT_GROWSDOWN = 0x1000000 @@ -2498,6 +2525,23 @@ const ( PR_PAC_GET_ENABLED_KEYS = 0x3d PR_PAC_RESET_KEYS = 0x36 PR_PAC_SET_ENABLED_KEYS = 0x3c + PR_PPC_DEXCR_CTRL_CLEAR = 0x4 + PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10 + PR_PPC_DEXCR_CTRL_EDITABLE = 0x1 + PR_PPC_DEXCR_CTRL_MASK = 0x1f + PR_PPC_DEXCR_CTRL_SET = 0x2 + PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8 + PR_PPC_DEXCR_IBRTPD = 0x1 + PR_PPC_DEXCR_NPHIE = 0x3 + PR_PPC_DEXCR_SBHE = 0x0 + PR_PPC_DEXCR_SRAPD = 0x2 + PR_PPC_GET_DEXCR = 0x48 + PR_PPC_SET_DEXCR = 0x49 + PR_RISCV_CTX_SW_FENCEI_OFF = 0x1 + PR_RISCV_CTX_SW_FENCEI_ON = 0x0 + PR_RISCV_SCOPE_PER_PROCESS = 0x0 + PR_RISCV_SCOPE_PER_THREAD = 0x1 + PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47 PR_RISCV_V_GET_CONTROL = 0x46 PR_RISCV_V_SET_CONTROL = 0x45 PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3 @@ -2589,6 +2633,28 @@ const ( PR_UNALIGN_NOPRINT = 0x1 PR_UNALIGN_SIGBUS = 0x2 PSTOREFS_MAGIC = 0x6165676c + PTP_CLK_MAGIC = '=' + PTP_ENABLE_FEATURE = 0x1 + PTP_EXTTS_EDGES = 0x6 + PTP_EXTTS_EVENT_VALID = 0x1 + PTP_EXTTS_V1_VALID_FLAGS = 0x7 + PTP_EXTTS_VALID_FLAGS = 0x1f + PTP_EXT_OFFSET = 0x10 + PTP_FALLING_EDGE = 0x4 + PTP_MAX_SAMPLES = 0x19 + PTP_PEROUT_DUTY_CYCLE = 0x2 + PTP_PEROUT_ONE_SHOT = 0x1 + PTP_PEROUT_PHASE = 0x4 + PTP_PEROUT_V1_VALID_FLAGS = 0x0 + PTP_PEROUT_VALID_FLAGS = 0x7 + PTP_PIN_GETFUNC = 0xc0603d06 + PTP_PIN_GETFUNC2 = 0xc0603d0f + PTP_RISING_EDGE = 0x2 + PTP_STRICT_FLAGS = 0x8 + PTP_SYS_OFFSET_EXTENDED = 0xc4c03d09 + PTP_SYS_OFFSET_EXTENDED2 = 0xc4c03d12 + PTP_SYS_OFFSET_PRECISE = 0xc0403d08 + PTP_SYS_OFFSET_PRECISE2 = 0xc0403d11 PTRACE_ATTACH = 0x10 PTRACE_CONT = 0x7 PTRACE_DETACH = 0x11 @@ -2902,15 +2968,17 @@ const ( RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 RWF_APPEND = 0x10 + RWF_ATOMIC = 0x40 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x3f + RWF_SUPPORTED = 0x7f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 SCHED_DEADLINE = 0x6 + SCHED_EXT = 0x7 SCHED_FIFO = 0x1 SCHED_FLAG_ALL = 0x7f SCHED_FLAG_DL_OVERRUN = 0x4 @@ -3179,6 +3247,7 @@ const ( STATX_ATTR_MOUNT_ROOT = 0x2000 STATX_ATTR_NODUMP = 0x40 STATX_ATTR_VERITY = 0x100000 + STATX_ATTR_WRITE_ATOMIC = 0x400000 STATX_BASIC_STATS = 0x7ff STATX_BLOCKS = 0x400 STATX_BTIME = 0x800 @@ -3192,8 +3261,10 @@ const ( STATX_MTIME = 0x40 STATX_NLINK = 0x4 STATX_SIZE = 0x200 + STATX_SUBVOL = 0x8000 STATX_TYPE = 0x1 STATX_UID = 0x8 + STATX_WRITE_ATOMIC = 0x10000 STATX__RESERVED = 0x80000000 SYNC_FILE_RANGE_WAIT_AFTER = 0x4 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 @@ -3592,6 +3663,7 @@ const ( XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 XDP_UMEM_PGOFF_FILL_RING = 0x100000000 XDP_UMEM_REG = 0x4 + XDP_UMEM_TX_METADATA_LEN = 0x4 XDP_UMEM_TX_SW_CSUM = 0x2 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index e4bc0bd57c..c0d45e3205 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -151,9 +154,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -230,6 +238,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x19 @@ -276,6 +298,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -314,6 +338,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 689317afdb..c731d24f02 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -151,9 +154,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -230,6 +238,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_ARCH_PRCTL = 0x1e PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 @@ -277,6 +299,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -315,6 +339,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 5cca668ac3..680018a4a7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETCRUNCHREGS = 0x19 PTRACE_GETFDPIC = 0x1f PTRACE_GETFDPIC_EXEC = 0x0 @@ -282,6 +304,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -320,6 +344,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 14270508b0..a63909f308 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 ESR_MAGIC = 0x45535201 EXTPROC = 0x10000 @@ -110,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -152,9 +155,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -198,6 +206,7 @@ const ( PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + POE_MAGIC = 0x504f4530 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 @@ -233,6 +242,20 @@ const ( PROT_BTI = 0x10 PROT_MTE = 0x20 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_PEEKMTETAGS = 0x21 PTRACE_POKEMTETAGS = 0x22 PTRACE_SYSEMU = 0x1f @@ -273,6 +296,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -311,6 +336,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 28e39afdcb..9b0a2573fe 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -107,6 +109,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -152,9 +155,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -231,6 +239,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 @@ -269,6 +291,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -307,6 +331,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index cd66e92cb4..958e6e0645 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index c1595eba78..50c7f25bd1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index ee9456b0da..ced21d66d9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 8cfca81e1b..226c044190 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 @@ -275,6 +297,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -313,6 +337,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 60b0deb3af..3122737cd4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -330,6 +352,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -368,6 +392,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index f90aa7281b..eb5d3467ed 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -334,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -372,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index ba9e015033..e921ebc60b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 @@ -150,9 +153,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 @@ -230,6 +238,20 @@ const ( PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 @@ -334,6 +356,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -372,6 +396,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 07cdfd6e9f..38ba81c55c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_GETFDPIC = 0x21 PTRACE_GETFDPIC_EXEC = 0x0 PTRACE_GETFDPIC_INTERP = 0x1 @@ -266,6 +288,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -304,6 +328,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 2f1dd214a7..71f0400977 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -106,6 +108,7 @@ const ( HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -148,9 +151,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 @@ -227,6 +235,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e PTRACE_DISABLE_TE = 0x5010 PTRACE_ENABLE_TE = 0x5009 PTRACE_GET_LAST_BREAK = 0x5006 @@ -338,6 +360,8 @@ const ( RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -376,6 +400,9 @@ const ( SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index f40519d901..c44a313322 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -82,6 +82,8 @@ const ( EFD_CLOEXEC = 0x400000 EFD_NONBLOCK = 0x4000 EMT_TAGOVF = 0x1 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x400000 EXTPROC = 0x10000 FF1 = 0x8000 @@ -110,6 +112,7 @@ const ( HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 + HIDIOCREVOKE = 0x8004480d HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 @@ -153,9 +156,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 @@ -232,6 +240,20 @@ const ( PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x40503d01 + PTP_CLOCK_GETCAPS2 = 0x40503d0a + PTP_ENABLE_PPS = 0x80043d04 + PTP_ENABLE_PPS2 = 0x80043d0d + PTP_EXTTS_REQUEST = 0x80103d02 + PTP_EXTTS_REQUEST2 = 0x80103d0b + PTP_MASK_CLEAR_ALL = 0x20003d13 + PTP_MASK_EN_SINGLE = 0x80043d14 + PTP_PEROUT_REQUEST = 0x80383d03 + PTP_PEROUT_REQUEST2 = 0x80383d0c + PTP_PIN_SETFUNC = 0x80603d07 + PTP_PIN_SETFUNC2 = 0x80603d10 + PTP_SYS_OFFSET = 0x83403d05 + PTP_SYS_OFFSET2 = 0x83403d0e PTRACE_GETFPAREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETFPREGS64 = 0x19 @@ -329,6 +351,8 @@ const ( RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f + SCM_DEVMEM_DMABUF = 0x58 + SCM_DEVMEM_LINEAR = 0x57 SCM_TIMESTAMPING = 0x23 SCM_TIMESTAMPING_OPT_STATS = 0x38 SCM_TIMESTAMPING_PKTINFO = 0x3c @@ -415,6 +439,9 @@ const ( SO_CNX_ADVICE = 0x37 SO_COOKIE = 0x3b SO_DETACH_REUSEPORT_BPF = 0x47 + SO_DEVMEM_DMABUF = 0x58 + SO_DEVMEM_DONTNEED = 0x59 + SO_DEVMEM_LINEAR = 0x57 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index da08b2ab3d..1ec2b1407b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -581,6 +581,8 @@ const ( AT_EMPTY_PATH = 0x1000 AT_REMOVEDIR = 0x200 RENAME_NOREPLACE = 1 << 0 + ST_RDONLY = 1 + ST_NOSUID = 2 ) const ( diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index ccb02f240a..24b346e1a3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 8b8bb28402..ebd213100b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 1b40b997b5..824b9c2d5e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index 08362c1ab7..4f178a2293 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 87d8612a1d..5cc1e8eb2f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -592,6 +592,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockSettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_SETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) if e1 != 0 { @@ -971,23 +981,6 @@ func Getpriority(which int, who int) (prio int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { @@ -2229,3 +2222,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mseal(b []byte, flags uint) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 9dc42410b7..1851df14e8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 41b5617316..0b43c69365 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 0d3a0751cd..e1ec0dbe4e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 4019a656f6..880c6d6e31 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index c39f7776db..7c8452a63e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index ac4af24f90..b8ef95b0fa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 57571d072f..2ffdf861f7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index f77d532121..2af3b5c762 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index e62963e67e..1da08d5267 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index fae140b62c..b7a251353b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 00831354c8..6e85b0aac9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 9d1e0ff06d..f15dadf055 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_mount(SB) + RET +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_nanosleep(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 79029ed584..28b487df25 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index da115f9a4b..1e7f321e43 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 53aef5dc58..524b0820cb 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -457,4 +457,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 71d524763d..f485dbf456 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -341,6 +341,7 @@ const ( SYS_STATX = 332 SYS_IO_PGETEVENTS = 333 SYS_RSEQ = 334 + SYS_URETPROBE = 335 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 @@ -379,4 +380,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index c747706131..70b35bf3b0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -421,4 +421,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index f96e214f6d..1893e2fe88 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -85,7 +85,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 @@ -324,4 +324,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 28425346cf..16a4017da0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -84,6 +84,8 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 + SYS_NEWFSTATAT = 79 + SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 SYS_FDATASYNC = 83 @@ -318,4 +320,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index d0953018da..7e567f1eff 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 295c7f4b81..38ae55e5ef 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1a9eaca7a..55e92e60a8 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index bec157c39f..60658d6a02 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 7ee7bdc435..e203e8a7ed 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -448,4 +448,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index fad1f25b44..5944b97d54 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 7d3e16357d..c66d416dad 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 0ed53ad9f7..a5459e766f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -84,7 +84,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 @@ -325,4 +325,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 2fba04ad50..01d86825bb 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -386,4 +386,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 621d00d741..7b703e77cd 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -399,4 +399,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 091d107f3a..17c53bd9b3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 @@ -449,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -467,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -499,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -544,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 28ff4ef74d..2392226a74 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 @@ -449,11 +462,14 @@ type FdSet struct { const ( SizeofIfMsghdr = 0x70 + SizeofIfMsghdr2 = 0xa0 SizeofIfData = 0x60 + SizeofIfData64 = 0x80 SizeofIfaMsghdr = 0x14 SizeofIfmaMsghdr = 0x10 SizeofIfmaMsghdr2 = 0x14 SizeofRtMsghdr = 0x5c + SizeofRtMsghdr2 = 0x5c SizeofRtMetrics = 0x38 ) @@ -467,6 +483,20 @@ type IfMsghdr struct { Data IfData } +type IfMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Snd_len int32 + Snd_maxlen int32 + Snd_drops int32 + Timer int32 + Data IfData64 +} + type IfData struct { Type uint8 Typelen uint8 @@ -499,6 +529,34 @@ type IfData struct { Reserved2 uint32 } +type IfData64 struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 +} + type IfaMsghdr struct { Msglen uint16 Version uint8 @@ -544,6 +602,21 @@ type RtMsghdr struct { Rmx RtMetrics } +type RtMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Flags int32 + Addrs int32 + Refcnt int32 + Parentflags int32 + Reserved int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + type RtMetrics struct { Locks uint32 Mtu uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 6cbd094a3a..51e13eb055 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -625,6 +625,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 7c03b6ee77..d002d8ef3c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -630,6 +630,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 422107ee8b..3f863d898d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -616,6 +616,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 505a12acfd..61c7293106 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -610,6 +610,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go index cc986c7900..b5d17414f0 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go @@ -612,6 +612,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 4740b83485..5537148dcb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -87,30 +87,35 @@ type StatxTimestamp struct { } type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - Mnt_id uint64 - Dio_mem_align uint32 - Dio_offset_align uint32 - _ [12]uint64 + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + Mnt_id uint64 + Dio_mem_align uint32 + Dio_offset_align uint32 + Subvol uint64 + Atomic_write_unit_min uint32 + Atomic_write_unit_max uint32 + Atomic_write_segments_max uint32 + _ [1]uint32 + _ [9]uint64 } type Fsid struct { @@ -515,6 +520,29 @@ type TCPInfo struct { Total_rto_time uint32 } +type TCPVegasInfo struct { + Enabled uint32 + Rttcnt uint32 + Rtt uint32 + Minrtt uint32 +} + +type TCPDCTCPInfo struct { + Enabled uint16 + Ce_state uint16 + Alpha uint32 + Ab_ecn uint32 + Ab_tot uint32 +} + +type TCPBBRInfo struct { + Bw_lo uint32 + Bw_hi uint32 + Min_rtt uint32 + Pacing_gain uint32 + Cwnd_gain uint32 +} + type CanFilter struct { Id uint32 Mask uint32 @@ -556,6 +584,7 @@ const ( SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc SizeofTCPInfo = 0xf8 + SizeofTCPCCInfo = 0x14 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -1723,12 +1752,6 @@ const ( IFLA_IPVLAN_UNSPEC = 0x0 IFLA_IPVLAN_MODE = 0x1 IFLA_IPVLAN_FLAGS = 0x2 - NETKIT_NEXT = -0x1 - NETKIT_PASS = 0x0 - NETKIT_DROP = 0x2 - NETKIT_REDIRECT = 0x7 - NETKIT_L2 = 0x0 - NETKIT_L3 = 0x1 IFLA_NETKIT_UNSPEC = 0x0 IFLA_NETKIT_PEER_INFO = 0x1 IFLA_NETKIT_PRIMARY = 0x2 @@ -1767,6 +1790,7 @@ const ( IFLA_VXLAN_DF = 0x1d IFLA_VXLAN_VNIFILTER = 0x1e IFLA_VXLAN_LOCALBYPASS = 0x1f + IFLA_VXLAN_LABEL_POLICY = 0x20 IFLA_GENEVE_UNSPEC = 0x0 IFLA_GENEVE_ID = 0x1 IFLA_GENEVE_REMOTE = 0x2 @@ -1796,6 +1820,8 @@ const ( IFLA_GTP_ROLE = 0x4 IFLA_GTP_CREATE_SOCKETS = 0x5 IFLA_GTP_RESTART_COUNT = 0x6 + IFLA_GTP_LOCAL = 0x7 + IFLA_GTP_LOCAL6 = 0x8 IFLA_BOND_UNSPEC = 0x0 IFLA_BOND_MODE = 0x1 IFLA_BOND_ACTIVE_SLAVE = 0x2 @@ -1828,6 +1854,7 @@ const ( IFLA_BOND_AD_LACP_ACTIVE = 0x1d IFLA_BOND_MISSED_MAX = 0x1e IFLA_BOND_NS_IP6_TARGET = 0x1f + IFLA_BOND_COUPLED_CONTROL = 0x20 IFLA_BOND_AD_INFO_UNSPEC = 0x0 IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 @@ -1896,6 +1923,7 @@ const ( IFLA_HSR_SEQ_NR = 0x5 IFLA_HSR_VERSION = 0x6 IFLA_HSR_PROTOCOL = 0x7 + IFLA_HSR_INTERLINK = 0x8 IFLA_STATS_UNSPEC = 0x0 IFLA_STATS_LINK_64 = 0x1 IFLA_STATS_LINK_XSTATS = 0x2 @@ -1948,6 +1976,15 @@ const ( IFLA_DSA_MASTER = 0x1 ) +const ( + NETKIT_NEXT = -0x1 + NETKIT_PASS = 0x0 + NETKIT_DROP = 0x2 + NETKIT_REDIRECT = 0x7 + NETKIT_L2 = 0x0 + NETKIT_L3 = 0x1 +) + const ( NF_INET_PRE_ROUTING = 0x0 NF_INET_LOCAL_IN = 0x1 @@ -2485,7 +2522,7 @@ type XDPMmapOffsets struct { type XDPUmemReg struct { Addr uint64 Len uint64 - Chunk_size uint32 + Size uint32 Headroom uint32 Flags uint32 Tx_metadata_len uint32 @@ -2557,8 +2594,8 @@ const ( SOF_TIMESTAMPING_BIND_PHC = 0x8000 SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 - SOF_TIMESTAMPING_LAST = 0x10000 - SOF_TIMESTAMPING_MASK = 0x1ffff + SOF_TIMESTAMPING_LAST = 0x20000 + SOF_TIMESTAMPING_MASK = 0x3ffff SCM_TSTAMP_SND = 0x0 SCM_TSTAMP_SCHED = 0x1 @@ -3473,7 +3510,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6 ) type FsverityDigest struct { @@ -3504,7 +3541,7 @@ type Nhmsg struct { type NexthopGrp struct { Id uint32 Weight uint8 - Resvd1 uint8 + High uint8 Resvd2 uint16 } @@ -3765,7 +3802,7 @@ const ( ETHTOOL_MSG_PSE_GET = 0x24 ETHTOOL_MSG_PSE_SET = 0x25 ETHTOOL_MSG_RSS_GET = 0x26 - ETHTOOL_MSG_USER_MAX = 0x2b + ETHTOOL_MSG_USER_MAX = 0x2d ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 @@ -3805,12 +3842,15 @@ const ( ETHTOOL_MSG_MODULE_NTF = 0x24 ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 - ETHTOOL_MSG_KERNEL_MAX = 0x2b + ETHTOOL_MSG_KERNEL_MAX = 0x2e + ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 + ETHTOOL_FLAG_OMIT_REPLY = 0x2 + ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_A_HEADER_UNSPEC = 0x0 ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 ETHTOOL_A_HEADER_FLAGS = 0x3 - ETHTOOL_A_HEADER_MAX = 0x3 + ETHTOOL_A_HEADER_MAX = 0x4 ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0 ETHTOOL_A_BITSET_BIT_INDEX = 0x1 ETHTOOL_A_BITSET_BIT_NAME = 0x2 @@ -3947,7 +3987,7 @@ const ( ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19 - ETHTOOL_A_COALESCE_MAX = 0x1c + ETHTOOL_A_COALESCE_MAX = 0x1e ETHTOOL_A_PAUSE_UNSPEC = 0x0 ETHTOOL_A_PAUSE_HEADER = 0x1 ETHTOOL_A_PAUSE_AUTONEG = 0x2 @@ -3975,7 +4015,7 @@ const ( ETHTOOL_A_TSINFO_TX_TYPES = 0x3 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 - ETHTOOL_A_TSINFO_MAX = 0x5 + ETHTOOL_A_TSINFO_MAX = 0x6 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_MAX = 0x1 @@ -3991,11 +4031,11 @@ const ( ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0 ETHTOOL_A_CABLE_RESULT_PAIR = 0x1 ETHTOOL_A_CABLE_RESULT_CODE = 0x2 - ETHTOOL_A_CABLE_RESULT_MAX = 0x2 + ETHTOOL_A_CABLE_RESULT_MAX = 0x3 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1 ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2 - ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2 + ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x3 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2 @@ -4078,6 +4118,107 @@ type EthtoolDrvinfo struct { Regdump_len uint32 } +type EthtoolTsInfo struct { + Cmd uint32 + So_timestamping uint32 + Phc_index int32 + Tx_types uint32 + Tx_reserved [3]uint32 + Rx_filters uint32 + Rx_reserved [3]uint32 +} + +type HwTstampConfig struct { + Flags int32 + Tx_type int32 + Rx_filter int32 +} + +const ( + HWTSTAMP_FILTER_NONE = 0x0 + HWTSTAMP_FILTER_ALL = 0x1 + HWTSTAMP_FILTER_SOME = 0x2 + HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3 + HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6 + HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9 + HWTSTAMP_FILTER_PTP_V2_EVENT = 0xc +) + +const ( + HWTSTAMP_TX_OFF = 0x0 + HWTSTAMP_TX_ON = 0x1 + HWTSTAMP_TX_ONESTEP_SYNC = 0x2 +) + +type ( + PtpClockCaps struct { + Max_adj int32 + N_alarm int32 + N_ext_ts int32 + N_per_out int32 + Pps int32 + N_pins int32 + Cross_timestamping int32 + Adjust_phase int32 + Max_phase_adj int32 + Rsv [11]int32 + } + PtpClockTime struct { + Sec int64 + Nsec uint32 + Reserved uint32 + } + PtpExttsEvent struct { + T PtpClockTime + Index uint32 + Flags uint32 + Rsv [2]uint32 + } + PtpExttsRequest struct { + Index uint32 + Flags uint32 + Rsv [2]uint32 + } + PtpPeroutRequest struct { + StartOrPhase PtpClockTime + Period PtpClockTime + Index uint32 + Flags uint32 + On PtpClockTime + } + PtpPinDesc struct { + Name [64]byte + Index uint32 + Func uint32 + Chan uint32 + Rsv [5]uint32 + } + PtpSysOffset struct { + Samples uint32 + Rsv [3]uint32 + Ts [51]PtpClockTime + } + PtpSysOffsetExtended struct { + Samples uint32 + Clockid int32 + Rsv [2]uint32 + Ts [25][3]PtpClockTime + } + PtpSysOffsetPrecise struct { + Device PtpClockTime + Realtime PtpClockTime + Monoraw PtpClockTime + Rsv [4]uint32 + } +) + +const ( + PTP_PF_NONE = 0x0 + PTP_PF_EXTTS = 0x1 + PTP_PF_PEROUT = 0x2 + PTP_PF_PHYSYNC = 0x3 +) + type ( HIDRawReportDescriptor struct { Size uint32 @@ -4259,6 +4400,7 @@ const ( type LandlockRulesetAttr struct { Access_fs uint64 Access_net uint64 + Scoped uint64 } type LandlockPathBeneathAttr struct { @@ -4605,7 +4747,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x14a + NL80211_ATTR_MAX = 0x14c NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -5209,7 +5351,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x20 + NL80211_FREQUENCY_ATTR_MAX = 0x21 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 15adc04142..ad05b51a60 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -727,6 +727,37 @@ const ( RISCV_HWPROBE_EXT_ZBA = 0x8 RISCV_HWPROBE_EXT_ZBB = 0x10 RISCV_HWPROBE_EXT_ZBS = 0x20 + RISCV_HWPROBE_EXT_ZICBOZ = 0x40 + RISCV_HWPROBE_EXT_ZBC = 0x80 + RISCV_HWPROBE_EXT_ZBKB = 0x100 + RISCV_HWPROBE_EXT_ZBKC = 0x200 + RISCV_HWPROBE_EXT_ZBKX = 0x400 + RISCV_HWPROBE_EXT_ZKND = 0x800 + RISCV_HWPROBE_EXT_ZKNE = 0x1000 + RISCV_HWPROBE_EXT_ZKNH = 0x2000 + RISCV_HWPROBE_EXT_ZKSED = 0x4000 + RISCV_HWPROBE_EXT_ZKSH = 0x8000 + RISCV_HWPROBE_EXT_ZKT = 0x10000 + RISCV_HWPROBE_EXT_ZVBB = 0x20000 + RISCV_HWPROBE_EXT_ZVBC = 0x40000 + RISCV_HWPROBE_EXT_ZVKB = 0x80000 + RISCV_HWPROBE_EXT_ZVKG = 0x100000 + RISCV_HWPROBE_EXT_ZVKNED = 0x200000 + RISCV_HWPROBE_EXT_ZVKNHA = 0x400000 + RISCV_HWPROBE_EXT_ZVKNHB = 0x800000 + RISCV_HWPROBE_EXT_ZVKSED = 0x1000000 + RISCV_HWPROBE_EXT_ZVKSH = 0x2000000 + RISCV_HWPROBE_EXT_ZVKT = 0x4000000 + RISCV_HWPROBE_EXT_ZFH = 0x8000000 + RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000 + RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000 + RISCV_HWPROBE_EXT_ZVFH = 0x40000000 + RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000 + RISCV_HWPROBE_EXT_ZFA = 0x100000000 + RISCV_HWPROBE_EXT_ZTSO = 0x200000000 + RISCV_HWPROBE_EXT_ZACAS = 0x400000000 + RISCV_HWPROBE_EXT_ZICOND = 0x800000000 + RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000 RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 @@ -734,4 +765,6 @@ const ( RISCV_HWPROBE_MISALIGNED_FAST = 0x3 RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 RISCV_HWPROBE_MISALIGNED_MASK = 0x7 + RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 + RISCV_HWPROBE_WHICH_CPUS = 0x1 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go index d9a13af468..2e5d5a4435 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go @@ -377,6 +377,12 @@ type Flock_t struct { Pid int32 } +type F_cnvrt struct { + Cvtcmd int32 + Pccsid int16 + Fccsid int16 +} + type Termios struct { Cflag uint32 Iflag uint32 diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index 115341fba6..4e613cf633 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) { return d, nil } -// MustLoadDLL is like LoadDLL but panics if load operation failes. +// MustLoadDLL is like LoadDLL but panics if load operation fails. func MustLoadDLL(name string) *DLL { d, e := LoadDLL(name) if e != nil { diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 6f7d2ac70a..b6e1ab76f8 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -894,7 +894,7 @@ type ACL struct { aclRevision byte sbz1 byte aclSize uint16 - aceCount uint16 + AceCount uint16 sbz2 uint16 } @@ -1087,6 +1087,27 @@ type EXPLICIT_ACCESS struct { Trustee TRUSTEE } +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header +type ACE_HEADER struct { + AceType uint8 + AceFlags uint8 + AceSize uint16 +} + +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace +type ACCESS_ALLOWED_ACE struct { + Header ACE_HEADER + Mask ACCESS_MASK + SidStart uint32 +} + +const ( + // Constants for AceType + // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header + ACCESS_ALLOWED_ACE_TYPE = 0 + ACCESS_DENIED_ACE_TYPE = 1 +) + // This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions. type TrusteeValue uintptr @@ -1158,6 +1179,7 @@ type OBJECTS_AND_NAME struct { //sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD //sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW +//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce // Control returns the security descriptor control bits. func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) { diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 6525c62f3c..4a32543868 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -17,8 +17,10 @@ import ( "unsafe" ) -type Handle uintptr -type HWND uintptr +type ( + Handle uintptr + HWND uintptr +) const ( InvalidHandle = ^Handle(0) @@ -166,6 +168,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) //sys DisconnectNamedPipe(pipe Handle) (err error) +//sys GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) +//sys GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState @@ -211,6 +215,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId +//sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW +//sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout +//sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout +//sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx //sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow //sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW //sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx @@ -307,6 +315,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition +//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP +//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP +//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP +//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole @@ -715,20 +727,12 @@ func DurationSinceBoot() time.Duration { } func Ftruncate(fd Handle, length int64) (err error) { - curoffset, e := Seek(fd, 0, 1) - if e != nil { - return e - } - defer Seek(fd, curoffset, 0) - _, e = Seek(fd, length, 0) - if e != nil { - return e + type _FILE_END_OF_FILE_INFO struct { + EndOfFile int64 } - e = SetEndOfFile(fd) - if e != nil { - return e - } - return nil + var info _FILE_END_OF_FILE_INFO + info.EndOfFile = length + return SetFileInformationByHandle(fd, FileEndOfFileInfo, (*byte)(unsafe.Pointer(&info)), uint32(unsafe.Sizeof(info))) } func Gettimeofday(tv *Timeval) (err error) { @@ -884,6 +888,11 @@ const socket_error = uintptr(^uint32(0)) //sys GetACP() (acp uint32) = kernel32.GetACP //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar //sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx +//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex +//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry +//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange +//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange +//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2 // For testing: clients can set this flag to force // creation of IPv6 sockets to return EAFNOSUPPORT. @@ -1368,9 +1377,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) } + func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) } + func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { return syscall.EWINDOWS } @@ -1673,13 +1684,16 @@ func (s NTStatus) Error() string { // do not use NTUnicodeString, and instead UTF16PtrFromString should be used for // the more common *uint16 string type. func NewNTUnicodeString(s string) (*NTUnicodeString, error) { - var u NTUnicodeString - s16, err := UTF16PtrFromString(s) + s16, err := UTF16FromString(s) if err != nil { return nil, err } - RtlInitUnicodeString(&u, s16) - return &u, nil + n := uint16(len(s16) * 2) + return &NTUnicodeString{ + Length: n - 2, // subtract 2 bytes for the NULL terminator + MaximumLength: n, + Buffer: &s16[0], + }, nil } // Slice returns a uint16 slice that aliases the data in the NTUnicodeString. diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index d8cb71db0a..9d138de5fe 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -176,6 +176,7 @@ const ( WAIT_FAILED = 0xFFFFFFFF // Access rights for process. + PROCESS_ALL_ACCESS = 0xFFFF PROCESS_CREATE_PROCESS = 0x0080 PROCESS_CREATE_THREAD = 0x0002 PROCESS_DUP_HANDLE = 0x0040 @@ -1060,6 +1061,7 @@ const ( SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15 // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 @@ -2003,7 +2005,21 @@ const ( MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 ) -const GAA_FLAG_INCLUDE_PREFIX = 0x00000010 +// Flags for GetAdaptersAddresses, see +// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses. +const ( + GAA_FLAG_SKIP_UNICAST = 0x1 + GAA_FLAG_SKIP_ANYCAST = 0x2 + GAA_FLAG_SKIP_MULTICAST = 0x4 + GAA_FLAG_SKIP_DNS_SERVER = 0x8 + GAA_FLAG_INCLUDE_PREFIX = 0x10 + GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20 + GAA_FLAG_INCLUDE_WINS_INFO = 0x40 + GAA_FLAG_INCLUDE_GATEWAYS = 0x80 + GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100 + GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200 + GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400 +) const ( IF_TYPE_OTHER = 1 @@ -2017,6 +2033,50 @@ const ( IF_TYPE_IEEE1394 = 144 ) +// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin +const ( + IpPrefixOriginOther = 0 + IpPrefixOriginManual = 1 + IpPrefixOriginWellKnown = 2 + IpPrefixOriginDhcp = 3 + IpPrefixOriginRouterAdvertisement = 4 + IpPrefixOriginUnchanged = 1 << 4 +) + +// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin +const ( + NlsoOther = 0 + NlsoManual = 1 + NlsoWellKnown = 2 + NlsoDhcp = 3 + NlsoLinkLayerAddress = 4 + NlsoRandom = 5 + IpSuffixOriginOther = 0 + IpSuffixOriginManual = 1 + IpSuffixOriginWellKnown = 2 + IpSuffixOriginDhcp = 3 + IpSuffixOriginLinkLayerAddress = 4 + IpSuffixOriginRandom = 5 + IpSuffixOriginUnchanged = 1 << 4 +) + +// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state +const ( + NldsInvalid = 0 + NldsTentative = 1 + NldsDuplicate = 2 + NldsDeprecated = 3 + NldsPreferred = 4 + IpDadStateInvalid = 0 + IpDadStateTentative = 1 + IpDadStateDuplicate = 2 + IpDadStateDeprecated = 3 + IpDadStatePreferred = 4 +) + type SocketAddress struct { Sockaddr *syscall.RawSockaddrAny SockaddrLength int32 @@ -2144,6 +2204,132 @@ const ( IfOperStatusLowerLayerDown = 7 ) +const ( + IF_MAX_PHYS_ADDRESS_LENGTH = 32 + IF_MAX_STRING_SIZE = 256 +) + +// MIB_IF_ENTRY_LEVEL enumeration from netioapi.h or +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/nf-netioapi-getifentry2ex. +const ( + MibIfEntryNormal = 0 + MibIfEntryNormalWithoutStatistics = 2 +) + +// MIB_NOTIFICATION_TYPE enumeration from netioapi.h or +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ne-netioapi-mib_notification_type. +const ( + MibParameterNotification = 0 + MibAddInstance = 1 + MibDeleteInstance = 2 + MibInitialNotification = 3 +) + +// MibIfRow2 stores information about a particular interface. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_row2. +type MibIfRow2 struct { + InterfaceLuid uint64 + InterfaceIndex uint32 + InterfaceGuid GUID + Alias [IF_MAX_STRING_SIZE + 1]uint16 + Description [IF_MAX_STRING_SIZE + 1]uint16 + PhysicalAddressLength uint32 + PhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 + PermanentPhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 + Mtu uint32 + Type uint32 + TunnelType uint32 + MediaType uint32 + PhysicalMediumType uint32 + AccessType uint32 + DirectionType uint32 + InterfaceAndOperStatusFlags uint8 + OperStatus uint32 + AdminStatus uint32 + MediaConnectState uint32 + NetworkGuid GUID + ConnectionType uint32 + TransmitLinkSpeed uint64 + ReceiveLinkSpeed uint64 + InOctets uint64 + InUcastPkts uint64 + InNUcastPkts uint64 + InDiscards uint64 + InErrors uint64 + InUnknownProtos uint64 + InUcastOctets uint64 + InMulticastOctets uint64 + InBroadcastOctets uint64 + OutOctets uint64 + OutUcastPkts uint64 + OutNUcastPkts uint64 + OutDiscards uint64 + OutErrors uint64 + OutUcastOctets uint64 + OutMulticastOctets uint64 + OutBroadcastOctets uint64 + OutQLen uint64 +} + +// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row. +type MibUnicastIpAddressRow struct { + Address RawSockaddrInet6 // SOCKADDR_INET union + InterfaceLuid uint64 + InterfaceIndex uint32 + PrefixOrigin uint32 + SuffixOrigin uint32 + ValidLifetime uint32 + PreferredLifetime uint32 + OnLinkPrefixLength uint8 + SkipAsSource uint8 + DadState uint32 + ScopeId uint32 + CreationTimeStamp Filetime +} + +const ScopeLevelCount = 16 + +// MIB_IPINTERFACE_ROW stores interface management information for a particular IP address family on a network interface. +// See https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipinterface_row. +type MibIpInterfaceRow struct { + Family uint16 + InterfaceLuid uint64 + InterfaceIndex uint32 + MaxReassemblySize uint32 + InterfaceIdentifier uint64 + MinRouterAdvertisementInterval uint32 + MaxRouterAdvertisementInterval uint32 + AdvertisingEnabled uint8 + ForwardingEnabled uint8 + WeakHostSend uint8 + WeakHostReceive uint8 + UseAutomaticMetric uint8 + UseNeighborUnreachabilityDetection uint8 + ManagedAddressConfigurationSupported uint8 + OtherStatefulConfigurationSupported uint8 + AdvertiseDefaultRoute uint8 + RouterDiscoveryBehavior uint32 + DadTransmits uint32 + BaseReachableTime uint32 + RetransmitTime uint32 + PathMtuDiscoveryTimeout uint32 + LinkLocalAddressBehavior uint32 + LinkLocalAddressTimeout uint32 + ZoneIndices [ScopeLevelCount]uint32 + SitePrefixLength uint32 + Metric uint32 + NlMtu uint32 + Connected uint8 + SupportsWakeUpPatterns uint8 + SupportsNeighborDiscovery uint8 + SupportsRouterDiscovery uint8 + ReachableTime uint32 + TransmitOffload uint32 + ReceiveOffload uint32 + DisableDefaultRoutes uint8 +} + // Console related constants used for the mode parameter to SetConsoleMode. See // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. @@ -3404,3 +3590,14 @@ type DCB struct { EvtChar byte wReserved1 uint16 } + +// Keyboard Layout Flags. +// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw +const ( + KLF_ACTIVATE = 0x00000001 + KLF_SUBSTITUTE_OK = 0x00000002 + KLF_REORDER = 0x00000008 + KLF_REPLACELANG = 0x00000010 + KLF_NOTELLSHELL = 0x00000080 + KLF_SETFORPROCESS = 0x00000100 +) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 9f73df75b5..01c0716c2c 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -91,6 +91,7 @@ var ( procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") procEqualSid = modadvapi32.NewProc("EqualSid") procFreeSid = modadvapi32.NewProc("FreeSid") + procGetAce = modadvapi32.NewProc("GetAce") procGetLengthSid = modadvapi32.NewProc("GetLengthSid") procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW") procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl") @@ -180,10 +181,15 @@ var ( procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") + procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2") procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex") + procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry") + procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange") + procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange") procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") @@ -246,7 +252,9 @@ var ( procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") @@ -272,8 +280,10 @@ var ( procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount") procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW") + procGetNamedPipeClientProcessId = modkernel32.NewProc("GetNamedPipeClientProcessId") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") + procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId") procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") procGetPriorityClass = modkernel32.NewProc("GetPriorityClass") procGetProcAddress = modkernel32.NewProc("GetProcAddress") @@ -346,8 +356,10 @@ var ( procSetCommMask = modkernel32.NewProc("SetCommMask") procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") + procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") + procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP") procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") @@ -477,12 +489,16 @@ var ( procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") + procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout") procGetShellWindow = moduser32.NewProc("GetShellWindow") procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") procIsWindow = moduser32.NewProc("IsWindow") procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") procIsWindowVisible = moduser32.NewProc("IsWindowVisible") + procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW") procMessageBoxW = moduser32.NewProc("MessageBoxW") + procToUnicodeEx = moduser32.NewProc("ToUnicodeEx") + procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout") procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock") procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") @@ -788,6 +804,14 @@ func FreeSid(sid *SID) (err error) { return } +func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { + r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetLengthSid(sid *SID) (len uint32) { r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) len = uint32(r0) @@ -1589,6 +1613,14 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si return } +func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { + r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) if r0 != 0 { @@ -1621,6 +1653,46 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { return } +func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { + r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { + r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { + var _p0 uint32 + if initialNotification { + _p0 = 1 + } + r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { + var _p0 uint32 + if initialNotification { + _p0 = 1 + } + r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func AddDllDirectory(path *uint16) (cookie uintptr, err error) { r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) cookie = uintptr(r0) @@ -2149,6 +2221,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { return } +func GetConsoleCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleMode(console Handle, mode *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) if r1 == 0 { @@ -2157,6 +2238,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { return } +func GetConsoleOutputCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { @@ -2358,6 +2448,14 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er return } +func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) if r1 == 0 { @@ -2374,6 +2472,14 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3 return } +func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { var _p0 uint32 if wait { @@ -3025,6 +3131,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { return } +func SetConsoleCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func setConsoleCursorPosition(console Handle, position uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) if r1 == 0 { @@ -3041,6 +3155,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { return } +func SetConsoleOutputCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetCurrentDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { @@ -4073,6 +4195,12 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { return } +func GetKeyboardLayout(tid uint32) (hkl Handle) { + r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) + hkl = Handle(r0) + return +} + func GetShellWindow() (shellWindow HWND) { r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) shellWindow = HWND(r0) @@ -4106,6 +4234,15 @@ func IsWindowVisible(hwnd HWND) (isVisible bool) { return } +func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) + hkl = Handle(r0) + if hkl == 0 { + err = errnoErr(e1) + } + return +} + func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) ret = int32(r0) @@ -4115,6 +4252,20 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i return } +func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { + r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) + ret = int32(r0) + return +} + +func UnloadKeyboardLayout(hkl Handle) (err error) { + r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) { var _p0 uint32 if inheritExisting { diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/term/LICENSE +++ b/vendor/golang.org/x/term/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/term/README.md b/vendor/golang.org/x/term/README.md index d03d0aefef..05ff623f94 100644 --- a/vendor/golang.org/x/term/README.md +++ b/vendor/golang.org/x/term/README.md @@ -4,16 +4,13 @@ This repository provides Go terminal and console support packages. -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/term`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. - ## Report Issues / Send Patches This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. +this repository, see https://go.dev/doc/contribute. + +The git repository is https://go.googlesource.com/term. The main issue tracker for the term repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the +https://go.dev/issues. Prefix your issue with "x/term:" in the subject line, so it is easy to find. diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go index 465f560604..df6bf948e1 100644 --- a/vendor/golang.org/x/term/term_windows.go +++ b/vendor/golang.org/x/term/term_windows.go @@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) { return nil, err } raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err } diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/text/LICENSE +++ b/vendor/golang.org/x/text/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/modules.txt b/vendor/modules.txt index b727e4b9b4..0064f0dcd6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -679,8 +679,8 @@ go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/internal/pool go.uber.org/zap/zapcore -# golang.org/x/crypto v0.24.0 -## explicit; go 1.18 +# golang.org/x/crypto v0.31.0 +## explicit; go 1.20 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish golang.org/x/crypto/pbkdf2 @@ -716,20 +716,20 @@ golang.org/x/net/netutil ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.7.0 +# golang.org/x/sync v0.10.0 ## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.21.0 +# golang.org/x/sys v0.28.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.21.0 +# golang.org/x/term v0.27.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.16.0 +# golang.org/x/text v0.21.0 ## explicit; go 1.18 golang.org/x/text/encoding golang.org/x/text/encoding/charmap From 046f30e84fdd30530e0a25d834bc89192d14e872 Mon Sep 17 00:00:00 2001 From: weizhoublue <45163302+weizhoublue@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:05:49 +0800 Subject: [PATCH 04/19] doc: subnet (#4385) * doc: subnet Signed-off-by: weizhou.lan@daocloud.io * doc: subnet Signed-off-by: weizhou.lan@daocloud.io * doc: subnet Signed-off-by: weizhou.lan@daocloud.io * doc: subnet Signed-off-by: weizhou.lan@daocloud.io * doc: subnet Signed-off-by: weizhou.lan@daocloud.io * doc: subnet Signed-off-by: weizhou.lan@daocloud.io --------- Signed-off-by: weizhou.lan@daocloud.io --- docs/usage/spider-subnet-zh_CN.md | 21 +++++++++++++++++---- docs/usage/spider-subnet.md | 19 ++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/docs/usage/spider-subnet-zh_CN.md b/docs/usage/spider-subnet-zh_CN.md index 70c47f151b..d57304ac4f 100644 --- a/docs/usage/spider-subnet-zh_CN.md +++ b/docs/usage/spider-subnet-zh_CN.md @@ -174,7 +174,7 @@ subnet-7 4 10.7.0.0/16 0 10 - `v1.multus-cni.io/default-network`:为应用创建一张默认网卡。 -```shell +```bash cat < ``` -### 固定 IP 池 IP 数量的动态扩缩容 +### 固定 IP 池的名字 + +固定 IP 池是根据应用自动创建的,因此需要一个唯一且可查询的名字。目前命名规则遵循以下格式:`auto{ipVersion}-{appName}-{NicName}-{Max5RandomCharacter}` + +- ipVersion:表示 IPv4 或者 IPv6 的池,值为 4 或者 6 +- appName:表示应用的名字 +- NicName:表示分配给 POD 的网卡名字 +- Max5RandomCharacter:表示从应用 UUID 中生成的 5 位随机字符串,用于区分不同应用的固定 IP 池 + +例如, 果你创建一个名为 nginx 的 deployment,其网卡名为 eth0,那么它的固定 IP 池名字为 `auto4-nginx-eth0-9a2b3` + +### 动态扩缩固定 IP 池 创建应用时指定了注解 `ipam.spidernet.io/ippool-ip-number`: '+1',其表示应用分配到的固定 IP 数量比应用的副本数多 1 个,在应用滚动更新时,能够避免旧 Pod 未删除,新 Pod 没有可用 IP 的问题。 @@ -304,7 +315,9 @@ auto4-test-app-1-eth0-a5bd3 4 10.6.0.0/16 3 4 ### 自动回收 IP 池 -创建应用时指定了注解 `ipam.spidernet.io/ippool-reclaim`,该注解默认值为 `true`,为 true 时,随着应用的删除,将自动删除对应的自动池。在本文中设置为 `false`,其表示删除应用时,自动创建的固定 IP 池会回收其中被分配的 IP ,但池不会被回收,并且当使用相同配置再次创建同名应用时,会自动继承该 IP 池。 +创建应用时指定了注解 `ipam.spidernet.io/ippool-reclaim`,该注解默认值为 `true`,为 true 时,随着应用的删除,将自动删除对应的自动池。在本文中设置为 `false`,其表示删除应用时,自动创建的固定 IP 池会回收其中被分配的 IP ,但池不会被回收。 + +对于需要保留池的应用场景,可以是当应用再次以同名的 deployment 或者 statefulset 来创建应用时,能够继续使用原有创建的 IP 池,以保持 IP 不变。 ```bash ~# kubectl delete deploy test-app-1 diff --git a/docs/usage/spider-subnet.md b/docs/usage/spider-subnet.md index ac6d95029f..7d7057fb2f 100644 --- a/docs/usage/spider-subnet.md +++ b/docs/usage/spider-subnet.md @@ -280,9 +280,20 @@ test-app-1-74cbbf654-7v54p 1/1 Running 0 7s 10.6.168.101 w test-app-1-74cbbf654-qzxp7 1/1 Running 0 7s 10.6.168.102 controller-node-1 ``` +### Fixed IP Pool Name + +Fixed IP pools are automatically created based on applications, so they need unique and easily queryable names. Currently, the naming convention follows this pattern: `auto{ipVersion}-{appName}-{NicName}-{Max5RandomCharacter}` + +- ipVersion: Indicates whether it's an IPv4 or IPv6 pool, value is either 4 or 6 +- appName: Represents the application name +- NicName: Represents the network interface name assigned to the POD +- Max5RandomCharacter: Represents a 5-character random string generated from the application's UUID to distinguish fixed IP pools of different applications + +For example: If you create a deployment named nginx with network interface eth0, its fixed IP pool name would be `auto4-nginx-eth0-9a2b3` + ### Dynamically scale fixed IP pools -。When creating the application, the annotation `ipam.spidernet.io/ippool-ip-number`: '+1' is specified to allocate one extra fixed IP compared to the number of replicas. This configuration prevents any issues during rolling updates, ensuring that new Pods have available IPs while the old Pods are not deleted yet. +When creating the application, the annotation `ipam.spidernet.io/ippool-ip-number`: '+1' is specified to allocate one extra fixed IP compared to the number of replicas. This configuration prevents any issues during rolling updates, ensuring that new Pods have available IPs while the old Pods are not deleted yet. Let's consider a scaling scenario where the replica count increases from 2 to 3. In this case, the two fixed IP pools associated with the application will automatically scale from 3 IPs to 4 IPs, maintaining one redundant IP address as expected: @@ -305,7 +316,9 @@ With the information mentioned, scaling the application in Spiderpool is as simp ### Automatically reclaim IP pools -During application creation, the annotation `ipam.spidernet.io/ippool-reclaim` is specified. Its default value of `true` indicates that when the application is deleted, the corresponding automatic pool is also removed. However, `false` in this case means that upon application deletion, the assigned IPs within the automatically created fixed IP pool will be reclaimed, while retaining the pool itself. Applications created with the same configuration and name will automatically inherited the IP pool. +During application creation, the annotation `ipam.spidernet.io/ippool-reclaim` is specified. Its default value of `true` indicates that when the application is deleted, the corresponding automatic pool is also removed. However, `false` in this case means that upon application deletion, the assigned IPs within the automatically created fixed IP pool will be reclaimed, while retaining the pool itself. + +For scenarios requiring pool retention, when the application is recreated with the same name as a deployment or statefulset, it can continue to use the previously created IP pool, maintaining IP consistency. ```bash ~# kubectl delete deploy test-app-1 @@ -374,7 +387,7 @@ spec: EOF ``` -During application creation, Spiderpool randomly selects IPs from the specified two Underlay subnets to create fixed IP pools. These pools are then associated with the two network interfaces of the application's Pods. Each network interface's fixed pool automatically inherits the gateway, routing, and other properties of its respective subnet. +When creating the application, Spiderpool randomly selects IPs from the specified two Underlay subnets to create fixed IP pools. These pools are then associated with the two network interfaces of the application's Pods. Each network interface's fixed pool automatically inherits the gateway, routing, and other properties of its respective subnet. ```bash ~# kubectl get spiderippool From f6666f919f6383721b4e77bb616d02d2d3e5af2d Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Mon, 16 Dec 2024 10:14:39 +0800 Subject: [PATCH 05/19] remove maintainer: ty-dc Signed-off-by: weizhou.lan@daocloud.io --- .github/ISSUE_TEMPLATE/ci-failure.yaml | 2 +- .github/ISSUE_TEMPLATE/usage.yaml | 2 +- .github/workflows/auto-diff-k8s-ci.yaml | 7 ++--- .github/workflows/auto-nightly-ci.yaml | 2 +- .github/workflows/auto-update-authors.yaml | 2 +- .github/workflows/auto-upgrade-ci.yaml | 2 +- .github/workflows/call-release-changelog.yaml | 2 +- .github/workflows/call-release-chart.yaml | 2 +- .github/workflows/call-release-doc.yaml | 4 +-- .github/workflows/call-release-version.yaml | 4 +-- .../workflows/call-update-githubpages.yaml | 2 +- .../workflows/update-cniplugins-version.yaml | 2 +- .github/workflows/update-golang-version.yaml | 2 +- CODEOWNERS | 28 +++++++++---------- MAINTAINERS.md | 1 - 15 files changed, 31 insertions(+), 33 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/ci-failure.yaml b/.github/ISSUE_TEMPLATE/ci-failure.yaml index f89c060140..e8c9e19cfe 100644 --- a/.github/ISSUE_TEMPLATE/ci-failure.yaml +++ b/.github/ISSUE_TEMPLATE/ci-failure.yaml @@ -1,7 +1,7 @@ name: CI failure description: Report continuously failing tests or jobs in CI labels: ["kind/ci-bug"] -assignees: ["ty-dc"] +assignees: ["cyclinder"] body: - type: textarea id: jobs diff --git a/.github/ISSUE_TEMPLATE/usage.yaml b/.github/ISSUE_TEMPLATE/usage.yaml index 5745e21715..be550c3cc1 100644 --- a/.github/ISSUE_TEMPLATE/usage.yaml +++ b/.github/ISSUE_TEMPLATE/usage.yaml @@ -1,7 +1,7 @@ name: Support description: Support request or question relating to Spiderpool labels: ["kind/support"] -assignees: ['ty-dc'] +assignees: ['cyclinder'] body: - type: markdown attributes: diff --git a/.github/workflows/auto-diff-k8s-ci.yaml b/.github/workflows/auto-diff-k8s-ci.yaml index 9c5147d0ae..e7614918de 100644 --- a/.github/workflows/auto-diff-k8s-ci.yaml +++ b/.github/workflows/auto-diff-k8s-ci.yaml @@ -6,10 +6,9 @@ env: CLUSTER_NAME: spider E2E_TIME_OUT: 60m PR_LABEL: pr/dependabot/github-actions, release/none - PR_REVIWER: weizhoublue, ty-dc + PR_REVIWER: weizhoublue, cyclinder # The range of K8s versions that matrix tests expect to run. All distributions larger than it will be picked to run. MINIMUM_K8S_VERSION: v1.21 - # TODO(ty-dc), refer: https://github.com/spidernet-io/spiderpool/issues/3937 # Currently using kind/node v1.31, it is not possible to setup kind cluster PENDING_K8S_VERSION: v1.31 K8S_MATRIX_FILE_PATH: .github/workflows/auto-diff-k8s-ci.yaml @@ -170,7 +169,7 @@ jobs: title: "robot updates kind node version in k8s matrix test" commit-message: "robot updates kind node version in k8s matrix test" branch-suffix: timestamp - committer: ty-dc + committer: weizhoublue branch: robot/update_doc delete-branch: true signoff: true @@ -217,7 +216,7 @@ jobs: body: | action url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} labels: "kind/ci-bug" - assignees: "ty-dc" + assignees: "weizhoublue" call_inputs_k8s: # workflow_dispatch event flow triggered by running the input k8s version diff --git a/.github/workflows/auto-nightly-ci.yaml b/.github/workflows/auto-nightly-ci.yaml index be49301c60..3efd2cd562 100644 --- a/.github/workflows/auto-nightly-ci.yaml +++ b/.github/workflows/auto-nightly-ci.yaml @@ -206,4 +206,4 @@ jobs: body: | action url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} labels: "kind/ci-bug" - assignees: "ty-dc" + assignees: "weizhoublue" diff --git a/.github/workflows/auto-update-authors.yaml b/.github/workflows/auto-update-authors.yaml index 4a573afe58..8a16edbb17 100644 --- a/.github/workflows/auto-update-authors.yaml +++ b/.github/workflows/auto-update-authors.yaml @@ -70,7 +70,7 @@ jobs: title: "robot updates Spiderpool authors on tag: ${{ env.REF }}" commit-message: "robot updates Spiderpool authors on tag: ${{ env.REF }}" branch-suffix: timestamp - committer: ty-dc + committer: weizhoublue branch: robot/update_doc delete-branch: true signoff: true diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index 6d69f102b2..f1cf9611eb 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -424,4 +424,4 @@ jobs: body: | action url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} labels: "kind/ci-bug" - assignees: "ty-dc" + assignees: "cyclinder" diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index aff3e6bd94..5c8407515a 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -144,7 +144,7 @@ jobs: with: title: "robot update changelog with tag ${{ needs.generate_changelog.outputs.dest_tag }} to branch ${{ env.DEST_BRANCH }} " commit-message: "robot update changelog from tag ${{ needs.generate_changelog.outputs.begin_tag }} to tag ${{ needs.generate_changelog.outputs.dest_tag }} " - committer: ty-dc + committer: weizhoublue branch-suffix: timestamp branch: robot/update_changelog delete-branch: true diff --git a/.github/workflows/call-release-chart.yaml b/.github/workflows/call-release-chart.yaml index 4ad76df0d3..c5ccdc1eb7 100644 --- a/.github/workflows/call-release-chart.yaml +++ b/.github/workflows/call-release-chart.yaml @@ -139,7 +139,7 @@ jobs: commit-message: "robot Update chart from ${{ needs.get_ref.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} " branch-suffix: timestamp branch: robot/update_chart - committer: ty-dc + committer: weizhoublue delete-branch: true base: ${{ env.MERGE_BRANCH }} signoff: true diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index 2961563bb9..7afab7d130 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -21,7 +21,7 @@ env: MERGE_BRANCH: github_pages DEV_DOC_DIRECTORY: dev PR_LABEL: pr/release/robot_update_githubpage - PR_REVIWER: ty-dc + PR_REVIWER: weizhoublue jobs: release_doc: @@ -176,7 +176,7 @@ jobs: title: "robot update website from ${{ needs.release_doc.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} with tag ${{ needs.release_doc.outputs.doc_tag }}" commit-message: "robot update website from ${{ needs.release_doc.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} with tag ${{ needs.release_doc.outputs.doc_tag }}" branch-suffix: timestamp - committer: ty-dc + committer: weizhoublue branch: robot/update_doc delete-branch: true base: ${{ env.MERGE_BRANCH }} diff --git a/.github/workflows/call-release-version.yaml b/.github/workflows/call-release-version.yaml index 53628816b7..f7ea3ea1c3 100644 --- a/.github/workflows/call-release-version.yaml +++ b/.github/workflows/call-release-version.yaml @@ -18,7 +18,7 @@ permissions: write-all env: PR_LABEL: pr/release/doc - PR_REVIWER: ty-dc + PR_REVIWER: weizhoublue jobs: release_notes: @@ -123,7 +123,7 @@ jobs: title: "robot updates the release version of the README file based on the release tag: ${{ env.REF }} " commit-message: "robot updates the release version of the README file based on the release tag: ${{ env.REF }}" branch-suffix: timestamp - committer: ty-dc + committer: weizhoublue branch: robot/update_doc delete-branch: true signoff: true diff --git a/.github/workflows/call-update-githubpages.yaml b/.github/workflows/call-update-githubpages.yaml index cd5ecd4741..8d0793dfc6 100644 --- a/.github/workflows/call-update-githubpages.yaml +++ b/.github/workflows/call-update-githubpages.yaml @@ -93,7 +93,7 @@ jobs: commit-message: "robot update chart and website from ${{ needs.prepare_doc.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} " branch-suffix: timestamp branch: robot/update_doc - committer: ty-dc + committer: weizhoublue delete-branch: true base: ${{ env.MERGE_BRANCH }} signoff: true diff --git a/.github/workflows/update-cniplugins-version.yaml b/.github/workflows/update-cniplugins-version.yaml index c49e2c1dda..66f5f373b6 100644 --- a/.github/workflows/update-cniplugins-version.yaml +++ b/.github/workflows/update-cniplugins-version.yaml @@ -44,7 +44,7 @@ jobs: commit-message: "robot updated CNI plugins version " branch-suffix: timestamp branch: robot/update_cni_version - committer: ty-dc + committer: weizhoublue delete-branch: true base: main signoff: true diff --git a/.github/workflows/update-golang-version.yaml b/.github/workflows/update-golang-version.yaml index afa57a19e0..f35505b31a 100644 --- a/.github/workflows/update-golang-version.yaml +++ b/.github/workflows/update-golang-version.yaml @@ -77,7 +77,7 @@ jobs: title: "robot updated golang version" commit-message: "robot updated golang version" branch: robot/update_golang_version - committer: ty-dc + committer: weizhoublue delete-branch: true base: main signoff: true diff --git a/CODEOWNERS b/CODEOWNERS index 6cbdb216d9..88e3d268a3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,28 +1,28 @@ -* @weizhoublue @cyclinder @ty-dc -/.github/ @weizhoublue @cyclinder @ty-dc +* @weizhoublue @cyclinder +/.github/ @weizhoublue @cyclinder /api/ @weizhoublue @cyclinder /charts/ @weizhoublue @cyclinder /cmd/ @weizhoublue @cyclinder /contrib/ @weizhoublue @cyclinder -/docs/ @weizhoublue @windsonsea @cyclinder @ty-dc +/docs/ @weizhoublue @windsonsea @cyclinder /images/ @weizhoublue @cyclinder -/pkg/ @weizhoublue @cyclinder @ty-dc @lou-lan -/test/ @weizhoublue @ty-dc @cyclinder -/test/e2e/ @weizhoublue @ty-dc -/test/doc/ @weizhoublue @ty-dc -/tools/ @weizhoublue @cyclinder @ty-dc +/pkg/ @weizhoublue @cyclinder @lou-lan +/test/ @weizhoublue @cyclinder +/test/e2e/ @weizhoublue +/test/doc/ @weizhoublue +/tools/ @weizhoublue @cyclinder /vendor/ @weizhoublue @cyclinder /.gitignore @weizhoublue /CODEOWNERS @weizhoublue @cyclinder /go.mod @weizhoublue @cyclinder /LICENSE @weizhoublue @cyclinder -/Makefile* @weizhoublue @cyclinder @ty-dc -/README.md @weizhoublue @cyclinder @ty-dc -/README-zh_CN.md @weizhoublue @cyclinder @ty-dc -/go.sum @weizhoublue @cyclinder @ty-dc +/Makefile* @weizhoublue @cyclinder +/README.md @weizhoublue @cyclinder +/README-zh_CN.md @weizhoublue @cyclinder +/go.sum @weizhoublue @cyclinder /VERSION @weizhoublue @cyclinder -/AUTHORS @weizhoublue @cyclinder @ty-dc -/.licenserc.yaml @weizhoublue @cyclinder @ty-dc +/AUTHORS @weizhoublue @cyclinder +/.licenserc.yaml @weizhoublue @cyclinder /codecov.yml @weizhoublue /.golangci.yaml @weizhoublue /MAINTAINERS.md @weizhoublue @cyclinder diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 5d376cdaad..48c30af272 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -11,7 +11,6 @@ Please see the [AUTHORS](./AUTHORS) file for the full list of contributors to th | [Weizhou Lan](https://github.com/weizhoublue) | Daocloud | | [Cyclinder](https://github.com/cyclinder ) | Daocloud | | [Michael](https://github.com/windsonsea) | Daocloud | -| [Tao Yang](https://github.com/ty-dc) | Daocloud | | [Kai Yan](https://github.com/yankay) | Daocloud | | [Peter Pan](https://github.com/panpan0000) | Daocloud | | [computingpower2024](617239166@qq.com) | Computer Power team | From 2092fd54cec9b24a2626c46f5ea3a291cab401d4 Mon Sep 17 00:00:00 2001 From: weizhoublue <45163302+weizhoublue@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:01:08 +0000 Subject: [PATCH 06/19] robot updated CNI plugins version Signed-off-by: ty-dc --- images/spiderpool-plugins/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/spiderpool-plugins/version.sh b/images/spiderpool-plugins/version.sh index afbd4fd8be..46a883dfb4 100644 --- a/images/spiderpool-plugins/version.sh +++ b/images/spiderpool-plugins/version.sh @@ -8,7 +8,7 @@ # https://github.com/containernetworking/plugins export CNI_VERSION=${CNI_VERSION:-"v1.6.1"} # https://github.com/k8snetworkplumbingwg/ovs-cni -export OVS_VERSION=${OVS_VERSION:-"v0.36.0"} +export OVS_VERSION=${OVS_VERSION:-"v0.37.0"} # https://github.com/k8snetworkplumbingwg/rdma-cni export RDMA_VERSION=${RDMA_VERSION:-"v1.2.0"} # https://github.com/k8snetworkplumbingwg/sriov-cni From e3b5365625847fd570982ca2541a5cdd4e0ad2ac Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Wed, 18 Dec 2024 11:48:41 +0800 Subject: [PATCH 07/19] ci fix: fails to run ovs Signed-off-by: weizhou.lan@daocloud.io --- test/scripts/install-ovs.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/test/scripts/install-ovs.sh b/test/scripts/install-ovs.sh index 5be9e212a4..229684664d 100644 --- a/test/scripts/install-ovs.sh +++ b/test/scripts/install-ovs.sh @@ -58,6 +58,18 @@ fi echo -e "\033[35m Succeed to create vlan interface: ${HOST_ADDITIONAL_INTERFACE}.${VLAN30}、 ${HOST_ADDITIONAL_INTERFACE}.${VLAN40} in kind-node ${VLAN_GATEWAY_CONTAINER} \033[0m" + +# https://github.com/antrea-io/antrea/issues/51 +# fix: it possibley fails to insmod openvswitch.ko in the container in some OS version +# so it could load the ko in the host os in advance to make sure the ovs service could be started in the container +echo "=========install openvswitch in host os" +sudo apt-get update +sudo apt-get install -y openvswitch-switch +sudo modinfo openvswitch +sudo systemctl start openvswitch-switch || true + +echo "========= install ovs in container " + KIND_NODES=$(kind get nodes --name ${E2E_CLUSTER_NAME}) for NODE in $KIND_NODES; do echo "=========connect node ${NODE} to additional docker network ${DOCKER_ADDITIONAL_NETWORK}" @@ -66,13 +78,13 @@ for NODE in $KIND_NODES; do install_openvswitch() { for attempt in {1..5}; do echo "Attempt $attempt to install openvswitch on ${NODE}..." - if ! docker exec ${NODE} apt-get update > /dev/null; then + if ! docker exec ${NODE} apt-get update ; then echo "Failed to update package list on ${NODE}, retrying in 10s..." sleep 10 continue fi - if ! docker exec ${NODE} apt-get install -y openvswitch-switch > /dev/null; then + if ! docker exec ${NODE} apt-get install -y openvswitch-switch ; then echo "Failed to install openvswitch on ${NODE}, retrying in 10s..." sleep 10 continue @@ -88,7 +100,11 @@ for NODE in $KIND_NODES; do echo "=========install openvswitch" install_openvswitch - docker exec ${NODE} systemctl start openvswitch-switch + + echo "start ovs service and add bridge" + { docker exec ${NODE} systemctl start openvswitch-switch ; } \ + || { docker exec ${NODE} journalctl -xe ; docker exec ${NODE} systemctl status openvswitch-switch ; docker exec ${NODE} journalctl -u openvswitch-switch ; exit 1 ; } + docker exec ${NODE} ovs-vsctl add-br ${BRIDGE_INTERFACE} docker exec ${NODE} ovs-vsctl add-port ${BRIDGE_INTERFACE} ${HOST_ADDITIONAL_INTERFACE} From bbd4792e84a0c9d932d0123f572217efdf12640d Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Tue, 17 Dec 2024 13:46:48 +0800 Subject: [PATCH 08/19] chart: update plugins image Signed-off-by: weizhou.lan@daocloud.io --- charts/spiderpool/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spiderpool/values.yaml b/charts/spiderpool/values.yaml index f62de605fe..c355f4486c 100644 --- a/charts/spiderpool/values.yaml +++ b/charts/spiderpool/values.yaml @@ -302,7 +302,7 @@ plugins: digest: "" ## @param plugins.image.tag the image tag of plugins - tag: 82659d90cae0d6a5169eac2869e47c989932d775 + tag: 27c4f118b1cec3773f2679b772e7583fc77e5686 ## @param plugins.image.imagePullSecrets the image imagePullSecrets of plugins imagePullSecrets: [] From dbaf4cfd0bd1184c67dd6f0d16dbc9afedc2e660 Mon Sep 17 00:00:00 2001 From: "weizhou.lan@daocloud.io" Date: Tue, 17 Dec 2024 13:48:18 +0800 Subject: [PATCH 09/19] chart: update plugins image Signed-off-by: weizhou.lan@daocloud.io --- charts/spiderpool/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spiderpool/README.md b/charts/spiderpool/README.md index 1cfb0f2042..780c3b59e4 100644 --- a/charts/spiderpool/README.md +++ b/charts/spiderpool/README.md @@ -222,7 +222,7 @@ helm install spiderpool spiderpool/spiderpool --wait --namespace kube-system \ | `plugins.image.repository` | the image repository of plugins | `spidernet-io/spiderpool/spiderpool-plugins` | | `plugins.image.pullPolicy` | the image pullPolicy of plugins | `IfNotPresent` | | `plugins.image.digest` | the image digest of plugins | `""` | -| `plugins.image.tag` | the image tag of plugins | `82659d90cae0d6a5169eac2869e47c989932d775` | +| `plugins.image.tag` | the image tag of plugins | `27c4f118b1cec3773f2679b772e7583fc77e5686` | | `plugins.image.imagePullSecrets` | the image imagePullSecrets of plugins | `[]` | ### clusterDefaultPool parameters From b81b3a3eec5df9957079327770c0312be456c470 Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Mon, 16 Dec 2024 19:10:32 +0800 Subject: [PATCH 10/19] e2e: fix openkruise installtion and debug ovs installtion Signed-off-by: Cyclinder Kuo --- Makefile | 9 +++++---- test/Makefile | 6 +++++- test/Makefile.defs | 4 +++- test/scripts/install-ovs.sh | 32 +++++++++++++++++++------------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 2d80b2e872..c751d0f246 100644 --- a/Makefile +++ b/Makefile @@ -324,17 +324,18 @@ e2e_init_spiderpool: .PHONY: e2e_init_cilium_ebpfservice e2e_init_cilium_ebpfservice: - $(QUIET) make e2e_init -e INSTALL_OVERLAY_CNI=true -e INSTALL_CALICO=false -e INSTALL_CILIUM=true -e DISABLE_KUBE_PROXY=true -e E2E_SPIDERPOOL_ENABLE_SUBNET=false + $(QUIET) make e2e_init -e INSTALL_OVERLAY_CNI=true -e INSTALL_CALICO=false -e INSTALL_CILIUM=true -e DISABLE_KUBE_PROXY=true \ + -e E2E_SPIDERPOOL_ENABLE_SUBNET=false -e INSTALL_OVS=false .PHONY: e2e_init_calico e2e_init_calico: $(QUIET) make e2e_init -e INSTALL_OVERLAY_CNI=true -e INSTALL_CALICO=true -e INSTALL_CILIUM=false -e E2E_SPIDERPOOL_ENABLE_SUBNET=false \ - E2E_SPIDERPOOL_ENABLE_DRA=true + -e E2E_SPIDERPOOL_ENABLE_DRA=true -e INSTALL_OVS=false .PHONY: e2e_init_cilium_legacyservice e2e_init_cilium_legacyservice: - $(QUIET) make e2e_init -e INSTALL_OVERLAY_CNI=true -e INSTALL_CALICO=false -e INSTALL_CILIUM=true -e DISABLE_KUBE_PROXY=false -e E2E_SPIDERPOOL_ENABLE_SUBNET=false - + $(QUIET) make e2e_init -e INSTALL_OVERLAY_CNI=true -e INSTALL_CALICO=false -e INSTALL_CILIUM=true -e DISABLE_KUBE_PROXY=false \ + -e E2E_SPIDERPOOL_ENABLE_SUBNET=false -e INSTALL_OVS=false .PHONY: e2e_test e2e_test: diff --git a/test/Makefile b/test/Makefile index 5263570b45..4cff895cfa 100644 --- a/test/Makefile +++ b/test/Makefile @@ -225,7 +225,11 @@ setup_kruise: docker pull $${IMAGE} ; \ kind load docker-image $${IMAGE} --name $(E2E_CLUSTER_NAME); \ done; \ - helm upgrade --install kruise openkruise/kruise --wait --timeout 20m --debug --set manager.image.repository=$(E2E_OPENKRUISE_IMAGE) \ + HELM_OPTION=" --wait --timeout 20m --debug --set manager.image.repository=$(E2E_OPENKRUISE_IMAGE) " ; \ + # openkruise failed to run with 1.7.3, see + # https://github.com/spidernet-io/spiderpool/issues/4396 + HELM_OPTION+=" --version $(E2E_OPENKRUISE_VERSION) " ; \ + helm upgrade --install kruise openkruise/kruise $${HELM_OPTION} \ --kubeconfig $(E2E_KUBECONFIG) || { KIND_CLUSTER_NAME=$(E2E_CLUSTER_NAME) ./scripts/debugEnv.sh $(E2E_KUBECONFIG) "detail" "$(E2E_LOG_FILE)" ; exit 1 ; } ; \ .PHONY: setup_spiderpool diff --git a/test/Makefile.defs b/test/Makefile.defs index c1e1761007..edb436cf86 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -190,7 +190,9 @@ E2E_LOG_FILE ?= $(ROOT_DIR)/test/e2edebugLog.txt E2E_UNINSTALL_LOG_FILE ?= $(ROOT_DIR)/test/e2e-uninstall-debugLog.txt #========= openkruise ========= - +# openkruise failed to run with 1.7.3, see +# https://github.com/spidernet-io/spiderpool/issues/4396 +E2E_OPENKRUISE_VERSION := 1.7.2 ifeq ($(E2E_CHINA_IMAGE_REGISTRY),true) E2E_OPENKRUISE_IMAGE ?= docker.m.daocloud.io/openkruise/kruise-manager else diff --git a/test/scripts/install-ovs.sh b/test/scripts/install-ovs.sh index 229684664d..03c95289f6 100644 --- a/test/scripts/install-ovs.sh +++ b/test/scripts/install-ovs.sh @@ -5,7 +5,7 @@ set -o errexit -o nounset -o pipefail -CURRENT_FILENAME=$( basename $0 ) +CURRENT_FILENAME=$(basename $0) [ -z "${HTTP_PROXY}" ] || export https_proxy=${HTTP_PROXY} @@ -25,7 +25,10 @@ echo "$CURRENT_FILENAME : HOST_ADDITIONAL_INTERFACE $HOST_ADDITIONAL_INTERFACE " echo "try to add secondary network nic for ovs bridge preparation" if ! docker network ls | grep -q "${DOCKER_ADDITIONAL_NETWORK}"; then echo "Docker network ${DOCKER_ADDITIONAL_NETWORK} does not exist, creating it..." - docker network create ${DOCKER_ADDITIONAL_NETWORK} --driver bridge || { echo "Failed to create Docker network"; exit 1; } + docker network create ${DOCKER_ADDITIONAL_NETWORK} --driver bridge || { + echo "Failed to create Docker network" + exit 1 + } else echo "Docker network ${DOCKER_ADDITIONAL_NETWORK} already exists." fi @@ -53,17 +56,16 @@ elif [ ${E2E_IP_FAMILY} == "dual" ]; then docker exec ${VLAN_GATEWAY_CONTAINER} ip addr add fd00:172:30::1/64 dev ${HOST_ADDITIONAL_INTERFACE}.${VLAN30} docker exec ${VLAN_GATEWAY_CONTAINER} ip addr add fd00:172:40::1/64 dev ${HOST_ADDITIONAL_INTERFACE}.${VLAN40} else - echo "error ip family, the value of IP_FAMILY must be of ipv4,ipv6 or dual." && exit 1 + echo "error ip family, the value of IP_FAMILY must be of ipv4,ipv6 or dual." && exit 1 fi echo -e "\033[35m Succeed to create vlan interface: ${HOST_ADDITIONAL_INTERFACE}.${VLAN30}、 ${HOST_ADDITIONAL_INTERFACE}.${VLAN40} in kind-node ${VLAN_GATEWAY_CONTAINER} \033[0m" - # https://github.com/antrea-io/antrea/issues/51 # fix: it possibley fails to insmod openvswitch.ko in the container in some OS version # so it could load the ko in the host os in advance to make sure the ovs service could be started in the container echo "=========install openvswitch in host os" -sudo apt-get update +sudo apt-get update sudo apt-get install -y openvswitch-switch sudo modinfo openvswitch sudo systemctl start openvswitch-switch || true @@ -78,18 +80,18 @@ for NODE in $KIND_NODES; do install_openvswitch() { for attempt in {1..5}; do echo "Attempt $attempt to install openvswitch on ${NODE}..." - if ! docker exec ${NODE} apt-get update ; then + if ! docker exec ${NODE} apt-get update; then echo "Failed to update package list on ${NODE}, retrying in 10s..." sleep 10 continue fi - - if ! docker exec ${NODE} apt-get install -y openvswitch-switch ; then + + if ! docker exec ${NODE} apt-get install -y openvswitch-switch; then echo "Failed to install openvswitch on ${NODE}, retrying in 10s..." sleep 10 continue fi - + echo "Succeed to install openvswitch on ${NODE}" return 0 done @@ -97,13 +99,18 @@ for NODE in $KIND_NODES; do echo "Error: Failed to install openvswitch on ${NODE} after 5 attempts." >&2 return 1 } - + echo "=========install openvswitch" install_openvswitch echo "start ovs service and add bridge" - { docker exec ${NODE} systemctl start openvswitch-switch ; } \ - || { docker exec ${NODE} journalctl -xe ; docker exec ${NODE} systemctl status openvswitch-switch ; docker exec ${NODE} journalctl -u openvswitch-switch ; exit 1 ; } + { docker exec ${NODE} systemctl start openvswitch-switch; } || + { + docker exec ${NODE} journalctl -xe + docker exec ${NODE} systemctl status openvswitch-switch + docker exec ${NODE} journalctl -u openvswitch-switch + exit 1 + } docker exec ${NODE} ovs-vsctl add-br ${BRIDGE_INTERFACE} docker exec ${NODE} ovs-vsctl add-port ${BRIDGE_INTERFACE} ${HOST_ADDITIONAL_INTERFACE} @@ -139,4 +146,3 @@ for NODE in $KIND_NODES; do done echo -e "\033[35m Succeed to install openvswitch \033[0m" - From c09e9cb119b2c7218abe41349e7af738a1e6448f Mon Sep 17 00:00:00 2001 From: lou-lan Date: Fri, 20 Dec 2024 19:10:04 +0800 Subject: [PATCH 11/19] Add cluster dropdown menu for grafana dashboard Signed-off-by: lou-lan --- charts/spiderpool/files/grafana-ipam.json | 836 ++++++++++++++++++ .../files/grafana-rdma-cluster.json | 117 ++- .../spiderpool/files/grafana-rdma-node.json | 95 +- charts/spiderpool/files/grafana-rdma-pod.json | 163 ++-- .../files/grafana-rdma-workload.json | 94 +- .../templates/grafanaDashboard.yaml | 743 +--------------- 6 files changed, 1178 insertions(+), 870 deletions(-) create mode 100644 charts/spiderpool/files/grafana-ipam.json diff --git a/charts/spiderpool/files/grafana-ipam.json b/charts/spiderpool/files/grafana-ipam.json new file mode 100644 index 0000000000..f97dc4de76 --- /dev/null +++ b/charts/spiderpool/files/grafana-ipam.json @@ -0,0 +1,836 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 24, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 6, + "panels": [], + "title": "Row title", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.3.14", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_total_ippool_counts{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "total ippool counts", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 20, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.3.14", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_total_subnet_counts{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "total subnet counts", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "spiderpool IPAM IP allocation status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 10, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_counts_total{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "builder", + "expr": "spiderpool_ipam_allocation_failure_counts_total", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "IP allocation counts", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 10, + "y": 8 + }, + "id": 10, + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_average_duration_seconds{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_max_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_min_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_latest_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "D" + } + ], + "title": "ip allocation durations", + "type": "state-timeline" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 6, + "x": 18, + "y": 8 + }, + "id": 12, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_allocation_duration_seconds_bucket{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "ip allocation duration distribution", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "spiderpool IP release and IP GC status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 10, + "x": 0, + "y": 17 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_counts_total{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_failure_counts_total{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "builder", + "expr": "spiderpool_ip_gc_counts_total", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ip_gc_failure_counts_total{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "D" + } + ], + "title": "IP release&GC counts", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 10, + "y": 17 + }, + "id": 14, + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_average_duration_seconds{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_max_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_min_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_latest_duration_seconds{cluster=~\"$cluster\"}", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "D" + } + ], + "title": "IP release durations", + "type": "state-timeline" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 17 + }, + "id": 16, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "spiderpool_ipam_release_duration_seconds_bucket{cluster=~\"$cluster\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "IP release duration distribution", + "type": "piechart" + } + ], + "refresh": false, + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 2, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info, cluster_name)", + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(global_cluster_info, cluster_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Spiderpool", + "uid": "5FAGqFE4z", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/charts/spiderpool/files/grafana-rdma-cluster.json b/charts/spiderpool/files/grafana-rdma-cluster.json index 8ea8f311d9..84d5fbe519 100644 --- a/charts/spiderpool/files/grafana-rdma-cluster.json +++ b/charts/spiderpool/files/grafana-rdma-cluster.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 10, + "id": 23, "links": [], "liveNow": false, "panels": [ @@ -97,7 +97,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "count(count(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}) by (node_name))", + "expr": "count(count(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}) by (node_name))", "legendFormat": "__auto", "range": true, "refId": "A" @@ -162,7 +162,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "count(count(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}) by (pod_name))", + "expr": "count(count(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}) by (pod_name))", "legendFormat": "__auto", "range": true, "refId": "A" @@ -282,7 +282,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(\n rate(rdma_rx_vport_rdma_unicast_bytes_total{is_root=\"true\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{is_root=\"true\"}[5m])\n)", + "expr": "sum(\n rate(rdma_rx_vport_rdma_unicast_bytes_total{is_root=\"true\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{is_root=\"true\",cluster=~\"$cluster\"}[5m])\n)", "legendFormat": "Read", "range": true, "refId": "A" @@ -406,7 +406,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(\n rate(rdma_tx_vport_rdma_unicast_bytes_total{is_root=\"true\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{is_root=\"true\"}[5m])\n)", + "expr": "sum(\n rate(rdma_tx_vport_rdma_unicast_bytes_total{is_root=\"true\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{is_root=\"true\",cluster=~\"$cluster\"}[5m])\n)", "legendFormat": "Write", "range": true, "refId": "A" @@ -526,7 +526,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total[5m])\n)", + "expr": "sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[5m])\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -582,10 +582,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, @@ -650,7 +646,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total[5m])\n)", + "expr": "sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[5m])\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -770,7 +766,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{}[3m]) + rate(rdma_rx_vport_rdma_multicast_bytes_total[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\"} * 1000000 / 8) * 100", + "expr": "sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[3m]) + rate(rdma_rx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "legendFormat": "__auto", "range": true, "refId": "A" @@ -890,7 +886,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{}[3m]) + rate(rdma_tx_vport_rdma_multicast_bytes_total[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\"} * 1000000 / 8) * 100", + "expr": "sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[3m]) + rate(rdma_tx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "legendFormat": "__auto", "range": true, "refId": "A" @@ -957,8 +953,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1027,7 +1022,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total[5m])\n )\n)", + "expr": "topk(\n 10,\n sum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[5m])\n )\n)", "legendFormat": "{{node_name}}", "range": true, "refId": "A" @@ -1081,8 +1076,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1151,7 +1145,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total[5m])\n )\n)", + "expr": "topk(\n 10,\n sum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[5m])\n )\n)", "legendFormat": "{{node_name}}", "range": true, "refId": "A" @@ -1205,8 +1199,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1271,7 +1264,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\nsum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{}[3m]) + rate(rdma_rx_vport_rdma_multicast_bytes_total[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\"} * 1000000 / 8) * 100\n)", + "expr": "topk(\n 10,\nsum by (node_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[3m]) + rate(rdma_rx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -1325,8 +1318,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1391,7 +1383,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\nsum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{}[3m]) + rate(rdma_tx_vport_rdma_multicast_bytes_total[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\"} * 1000000 / 8) * 100\n)", + "expr": "topk(\n 10,\nsum by (node_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}[3m]) + rate(rdma_tx_vport_rdma_multicast_bytes_total{cluster=~\"$cluster\"}[3m])\n)\n/ sum by (node_name) (rdma_vport_speed_mbps_total{is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -1445,8 +1437,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1515,7 +1506,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (pod_name) (\n (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\"}[5m])\n )\n )\n)", + "expr": "topk(\n 10,\n sum by (pod_name) (\n (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m])\n )\n )\n)", "legendFormat": "{{node_name}}", "range": true, "refId": "A" @@ -1569,8 +1560,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1624,7 +1614,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (pod_name) (\n (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\"}[5m])\n )\n )\n)", + "expr": "topk(\n 10,\n sum by (pod_name) (\n (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m])\n )\n )\n)", "legendFormat": "{{node_name}}", "range": true, "refId": "A" @@ -1678,8 +1668,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1748,7 +1737,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (owner_kind,owner_namespace,owner_name) (\n (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\"}[5m])\n )\n )\n)", + "expr": "topk(\n 10,\n sum by (owner_kind,owner_namespace,owner_name) (\n (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m])\n )\n )\n)", "legendFormat": "{{owner_kind}} - {{owner_namespace}}/{{owner_name}}", "range": true, "refId": "A" @@ -1802,8 +1791,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1872,7 +1860,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (owner_kind,owner_namespace,owner_name) (\n (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\"}[5m])\n )\n )\n)", + "expr": "topk(\n 10,\n sum by (owner_kind,owner_namespace,owner_name) (\n (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\",cluster=~\"$cluster\"}[5m])\n )\n )\n)", "legendFormat": "{{owner_kind}} - {{owner_namespace}}/{{owner_name}}", "range": true, "refId": "A" @@ -1905,6 +1893,61 @@ "regex": "", "skipUrlSync": false, "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info, cluster_name)", + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(global_cluster_info, cluster_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" } ] }, diff --git a/charts/spiderpool/files/grafana-rdma-node.json b/charts/spiderpool/files/grafana-rdma-node.json index b75fa5b607..46a1457269 100644 --- a/charts/spiderpool/files/grafana-rdma-node.json +++ b/charts/spiderpool/files/grafana-rdma-node.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 7, + "id": 22, "links": [], "liveNow": false, "panels": [ @@ -140,7 +140,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (rdma_parent_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{node_name=~\"$node\"}[1m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{node_name=~\"$node\"}[1m])\n)", + "expr": "sum by (rdma_parent_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m])\n)", "legendFormat": "{{net_dev_name}}", "range": true, "refId": "A" @@ -248,7 +248,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (rdma_parent_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{node_name=~\"$node\"}[1m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{node_name=~\"$node\"}[1m])\n)", + "expr": "sum by (rdma_parent_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m])\n)", "legendFormat": "{{net_dev_name}}", "range": true, "refId": "A" @@ -339,7 +339,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (rdma_parent_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{node_name=~\"$node\"}[1m])\n)\n/ sum by (rdma_parent_name) (rdma_vport_speed_mbps_total{node_name=~\"$node\", is_root=\"true\"} * 1000000 / 8) * 100", + "expr": "sum by (rdma_parent_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m])\n)\n/ sum by (rdma_parent_name) (rdma_vport_speed_mbps_total{node_name=~\"$node\", is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "legendFormat": "__auto", "range": true, "refId": "A" @@ -431,7 +431,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (rdma_parent_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{node_name=~\"$node\"}[1m])\n)\n/ sum by (rdma_parent_name) (rdma_vport_speed_mbps_total{node_name=~\"$node\", is_root=\"true\"} * 1000000 / 8) * 100", + "expr": "sum by (rdma_parent_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{node_name=~\"$node\",cluster=~\"$cluster\"}[1m])\n)\n/ sum by (rdma_parent_name) (rdma_vport_speed_mbps_total{node_name=~\"$node\", is_root=\"true\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "legendFormat": "__auto", "range": true, "refId": "A" @@ -564,7 +564,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name=\"\", node_name=~\"$node\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name=\"\", node_name=~\"$node\"}[$__rate_interval])", + "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])", "legendFormat": "{{net_dev_name}}", "range": true, "refId": "A" @@ -653,7 +653,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name=\"\", node_name=~\"$node\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name=\"\", node_name=~\"$node\"}[$__rate_interval])", + "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])", "legendFormat": "{{net_dev_name}}", "range": true, "refId": "A" @@ -720,7 +720,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -754,7 +755,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval])", + "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])", "legendFormat": "{{ifname}}", "range": true, "refId": "A" @@ -808,7 +809,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -842,7 +844,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval])", + "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval]) +\nrate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])", "legendFormat": "{{ifname}}", "range": true, "refId": "A" @@ -896,7 +898,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -934,7 +937,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10,\n sum by (pod_name, pod_namespace) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval])\n )\n)", + "expr": "topk(\n 10,\n sum by (pod_name, pod_namespace) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])\n )\n)", "legendFormat": "{{pod_namespace}}/{{pod_name}}", "range": true, "refId": "A" @@ -988,7 +991,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1026,7 +1030,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "topk(\n 10, \n sum by (pod_name, pod_namespace) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\"}[$__rate_interval])\n )\n)", + "expr": "topk(\n 10, \n sum by (pod_name, pod_namespace) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", node_name=~\"$node\",cluster=~\"$cluster\"}[$__rate_interval])\n )\n)", "legendFormat": "{{pod_namespace}}/{{pod_name}}", "range": true, "refId": "A" @@ -1060,6 +1064,61 @@ "skipUrlSync": false, "type": "datasource" }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info, cluster_name)", + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(global_cluster_info, cluster_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, { "current": { "selected": false, @@ -1070,14 +1129,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, node_name)", + "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}, node_name)", "hide": 0, "includeAll": false, "multi": false, "name": "node", "options": [], "query": { - "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, node_name)", + "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}, node_name)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -1096,6 +1155,6 @@ "timezone": "", "title": "Spiderpool RDMA | Node", "uid": "A0T4f2ZNz", - "version": 22, + "version": 23, "weekStart": "" } \ No newline at end of file diff --git a/charts/spiderpool/files/grafana-rdma-pod.json b/charts/spiderpool/files/grafana-rdma-pod.json index bf7c98c1a5..ecd0befe15 100644 --- a/charts/spiderpool/files/grafana-rdma-pod.json +++ b/charts/spiderpool/files/grafana-rdma-pod.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 6, + "id": 21, "links": [], "liveNow": false, "panels": [ @@ -156,7 +156,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) + rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) ", + "expr": "rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) + rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) ", "format": "time_series", "instant": false, "interval": "", @@ -283,7 +283,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) + rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) ", + "expr": "rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) + rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) ", "format": "time_series", "instant": false, "interval": "", @@ -410,7 +410,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "(rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])\n)\n/\n(rdma_vport_speed_mbps_total{pod_name!=\"\"} * 1000000 / 8) * 100", + "expr": "(rate(rdma_rx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])\n)\n/\n(rdma_vport_speed_mbps_total{pod_name!=\"\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "format": "time_series", "instant": false, "interval": "", @@ -537,7 +537,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "(rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])\n)\n/\n(rdma_vport_speed_mbps_total{pod_name!=\"\"} * 1000000 / 8) * 100", + "expr": "(rate(rdma_tx_vport_rdma_unicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval]) +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])\n)\n/\n(rdma_vport_speed_mbps_total{pod_name!=\"\",cluster=~\"$cluster\"} * 1000000 / 8) * 100", "format": "time_series", "instant": false, "interval": "", @@ -633,7 +633,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_vport_rdma_unicast_packets_total{pod_name!=\"\", pod_namespace!=\"\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_vport_rdma_unicast_packets_total{pod_name!=\"\", pod_namespace!=\"\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -728,7 +728,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_vport_rdma_multicast_packets_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_vport_rdma_multicast_packets_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -824,7 +824,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -918,7 +918,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_read_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_read_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1014,7 +1014,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_tx_vport_rdma_unicast_packets_total{pod_name!=\"\", pod_namespace!=\"\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_tx_vport_rdma_unicast_packets_total{pod_name!=\"\", pod_namespace!=\"\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1109,7 +1109,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "irate(rdma_tx_vport_rdma_multicast_packets_total{pod_namespace!=\"\", pod_name=~\"$pod\"}[1m])", + "expr": "irate(rdma_tx_vport_rdma_multicast_packets_total{pod_namespace!=\"\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[1m])", "format": "time_series", "instant": false, "interval": "", @@ -1205,7 +1205,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_name=~\"$pod\"}[1m]) * 8 / 1000000", + "expr": "rate(rdma_tx_vport_rdma_multicast_bytes_total{pod_name!=\"\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[1m]) * 8 / 1000000", "format": "time_series", "instant": false, "interval": "", @@ -1300,7 +1300,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_write_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_write_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1394,7 +1394,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_req_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_req_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1488,7 +1488,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "irate(rdma_duplicate_request_total{pod_namespace!=\"\", pod_name=~\"$pod\"}[1m])", + "expr": "irate(rdma_duplicate_request_total{pod_namespace!=\"\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[1m])", "format": "time_series", "instant": false, "interval": "", @@ -1582,7 +1582,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_resp_remote_access_errors_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_resp_remote_access_errors_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1676,7 +1676,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_req_remote_access_errors_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_req_remote_access_errors_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1770,7 +1770,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_dct_connect_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_dct_connect_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1864,7 +1864,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_atomic_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_atomic_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -1958,7 +1958,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_req_remote_invalid_request_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_req_remote_invalid_request_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2052,7 +2052,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_duplicate_request_total{pod_namespace!=\"\",pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_duplicate_request_total{pod_namespace!=\"\",pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2146,7 +2146,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rx_atomic_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rx_atomic_requests_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2240,7 +2240,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_resp_cqe_flush_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_resp_cqe_flush_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2334,7 +2334,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_req_cqe_flush_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_req_cqe_flush_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2428,7 +2428,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_resp_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_resp_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2522,7 +2522,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rnr_nak_retry_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rnr_nak_retry_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2616,7 +2616,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_out_of_sequence_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_out_of_sequence_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2710,7 +2710,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_packet_seq_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_packet_seq_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2804,7 +2804,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_resp_local_length_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_resp_local_length_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2898,7 +2898,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_implied_nak_seq_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_implied_nak_seq_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -2992,7 +2992,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_local_ack_timeout_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_local_ack_timeout_err_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3086,7 +3086,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_out_of_buffer_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_out_of_buffer_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3180,7 +3180,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_req_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_req_cqe_error_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3274,7 +3274,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_np_cnp_sent_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_np_cnp_sent_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3368,7 +3368,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_roce_adp_retrans_to_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_roce_adp_retrans_to_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3462,7 +3462,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_roce_slow_restart_cnps_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_roce_slow_restart_cnps_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3556,7 +3556,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_np_ecn_marked_roce_packets_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_np_ecn_marked_roce_packets_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3650,7 +3650,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rp_cnp_handled_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rp_cnp_handled_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3744,7 +3744,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_roce_slow_restart_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_roce_slow_restart_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3838,7 +3838,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_rp_cnp_ignored_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_rp_cnp_ignored_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3932,7 +3932,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_roce_adp_retrans_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__rate_interval])", + "expr": "rate(rdma_roce_adp_retrans_total{pod_name!=\"\", pod_namespace=~\"$namespace\", pod_name=~\"$pod\",cluster=~\"$cluster\"}[$__rate_interval])", "format": "time_series", "instant": false, "interval": "", @@ -3969,25 +3969,80 @@ "skipUrlSync": false, "type": "datasource" }, + { + "current": { + "isNone": true, + "selected": true, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info, cluster_name)", + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(global_cluster_info, cluster_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, { "allValue": ".+", "current": { "selected": false, - "text": "All", - "value": "$__all" + "text": "huailou", + "value": "huailou" }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, pod_namespace)", + "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\",cluster=~\"$cluster\"}, pod_namespace)", "hide": 0, "includeAll": true, "multi": false, "name": "namespace", "options": [], "query": { - "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, pod_namespace)", + "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\",cluster=~\"$cluster\"}, pod_namespace)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -3998,7 +4053,7 @@ }, { "current": { - "selected": false, + "selected": true, "text": "10-20-1-50", "value": "10-20-1-50" }, @@ -4006,14 +4061,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, node_name)", + "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}, node_name)", "hide": 0, "includeAll": true, "multi": false, "name": "node", "options": [], "query": { - "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{}, node_name)", + "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{cluster=~\"$cluster\"}, node_name)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -4025,14 +4080,14 @@ { "current": { "selected": false, - "text": "pytorch-sample-master-0", - "value": "pytorch-sample-master-0" + "text": "rdma-test-gpu-tool-pdrvn", + "value": "rdma-test-gpu-tool-pdrvn" }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\"}, pod_name)", + "definition": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\",cluster=~\"$cluster\"}, pod_name)", "hide": 0, "includeAll": false, "label": "pod", @@ -4040,7 +4095,7 @@ "name": "pod", "options": [], "query": { - "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\"}, pod_name)", + "query": "label_values(rdma_tx_vport_rdma_unicast_bytes_total{pod_namespace=~\"$namespace\",cluster=~\"$cluster\"}, pod_name)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -4052,13 +4107,13 @@ ] }, "time": { - "from": "now-3h", + "from": "now-30d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Spiderpool RDMA | Pod", "uid": "DenUibiNk", - "version": 18, + "version": 19, "weekStart": "" } \ No newline at end of file diff --git a/charts/spiderpool/files/grafana-rdma-workload.json b/charts/spiderpool/files/grafana-rdma-workload.json index c3e816270a..2e59e04428 100644 --- a/charts/spiderpool/files/grafana-rdma-workload.json +++ b/charts/spiderpool/files/grafana-rdma-workload.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 12, + "id": 20, "links": [], "liveNow": false, "panels": [ @@ -121,7 +121,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (owner_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (owner_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -211,7 +211,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (owner_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (owner_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "legendFormat": "__auto", "range": true, "refId": "A" @@ -330,7 +330,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_rx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n +\n rate(rdma_rx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "interval": "", "legendFormat": "{{pod_name}}", "range": true, @@ -436,7 +436,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_unicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n +\n rate(rdma_tx_vport_rdma_multicast_bytes_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "interval": "", "legendFormat": "{{pod_name}}", "range": true, @@ -546,7 +546,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum by (pod_name) (\n rate(rdma_rx_vport_rdma_unicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_rx_vport_rdma_unicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "format": "time_series", "instant": false, "interval": "", @@ -658,7 +658,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_unicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_unicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "format": "time_series", "instant": false, "interval": "", @@ -770,7 +770,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_multicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_multicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "format": "time_series", "instant": false, "interval": "", @@ -882,7 +882,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_multicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])\n)", + "expr": "sum by (pod_name) (\n rate(rdma_tx_vport_rdma_multicast_packets_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])\n)", "format": "time_series", "instant": false, "interval": "", @@ -976,7 +976,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_out_of_sequence_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])", + "expr": "rate(rdma_out_of_sequence_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])", "format": "time_series", "instant": false, "interval": "", @@ -1070,7 +1070,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(rdma_packet_seq_err_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\"}[1m])", + "expr": "rate(rdma_packet_seq_err_total{owner_namespace=~\"$namespace\", owner_kind=~\"$kind\", owner_name=~\"$name\",cluster=~\"$cluster\"}[1m])", "format": "time_series", "instant": false, "interval": "", @@ -1107,6 +1107,62 @@ "skipUrlSync": false, "type": "datasource" }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info, cluster_name)", + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster_name", + "options": [], + "query": { + "query": "label_values(global_cluster_info, cluster_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "hide": 2, + "includeAll": false, + "label": "", + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(global_cluster_info{cluster_name=\"$cluster_name\"}, cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, { "current": { "selected": false, @@ -1117,14 +1173,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_vport_speed_mbps_total{}, owner_kind)", + "definition": "label_values(rdma_vport_speed_mbps_total{cluster=~\"$cluster\"}, owner_kind)", "hide": 0, "includeAll": false, "multi": false, "name": "kind", "options": [], "query": { - "query": "label_values(rdma_vport_speed_mbps_total{}, owner_kind)", + "query": "label_values(rdma_vport_speed_mbps_total{cluster=~\"$cluster\"}, owner_kind)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -1143,14 +1199,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\"}, owner_namespace)", + "definition": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\",cluster=~\"$cluster\"}, owner_namespace)", "hide": 0, "includeAll": false, "multi": false, "name": "namespace", "options": [], "query": { - "query": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\"}, owner_namespace)", + "query": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\",cluster=~\"$cluster\"}, owner_namespace)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -1169,14 +1225,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "definition": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\", owner_namespace=~\"$namespace\"}, owner_name)", + "definition": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\", owner_namespace=~\"$namespace\",cluster=~\"$cluster\"}, owner_name)", "hide": 0, "includeAll": false, "multi": false, "name": "name", "options": [], "query": { - "query": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\", owner_namespace=~\"$namespace\"}, owner_name)", + "query": "label_values(rdma_vport_speed_mbps_total{owner_kind=~\"$kind\", owner_namespace=~\"$namespace\",cluster=~\"$cluster\"}, owner_name)", "refId": "StandardVariableQuery" }, "refresh": 1, @@ -1188,13 +1244,13 @@ ] }, "time": { - "from": "now-3h", + "from": "now-90d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Spiderpool RDMA | AI Workload", "uid": "AAT6f2ZNz", - "version": 44, + "version": 45, "weekStart": "" } \ No newline at end of file diff --git a/charts/spiderpool/templates/grafanaDashboard.yaml b/charts/spiderpool/templates/grafanaDashboard.yaml index 05c29b9d97..9c6be12e31 100644 --- a/charts/spiderpool/templates/grafanaDashboard.yaml +++ b/charts/spiderpool/templates/grafanaDashboard.yaml @@ -21,746 +21,5 @@ metadata: {{- end }} {{- end }} spec: - json: |- - { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "panels": [], - "title": "Row title", - "type": "row" - }, - { - "datasource": { - "type": "prometheus" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 70 - }, - { - "color": "red", - "value": 85 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 18, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_total_ippool_counts", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "total ippool counts", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 70 - }, - { - "color": "red", - "value": 85 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 1 - }, - "id": 20, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_total_subnet_counts", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "total subnet counts", - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus" - }, - "description": "spiderpool IPAM IP allocation status", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 10, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_counts_total", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_failure_counts_total", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "IP allocation counts", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 70, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 10, - "y": 8 - }, - "id": 10, - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_average_duration_seconds", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_max_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_min_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_latest_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "D" - } - ], - "title": "ip allocation durations", - "type": "state-timeline" - }, - { - "datasource": { - "type": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 12, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_allocation_duration_seconds_bucket", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "ip allocation duration distribution", - "type": "piechart" - }, - { - "datasource": { - "type": "prometheus" - }, - "description": "spiderpool IP release and IP GC status", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 10, - "x": 0, - "y": 17 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_counts_total", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_failure_counts_total", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ip_gc_counts_total", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ip_gc_failure_counts_total", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "D" - } - ], - "title": "IP release&GC counts", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 70, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 10, - "y": 17 - }, - "id": 14, - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_average_duration_seconds", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_max_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_min_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_latest_duration_seconds", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "D" - } - ], - "title": "IP release durations", - "type": "state-timeline" - }, - { - "datasource": { - "type": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 17 - }, - "id": 16, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus" - }, - "editorMode": "builder", - "expr": "spiderpool_ipam_release_duration_seconds_bucket", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "IP release duration distribution", - "type": "piechart" - } - ], - "refresh": false, - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "spiderpool", - "uid": "5FAGqFE4z", - "version": 3, - "weekStart": "" - } + json: {{ .Files.Get "files/grafana-ipam.json" | toJson }} {{- end }} From a311fcac2a572355a4f6eeace86f358fc4af487b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:34:32 +0000 Subject: [PATCH 12/19] build(deps): bump docker/setup-buildx-action from 3.7.1 to 3.8.0 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.7.1 to 3.8.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3.7.1...v3.8.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build-image-base.yaml | 2 +- .github/workflows/build-image-ci.yaml | 2 +- .github/workflows/build-image-plugins.yaml | 2 +- .github/workflows/call-release-image.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-image-base.yaml b/.github/workflows/build-image-base.yaml index 7dd418d9f4..41c1a61599 100644 --- a/.github/workflows/build-image-base.yaml +++ b/.github/workflows/build-image-base.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.7.1 + uses: docker/setup-buildx-action@v3.8.0 - name: Inspect builder run: | diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index a386d93f38..18f596c3d7 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -56,7 +56,7 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.7.1 + uses: docker/setup-buildx-action@v3.8.0 # commit sha is used for image tag - name: Getting image tag diff --git a/.github/workflows/build-image-plugins.yaml b/.github/workflows/build-image-plugins.yaml index c907c1f595..d78fcab1a7 100644 --- a/.github/workflows/build-image-plugins.yaml +++ b/.github/workflows/build-image-plugins.yaml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.7.1 + uses: docker/setup-buildx-action@v3.8.0 - name: Inspect builder run: | diff --git a/.github/workflows/call-release-image.yaml b/.github/workflows/call-release-image.yaml index 6de4212c34..70d15e9b9c 100644 --- a/.github/workflows/call-release-image.yaml +++ b/.github/workflows/call-release-image.yaml @@ -36,7 +36,7 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.7.1 + uses: docker/setup-buildx-action@v3.8.0 - name: Login to online register uses: docker/login-action@v3.3.0 From b5deaf4cff363b939460d7174e74479289293093 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:34:34 +0000 Subject: [PATCH 13/19] build(deps): bump helm/kind-action from 1.10.0 to 1.12.0 Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.10.0 to 1.12.0. - [Release notes](https://github.com/helm/kind-action/releases) - [Commits](https://github.com/helm/kind-action/compare/v1.10.0...v1.12.0) --- updated-dependencies: - dependency-name: helm/kind-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/call-lint-chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/call-lint-chart.yaml b/.github/workflows/call-lint-chart.yaml index 9300f6745c..5483426b46 100644 --- a/.github/workflows/call-lint-chart.yaml +++ b/.github/workflows/call-lint-chart.yaml @@ -104,7 +104,7 @@ jobs: # https://github.com/helm/kind-action - name: Create Kind cluster if: ${{ env.changed == 'true' }} - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.12.0 with: wait: 120s From d5caf138ed0850841aa64def1af13f7d8d97a61b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:34:37 +0000 Subject: [PATCH 14/19] build(deps): bump actions/upload-artifact from 3.1.3 to 4.5.0 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.5.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3.1.3...v4.5.0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/auto-upgrade-ci.yaml | 4 ++-- .github/workflows/build-image-base.yaml | 2 +- .github/workflows/build-image-ci.yaml | 4 ++-- .github/workflows/build-image-plugins.yaml | 2 +- .github/workflows/call-release-changelog.yaml | 2 +- .github/workflows/call-release-chart.yaml | 2 +- .github/workflows/call-release-doc.yaml | 2 +- .github/workflows/call-release-image.yaml | 4 ++-- .github/workflows/e2e-init.yaml | 8 ++++---- .github/workflows/lint-golang.yaml | 4 ++-- .github/workflows/lint-yaml.yaml | 2 +- .github/workflows/update-chart-readme.yml | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index f1cf9611eb..6f9ee68c09 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -382,7 +382,7 @@ jobs: - name: Upload e2e log if: ${{ needs.get_ref.outputs.e2e_enabled == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ needs.get_ref.outputs.old_version }}-to-${{ needs.get_ref.outputs.new_version }}-debuglog.txt path: test/e2edebugLog.txt @@ -390,7 +390,7 @@ jobs: - name: Upload e2e report if: ${{ env.UPLOAD_E2E_REPORT == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ needs.get_ref.outputs.old_version }}-to-${{ needs.get_ref.outputs.new_version }}-e2ereport.json path: e2ereport.json diff --git a/.github/workflows/build-image-base.yaml b/.github/workflows/build-image-base.yaml index 7dd418d9f4..5452821165 100644 --- a/.github/workflows/build-image-base.yaml +++ b/.github/workflows/build-image-base.yaml @@ -131,7 +131,7 @@ jobs: - name: Upload artifact digests if: ${{ env.exists == 'false' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: image-digest ${{ env.IMAGE_NAME }} path: image-digest diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index a386d93f38..1c61bb0d67 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -250,7 +250,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: image-digest-${{ matrix.name }} path: image-digest @@ -258,7 +258,7 @@ jobs: # Upload artifact race images tar - name: Upload artifact race image tar - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ inputs.imageTarName }}-${{ matrix.name }} path: /tmp/${{ matrix.name }}-race.tar diff --git a/.github/workflows/build-image-plugins.yaml b/.github/workflows/build-image-plugins.yaml index c907c1f595..f0f043e555 100644 --- a/.github/workflows/build-image-plugins.yaml +++ b/.github/workflows/build-image-plugins.yaml @@ -131,7 +131,7 @@ jobs: - name: Upload artifact digests if: ${{ env == 'false' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: image-digest ${{ env.IMAGE_NAME }} path: image-digest diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index 5c8407515a..3190ed7549 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -109,7 +109,7 @@ jobs: cat ${FILE_PATH} - name: Upload Changelog - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: changelog_artifact path: ${{ env.FILE_PATH }} diff --git a/.github/workflows/call-release-chart.yaml b/.github/workflows/call-release-chart.yaml index c5ccdc1eb7..2757f13d64 100644 --- a/.github/workflows/call-release-chart.yaml +++ b/.github/workflows/call-release-chart.yaml @@ -87,7 +87,7 @@ jobs: mv charts/*.tgz tmp - name: Upload Artifact - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: chart_package_artifact path: tmp/* diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index 7afab7d130..e198de5b9e 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -133,7 +133,7 @@ jobs: echo "Push a doc version: ${{ env.DOCS_TAG }} from branch: ${{ env.REF }}, update it to latest: ${{ env.SET_LATEST }} " - name: Upload Artifact - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: website_package_artifact path: site.tar.gz diff --git a/.github/workflows/call-release-image.yaml b/.github/workflows/call-release-image.yaml index 6de4212c34..d8251149aa 100644 --- a/.github/workflows/call-release-image.yaml +++ b/.github/workflows/call-release-image.yaml @@ -177,14 +177,14 @@ jobs: cd .. - name: Upload artifact digests - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: image-digest-artifact-${{ env.imagetag }} path: image-digest-output.txt retention-days: 1 - name: Upload artifact digests - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: makefile-digest-artifact-${{ env.imagetag }} path: Makefile.digests diff --git a/.github/workflows/e2e-init.yaml b/.github/workflows/e2e-init.yaml index cd3911adff..548a469282 100644 --- a/.github/workflows/e2e-init.yaml +++ b/.github/workflows/e2e-init.yaml @@ -177,7 +177,7 @@ jobs: - name: Upload Setup Kind Cluster log if: ${{ env.RUN_SETUP_KIND_CLUSTER_PASS == 'false' && env.UPLOAD_SETUP_KIND_CLUSTER_LOG == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-setupkind.txt path: test/e2edebugLog.txt @@ -223,7 +223,7 @@ jobs: - name: Upload e2e log if: ${{ inputs.run_e2e == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-debuglog.txt path: test/e2edebugLog.txt @@ -231,7 +231,7 @@ jobs: - name: Upload e2e report if: ${{ env.UPLOAD_E2E_REPORT == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-e2ereport.json path: e2ereport.json @@ -291,7 +291,7 @@ jobs: - name: Upload Uninstall Spiderpool e2e log if: ${{ env.UNINSTALL_E2E_PASS == 'false' && env.UPLOAD_UNINSTALL_E2E_LOG == 'true' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-uninstall-debugLog.txt path: test/e2e-uninstall-debugLog.txt diff --git a/.github/workflows/lint-golang.yaml b/.github/workflows/lint-golang.yaml index c54638529a..cf774f96ea 100644 --- a/.github/workflows/lint-golang.yaml +++ b/.github/workflows/lint-golang.yaml @@ -214,7 +214,7 @@ jobs: - name: Upload Coverage Artifact if: ${{ steps.unittest.outcome == 'failure' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: coverage.out path: coverage.out @@ -222,7 +222,7 @@ jobs: - name: Upload Report Artifact if: ${{ steps.unittest.outcome == 'failure' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: unittestreport.json path: unittestreport.json diff --git a/.github/workflows/lint-yaml.yaml b/.github/workflows/lint-yaml.yaml index 8de7cbb7b6..691143631b 100644 --- a/.github/workflows/lint-yaml.yaml +++ b/.github/workflows/lint-yaml.yaml @@ -50,7 +50,7 @@ jobs: - name: Upload artifact digests if: ${{ steps.yaml-lint.outcome == 'failure' }} - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: log path: ${{ steps.yaml-lint.outputs.logfile }} diff --git a/.github/workflows/update-chart-readme.yml b/.github/workflows/update-chart-readme.yml index 7e2e77f3ef..21a480c1f3 100644 --- a/.github/workflows/update-chart-readme.yml +++ b/.github/workflows/update-chart-readme.yml @@ -52,7 +52,7 @@ jobs: echo "-----------------------------" - name: Upload artifact digests - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.5.0 with: name: README.md path: thisProject/charts/spiderpool/README.md From 07b8abceb00bcfa8af0efbe693adbae4daac3ea0 Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Mon, 23 Dec 2024 18:39:22 +0800 Subject: [PATCH 15/19] docs: updates blogs.md Signed-off-by: Cyclinder Kuo --- docs/concepts/blog-zh_CN.md | 2 ++ docs/concepts/blog.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/concepts/blog-zh_CN.md b/docs/concepts/blog-zh_CN.md index 85351ceb10..79d798b2cb 100644 --- a/docs/concepts/blog-zh_CN.md +++ b/docs/concepts/blog-zh_CN.md @@ -17,3 +17,5 @@ * [SpiderPool - 云原生容器网络 IPAM 插件](https://mp.weixin.qq.com/s/r6YiuUBGD2KmmMOxl26X6A) * [KubeEdge EdgeMesh v1.15 边缘 CNI 采用 Spiderpool 实施 IPAM](https://mp.weixin.qq.com/s/UYewT0mqhS1jYEDhGFH_8A) + +* [CNCF 大使探讨 Spiderpool 如何提供 IPAM 解决方案,解决 Kubernetes 中的网络挑战,同时实现灵活部署](https://www.youtube.com/watch?v=GiCOnFCwRno) diff --git a/docs/concepts/blog.md b/docs/concepts/blog.md index 4c9c77c4d6..cd96bd0f9a 100644 --- a/docs/concepts/blog.md +++ b/docs/concepts/blog.md @@ -17,3 +17,5 @@ * [SpiderPool - Cloud-Native Container Network IPAM Plugin](https://mp.weixin.qq.com/s/r6YiuUBGD2KmmMOxl26X6A) * [KubeEdge EdgeMesh v1.15 Edge CNI with Spiderpool IPAM](https://mp.weixin.qq.com/s/UYewT0mqhS1jYEDhGFH_8A) + +* [CNCF Ambassador explores how Spiderpool provides a IPAM solution, addressing the challenges of networking in Kubernetes while allowing for flexible deployment](https://www.youtube.com/watch?v=GiCOnFCwRno) From 0f1c005332727e517cbfb21ceb295983754a2357 Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Tue, 24 Dec 2024 21:27:50 +0800 Subject: [PATCH 16/19] e2e: debug Signed-off-by: Cyclinder Kuo --- test/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index 4cff895cfa..361e086377 100644 --- a/test/Makefile +++ b/test/Makefile @@ -226,11 +226,9 @@ setup_kruise: kind load docker-image $${IMAGE} --name $(E2E_CLUSTER_NAME); \ done; \ HELM_OPTION=" --wait --timeout 20m --debug --set manager.image.repository=$(E2E_OPENKRUISE_IMAGE) " ; \ - # openkruise failed to run with 1.7.3, see - # https://github.com/spidernet-io/spiderpool/issues/4396 HELM_OPTION+=" --version $(E2E_OPENKRUISE_VERSION) " ; \ helm upgrade --install kruise openkruise/kruise $${HELM_OPTION} \ - --kubeconfig $(E2E_KUBECONFIG) || { KIND_CLUSTER_NAME=$(E2E_CLUSTER_NAME) ./scripts/debugEnv.sh $(E2E_KUBECONFIG) "detail" "$(E2E_LOG_FILE)" ; exit 1 ; } ; \ + --kubeconfig $(E2E_KUBECONFIG) || { KIND_CLUSTER_NAME=$(E2E_CLUSTER_NAME) ./scripts/debugEnv.sh $(E2E_KUBECONFIG) "detail" "$(E2E_LOG_FILE)" ; exit 1 ; } ; \ .PHONY: setup_spiderpool setup_spiderpool: From 417a6455b3a482abff68309ca169e610c1868408 Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Wed, 25 Dec 2024 16:53:16 +0800 Subject: [PATCH 17/19] Github Action: Fix fail to download artifact Signed-off-by: Cyclinder Kuo --- .github/workflows/auto-upgrade-ci.yaml | 8 ++++---- .github/workflows/auto-version-release.yaml | 4 ++-- .github/workflows/build-image-base.yaml | 2 +- .github/workflows/build-image-ci.yaml | 4 ++-- .github/workflows/build-image-plugins.yaml | 2 +- .github/workflows/call-release-changelog.yaml | 2 +- .github/workflows/call-release-chart.yaml | 2 +- .github/workflows/call-release-doc.yaml | 2 +- .github/workflows/call-update-githubpages.yaml | 4 ++-- .github/workflows/e2e-init.yaml | 4 ++-- .github/workflows/trivy-scan-image.yaml | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index 6f9ee68c09..f788bb35e0 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -210,14 +210,14 @@ jobs: - name: Download old spiderpool-agent image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: old-image-tar-spiderpool-agent path: test/.download - name: Download old spiderpool-controller image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: old-image-tar-spiderpool-controller path: test/.download @@ -304,13 +304,13 @@ jobs: cp -r /tmp/config ${{ env.KUBECONFIG_PATH }}/${{ env.E2E_CLUSTER_NAME }}/.kube/config - name: Download new spiderpool-agent image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: new-image-tar-spiderpool-agent path: test/.download - name: Download new spiderpool-controller image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: new-image-tar-spiderpool-controller path: test/.download diff --git a/.github/workflows/auto-version-release.yaml b/.github/workflows/auto-version-release.yaml index 5b36e6fe8c..43beb74915 100644 --- a/.github/workflows/auto-version-release.yaml +++ b/.github/workflows/auto-version-release.yaml @@ -137,13 +137,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Chart Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: ${{ needs.release-chart.outputs.artifact }} path: chart-package/ - name: Download Changelog Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: ${{ needs.release-changelog.outputs.artifact }} path: changelog-result/ diff --git a/.github/workflows/build-image-base.yaml b/.github/workflows/build-image-base.yaml index da9dff6e08..67d64bd20e 100644 --- a/.github/workflows/build-image-base.yaml +++ b/.github/workflows/build-image-base.yaml @@ -148,7 +148,7 @@ jobs: mkdir -p image-digest/ - name: Download digests of all images built - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: image-digest/ diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index b013b2bf40..d13c60b86b 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -301,13 +301,13 @@ jobs: mkdir -p image-digest/ - name: Download digests of all images built - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: image-digest/ name: image-digest-spiderpool-agent - name: Download digests of all images built - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: image-digest/ name: image-digest-spiderpool-controller diff --git a/.github/workflows/build-image-plugins.yaml b/.github/workflows/build-image-plugins.yaml index 97fc553287..ee40c06a34 100644 --- a/.github/workflows/build-image-plugins.yaml +++ b/.github/workflows/build-image-plugins.yaml @@ -148,7 +148,7 @@ jobs: mkdir -p image-digest/ - name: Download digests of all images built - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: image-digest/ diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index 3190ed7549..340d04b09c 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -126,7 +126,7 @@ jobs: ref: ${{ env.DEST_BRANCH }} - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: changelog_artifact path: ${{ env.DEST_DIRECTORY }} diff --git a/.github/workflows/call-release-chart.yaml b/.github/workflows/call-release-chart.yaml index 2757f13d64..13d3cb193b 100644 --- a/.github/workflows/call-release-chart.yaml +++ b/.github/workflows/call-release-chart.yaml @@ -115,7 +115,7 @@ jobs: persist-credentials: "true" - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: chart_package_artifact path: charts/ diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index e198de5b9e..6ae62a85d7 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -152,7 +152,7 @@ jobs: fetch-depth: 0 - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: website_package_artifact diff --git a/.github/workflows/call-update-githubpages.yaml b/.github/workflows/call-update-githubpages.yaml index 8d0793dfc6..5997700d46 100644 --- a/.github/workflows/call-update-githubpages.yaml +++ b/.github/workflows/call-update-githubpages.yaml @@ -45,13 +45,13 @@ jobs: mkdir ${{ env.DEST_DIRECTORY }}/charts - name: Download Website Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: ${{ inputs.site_artifact_name }} path: ${{ env.DEST_DIRECTORY }} - name: Download Chart Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: ${{ inputs.chart_artifact_name }} path: ${{ env.DEST_DIRECTORY }}/charts diff --git a/.github/workflows/e2e-init.yaml b/.github/workflows/e2e-init.yaml index 548a469282..b3fee08f13 100644 --- a/.github/workflows/e2e-init.yaml +++ b/.github/workflows/e2e-init.yaml @@ -104,13 +104,13 @@ jobs: bash ./test/scripts/install-tools.sh - name: Download spiderpool-agent image - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: image-tar-spiderpool-agent path: test/.download - name: Download spiderpool-controller image - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: image-tar-spiderpool-controller path: test/.download diff --git a/.github/workflows/trivy-scan-image.yaml b/.github/workflows/trivy-scan-image.yaml index 3e781d3929..ef5d62ebe5 100644 --- a/.github/workflows/trivy-scan-image.yaml +++ b/.github/workflows/trivy-scan-image.yaml @@ -24,13 +24,13 @@ jobs: ref: ${{ inputs.ref }} - name: Download spiderpool-agent image - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: image-tar-spiderpool-agent path: test/.download - name: Download spiderpool-controller image - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: name: image-tar-spiderpool-controller path: test/.download From 28236cdbf93212f7fbf5ca43439b8cb797d6e025 Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Wed, 25 Dec 2024 18:46:08 +0800 Subject: [PATCH 18/19] CI: FIx fail to upload multiple artifacts with the same name Signed-off-by: Cyclinder Kuo --- .github/workflows/auto-upgrade-ci.yaml | 8 ++++---- .github/workflows/build-image-base.yaml | 4 +++- .github/workflows/build-image-ci.yaml | 8 ++++---- .github/workflows/build-image-plugins.yaml | 4 +++- .github/workflows/call-release-changelog.yaml | 4 ++-- .github/workflows/call-release-chart.yaml | 4 ++-- .github/workflows/call-release-doc.yaml | 6 ++++-- .github/workflows/e2e-init.yaml | 14 ++++++++------ .github/workflows/lint-golang.yaml | 10 +++++----- .github/workflows/trivy-scan-image.yaml | 4 ++-- .github/workflows/update-chart-readme.yml | 6 +++--- 11 files changed, 40 insertions(+), 32 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index f788bb35e0..c8600f19fc 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -212,15 +212,15 @@ jobs: if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} uses: actions/download-artifact@v4.1.8 with: - name: old-image-tar-spiderpool-agent path: test/.download + pattern: old-image-tar-spiderpool-agent-${{ needs.call_build_old_ci_image.outputs.imageTag }} - name: Download old spiderpool-controller image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} uses: actions/download-artifact@v4.1.8 with: - name: old-image-tar-spiderpool-controller path: test/.download + pattern: old-image-tar-spiderpool-controller-${{ needs.call_build_old_ci_image.outputs.imageTag }} - name: Load Images if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} @@ -306,14 +306,14 @@ jobs: - name: Download new spiderpool-agent image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} uses: actions/download-artifact@v4.1.8 with: - name: new-image-tar-spiderpool-agent path: test/.download + pattern: new-image-tar-spiderpool-agent-${{ needs.call_build_old_ci_image.outputs.imageTag }} - name: Download new spiderpool-controller image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} uses: actions/download-artifact@v4.1.8 with: - name: new-image-tar-spiderpool-controller path: test/.download + pattern: new-image-tar-spiderpool-controller-${{ needs.call_build_old_ci_image.outputs.imageTag }} - name: Load Images with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} run: | diff --git a/.github/workflows/build-image-base.yaml b/.github/workflows/build-image-base.yaml index 67d64bd20e..13ba131b3d 100644 --- a/.github/workflows/build-image-base.yaml +++ b/.github/workflows/build-image-base.yaml @@ -133,7 +133,7 @@ jobs: if: ${{ env.exists == 'false' }} uses: actions/upload-artifact@v4.5.0 with: - name: image-digest ${{ env.IMAGE_NAME }} + name: image-digest-${{ env.IMAGE_NAME }}-${{ env.tag }} path: image-digest retention-days: 1 @@ -151,6 +151,8 @@ jobs: uses: actions/download-artifact@v4.1.8 with: path: image-digest/ + pattern: image-digest-${{ env.IMAGE_NAME }}-${{ env.tag }} + merge-multiple: true - name: Image Digests Output shell: bash diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index d13c60b86b..6039080510 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -252,7 +252,7 @@ jobs: - name: Upload artifact digests uses: actions/upload-artifact@v4.5.0 with: - name: image-digest-${{ matrix.name }} + name: image-digest-${{ matrix.name }}-${{ env.tag }} path: image-digest retention-days: 1 @@ -260,7 +260,7 @@ jobs: - name: Upload artifact race image tar uses: actions/upload-artifact@v4.5.0 with: - name: ${{ inputs.imageTarName }}-${{ matrix.name }} + name: ${{ inputs.imageTarName }}-${{ matrix.name }}-${{ env.tag }} path: /tmp/${{ matrix.name }}-race.tar retention-days: 1 @@ -303,14 +303,14 @@ jobs: - name: Download digests of all images built uses: actions/download-artifact@v4.1.8 with: + pattern: image-digest-spiderpool-agent-* path: image-digest/ - name: image-digest-spiderpool-agent - name: Download digests of all images built uses: actions/download-artifact@v4.1.8 with: + pattern: image-digest-spiderpool-controller-* path: image-digest/ - name: image-digest-spiderpool-controller - name: Image Digests Output shell: bash diff --git a/.github/workflows/build-image-plugins.yaml b/.github/workflows/build-image-plugins.yaml index ee40c06a34..c737ddf0be 100644 --- a/.github/workflows/build-image-plugins.yaml +++ b/.github/workflows/build-image-plugins.yaml @@ -133,7 +133,7 @@ jobs: if: ${{ env == 'false' }} uses: actions/upload-artifact@v4.5.0 with: - name: image-digest ${{ env.IMAGE_NAME }} + name: image-digest-${{ env.IMAGE_NAME }}-${{ steps.arg.outputs.image_tag }} path: image-digest retention-days: 1 @@ -151,6 +151,8 @@ jobs: uses: actions/download-artifact@v4.1.8 with: path: image-digest/ + pattern: image-digest-* + merge-multiple: true - name: Image Digests Output shell: bash diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index 340d04b09c..4e6f66c47d 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -111,7 +111,7 @@ jobs: - name: Upload Changelog uses: actions/upload-artifact@v4.5.0 with: - name: changelog_artifact + name: changelog_artifact_${{ env.RUN_dest_tag }} path: ${{ env.FILE_PATH }} retention-days: 1 if-no-files-found: error @@ -128,7 +128,7 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4.1.8 with: - name: changelog_artifact + pattern: changelog_artifact_${{ env.RUN_dest_tag }} path: ${{ env.DEST_DIRECTORY }} - uses: crazy-max/ghaction-import-gpg@v6 diff --git a/.github/workflows/call-release-chart.yaml b/.github/workflows/call-release-chart.yaml index 13d3cb193b..59c338a5eb 100644 --- a/.github/workflows/call-release-chart.yaml +++ b/.github/workflows/call-release-chart.yaml @@ -89,7 +89,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4.5.0 with: - name: chart_package_artifact + name: chart_package_artifact_${{ needs.get_ref.outputs.ref }} path: tmp/* retention-days: 1 if-no-files-found: error @@ -117,7 +117,7 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4.1.8 with: - name: chart_package_artifact + pattern: chart_package_artifact_${{ needs.get_ref.outputs.ref }} path: charts/ - name: Update Chart Yaml diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index 6ae62a85d7..956bf3af66 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -135,7 +135,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4.5.0 with: - name: website_package_artifact + name: website_package_artifact_${{ env.REF }} path: site.tar.gz retention-days: 0 if-no-files-found: error @@ -154,7 +154,9 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4.1.8 with: - name: website_package_artifact + pattern: website_package_artifact_${{ env.REF }} + path: ./ + merge-multiple: true - name: Untar Doc run: | diff --git a/.github/workflows/e2e-init.yaml b/.github/workflows/e2e-init.yaml index b3fee08f13..737e8af1ad 100644 --- a/.github/workflows/e2e-init.yaml +++ b/.github/workflows/e2e-init.yaml @@ -106,14 +106,16 @@ jobs: - name: Download spiderpool-agent image uses: actions/download-artifact@v4.1.8 with: - name: image-tar-spiderpool-agent path: test/.download + pattern: image-tar-spiderpool-agent-${{ inputs.ref }} + merge-multiple: true - name: Download spiderpool-controller image uses: actions/download-artifact@v4.1.8 with: - name: image-tar-spiderpool-controller path: test/.download + pattern: image-tar-spiderpool-controller-${{ inputs.ref }} + merge-multiple: true - name: Load Images run: | @@ -179,7 +181,7 @@ jobs: if: ${{ env.RUN_SETUP_KIND_CLUSTER_PASS == 'false' && env.UPLOAD_SETUP_KIND_CLUSTER_LOG == 'true' }} uses: actions/upload-artifact@v4.5.0 with: - name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-setupkind.txt + name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-${{ inputs.image_tag }}-setupkind.txt path: test/e2edebugLog.txt retention-days: 7 @@ -225,7 +227,7 @@ jobs: if: ${{ inputs.run_e2e == 'true' }} uses: actions/upload-artifact@v4.5.0 with: - name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-debuglog.txt + name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-${{ inputs.image_tag }}-debuglog.txt path: test/e2edebugLog.txt retention-days: 7 @@ -233,7 +235,7 @@ jobs: if: ${{ env.UPLOAD_E2E_REPORT == 'true' }} uses: actions/upload-artifact@v4.5.0 with: - name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-e2ereport.json + name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-${{ inputs.image_tag }}-e2ereport.json path: e2ereport.json retention-days: 1 @@ -293,7 +295,7 @@ jobs: if: ${{ env.UNINSTALL_E2E_PASS == 'false' && env.UPLOAD_UNINSTALL_E2E_LOG == 'true' }} uses: actions/upload-artifact@v4.5.0 with: - name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-uninstall-debugLog.txt + name: ${{ inputs.os }}-${{ inputs.ip_family }}-${{ matrix.e2e_test_mode }}-${{ inputs.k8s_version }}-${{ inputs.image_tag }}-uninstall-debugLog.txt path: test/e2e-uninstall-debugLog.txt retention-days: 7 diff --git a/.github/workflows/lint-golang.yaml b/.github/workflows/lint-golang.yaml index cf774f96ea..277ffcba46 100644 --- a/.github/workflows/lint-golang.yaml +++ b/.github/workflows/lint-golang.yaml @@ -216,16 +216,16 @@ jobs: if: ${{ steps.unittest.outcome == 'failure' }} uses: actions/upload-artifact@v4.5.0 with: - name: coverage.out - path: coverage.out + name: ${{ needs.filter_changes.outputs.ref }}-coverage.out + path: ${{ needs.filter_changes.outputs.ref }}-coverage.out retention-days: 1 - name: Upload Report Artifact if: ${{ steps.unittest.outcome == 'failure' }} uses: actions/upload-artifact@v4.5.0 with: - name: unittestreport.json - path: unittestreport.json + name: ${{ needs.filter_changes.outputs.ref }}-unittestreport.json + path: ${{ needs.filter_changes.outputs.ref }}-unittestreport.json retention-days: 1 # ============= upload coverage report @@ -234,7 +234,7 @@ jobs: uses: codecov/codecov-action@v4 with: directory: './' - files: 'coverage.out' + files: '${{ needs.filter_changes.outputs.ref }}-coverage.out' flags: unittests name: my-codecov-umbrella fail_ci_if_error: true diff --git a/.github/workflows/trivy-scan-image.yaml b/.github/workflows/trivy-scan-image.yaml index ef5d62ebe5..3a8ae50fe7 100644 --- a/.github/workflows/trivy-scan-image.yaml +++ b/.github/workflows/trivy-scan-image.yaml @@ -26,13 +26,13 @@ jobs: - name: Download spiderpool-agent image uses: actions/download-artifact@v4.1.8 with: - name: image-tar-spiderpool-agent + name: image-tar-spiderpool-agent-${{ inputs.ref }} path: test/.download - name: Download spiderpool-controller image uses: actions/download-artifact@v4.1.8 with: - name: image-tar-spiderpool-controller + name: image-tar-spiderpool-controller-${{ inputs.ref }} path: test/.download - name: List downloaded files diff --git a/.github/workflows/update-chart-readme.yml b/.github/workflows/update-chart-readme.yml index 21a480c1f3..fdcfe7245d 100644 --- a/.github/workflows/update-chart-readme.yml +++ b/.github/workflows/update-chart-readme.yml @@ -54,8 +54,8 @@ jobs: - name: Upload artifact digests uses: actions/upload-artifact@v4.5.0 with: - name: README.md - path: thisProject/charts/spiderpool/README.md + name: ${{github.event.pull_request.head.ref}}-README.md + path: thisProject/charts/spiderpool/${{github.event.pull_request.head.ref}}-README.md - name: Diff chart/README.md run: | @@ -67,6 +67,6 @@ jobs: echo -e "\033[31mPlease refer to artifact, and then commit the code.\033[0m" echo -e "\033[31mAlternatively, copy the contents of the new README.md below into your commit.\033[0m" echo -e "\033[31m-----------------------------\033[0m" - cat charts/spiderpool/README.md + cat charts/spiderpool/${{github.event.pull_request.head.ref}}-README.md exit 1 fi From 9d7a5d91a08840ecd766ea6fd3261677f1fc5b1e Mon Sep 17 00:00:00 2001 From: Cyclinder Kuo Date: Thu, 26 Dec 2024 10:33:53 +0800 Subject: [PATCH 19/19] CI: use merge-multiple for download-artifact Signed-off-by: Cyclinder Kuo --- .github/workflows/auto-upgrade-ci.yaml | 23 +++++-------------- .github/workflows/build-image-ci.yaml | 9 ++------ .github/workflows/build-image-plugins.yaml | 2 +- .github/workflows/call-release-changelog.yaml | 2 +- .github/workflows/call-release-doc.yaml | 2 +- .github/workflows/trivy-scan-image.yaml | 10 ++------ 6 files changed, 13 insertions(+), 35 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index c8600f19fc..672a2b6432 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -208,19 +208,13 @@ jobs: run: | bash ./test/scripts/install-tools.sh - - name: Download old spiderpool-agent image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} + - name: Download old spiderpool-agent and spiderpool-controller image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} uses: actions/download-artifact@v4.1.8 with: path: test/.download - pattern: old-image-tar-spiderpool-agent-${{ needs.call_build_old_ci_image.outputs.imageTag }} - - - name: Download old spiderpool-controller image with tag ${{ needs.call_build_old_ci_image.outputs.imageTag }} - if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} - uses: actions/download-artifact@v4.1.8 - with: - path: test/.download - pattern: old-image-tar-spiderpool-controller-${{ needs.call_build_old_ci_image.outputs.imageTag }} + merge-multiple: true + pattern: old-image-tar-spiderpool-*-${{ needs.call_build_old_ci_image.outputs.imageTag }} - name: Load Images if: ${{ needs.get_ref.outputs.build_old_image_tag == 'true' }} @@ -303,17 +297,12 @@ jobs: mkdir -p ${{ env.KUBECONFIG_PATH }}/${{ env.E2E_CLUSTER_NAME }}/.kube/ cp -r /tmp/config ${{ env.KUBECONFIG_PATH }}/${{ env.E2E_CLUSTER_NAME }}/.kube/config - - name: Download new spiderpool-agent image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} - uses: actions/download-artifact@v4.1.8 - with: - path: test/.download - pattern: new-image-tar-spiderpool-agent-${{ needs.call_build_old_ci_image.outputs.imageTag }} - - - name: Download new spiderpool-controller image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} + - name: Download new spiderpool-agent and spiderpool-controller image with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} uses: actions/download-artifact@v4.1.8 with: path: test/.download - pattern: new-image-tar-spiderpool-controller-${{ needs.call_build_old_ci_image.outputs.imageTag }} + pattern: new-image-tar-spiderpool-*-${{ needs.call_build_new_ci_image.outputs.imageTag }} + merge-multiple: true - name: Load Images with tag ${{ needs.call_build_new_ci_image.outputs.imageTag }} run: | diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index 6039080510..6f6c019ef2 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -303,14 +303,9 @@ jobs: - name: Download digests of all images built uses: actions/download-artifact@v4.1.8 with: - pattern: image-digest-spiderpool-agent-* - path: image-digest/ - - - name: Download digests of all images built - uses: actions/download-artifact@v4.1.8 - with: - pattern: image-digest-spiderpool-controller-* + pattern: image-digest-spiderpool-*-${{ needs.build_and_push_prs.outputs.imageTag }} path: image-digest/ + merge-multiple: true - name: Image Digests Output shell: bash diff --git a/.github/workflows/build-image-plugins.yaml b/.github/workflows/build-image-plugins.yaml index c737ddf0be..f0e81f7d4e 100644 --- a/.github/workflows/build-image-plugins.yaml +++ b/.github/workflows/build-image-plugins.yaml @@ -151,7 +151,7 @@ jobs: uses: actions/download-artifact@v4.1.8 with: path: image-digest/ - pattern: image-digest-* + pattern: image-digest-${{ env.IMAGE_NAME }}-* merge-multiple: true - name: Image Digests Output diff --git a/.github/workflows/call-release-changelog.yaml b/.github/workflows/call-release-changelog.yaml index 4e6f66c47d..5a0bce1707 100644 --- a/.github/workflows/call-release-changelog.yaml +++ b/.github/workflows/call-release-changelog.yaml @@ -128,7 +128,7 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4.1.8 with: - pattern: changelog_artifact_${{ env.RUN_dest_tag }} + pattern: changelog_artifact_${{ needs.generate_changelog.outputs.dest_tag }} path: ${{ env.DEST_DIRECTORY }} - uses: crazy-max/ghaction-import-gpg@v6 diff --git a/.github/workflows/call-release-doc.yaml b/.github/workflows/call-release-doc.yaml index 956bf3af66..48a1b27cff 100644 --- a/.github/workflows/call-release-doc.yaml +++ b/.github/workflows/call-release-doc.yaml @@ -154,7 +154,7 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4.1.8 with: - pattern: website_package_artifact_${{ env.REF }} + pattern: website_package_artifact_${{ needs.release_doc.outputs.ref }} path: ./ merge-multiple: true diff --git a/.github/workflows/trivy-scan-image.yaml b/.github/workflows/trivy-scan-image.yaml index 3a8ae50fe7..b86df21ce3 100644 --- a/.github/workflows/trivy-scan-image.yaml +++ b/.github/workflows/trivy-scan-image.yaml @@ -23,16 +23,10 @@ jobs: persist-credentials: false ref: ${{ inputs.ref }} - - name: Download spiderpool-agent image + - name: Download spiderpool-agent and spiderpool-controller image uses: actions/download-artifact@v4.1.8 with: - name: image-tar-spiderpool-agent-${{ inputs.ref }} - path: test/.download - - - name: Download spiderpool-controller image - uses: actions/download-artifact@v4.1.8 - with: - name: image-tar-spiderpool-controller-${{ inputs.ref }} + name: image-tar-spiderpool-*-${{ inputs.ref }} path: test/.download - name: List downloaded files