Skip to content

Instantly share code, notes, and snippets.

@fcojperez
Last active December 14, 2023 08:31
Show Gist options
  • Save fcojperez/5387cd1782684e4cba6cee68045941f0 to your computer and use it in GitHub Desktop.
Save fcojperez/5387cd1782684e4cba6cee68045941f0 to your computer and use it in GitHub Desktop.
cluster/gce/gci/append_or_replace_prefixed_line_test.go: cmd := exec.Command("bash", "-c", args)
cluster/gce/gci/configure_helper_test.go: cmd := exec.Command("bash", "-c", args)
cmd/importverifier/importverifier.go: cmd := "go"
cmd/kubeadm/app/cmd/completion_test.go: cmd := newCmdCompletion(&out, "")
cmd/kubeadm/app/preflight/checks.go: _, err := ipc.exec.LookPath(ipc.executable)
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "conntrack", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "crictl", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ebtables", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ethtool", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ip", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "iptables", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "mount", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "nsenter", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "socat", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "tc", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "touch", mandatory: false, exec: execer})
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobarbaz", exec: exec.New()}}, true, "\t[WARNING FileExisting-foobarbaz]: foobarbaz not found in system path\n"},
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobarbaz", mandatory: true, exec: exec.New()}}, false, ""},
cmd/kubeadm/app/preflight/checks_test.go: {[]Checker{InPathCheck{executable: "foobar", mandatory: false, exec: exec.New(), suggestion: "install foobar"}}, true, "\t[WARNING FileExisting-foobar]: foobar not found in system path\nSuggestion: install foobar\n"},
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: err := exec.Command("systemctl", args...).Run()
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: _, err := exec.LookPath("systemctl")
cmd/kubeadm/app/util/initsystem/initsystem_unix.go: if err := exec.Command("systemctl", "daemon-reload").Run(); err != nil {
cmd/kubeadm/app/util/runtime/runtime.go: cmd := runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket(), "-i", runtime.Socket()}, args...)...)
cmd/kubeadm/app/util/runtime/runtime.go: crictlPath, err := execer.LookPath(toolName)
pkg/credentialprovider/gcp/metadata.go: data, err := exec.Command("wmic", "computersystem", "get", "model").Output()
pkg/kubelet/kubelet_pods_test.go: cmd := []string{"ls"}
pkg/kubelet/kubelet_server_journal_linux.go: cmd := exec.CommandContext(ctx, "journalctl", []string{"--field", "_SYSTEMD_UNIT"}...)
pkg/kubelet/prober/prober_test.go: cmd := []string{"/foo", "bar"}
pkg/kubelet/winstats/perfcounter_nodestats.go: result, err := exec.Command("wmic", "csproduct", "get", "UUID").Output()
pkg/proxy/conntrack/conntrack.go: conntrackPath, err := execer.LookPath("conntrack")
pkg/proxy/ipvs/ipset/ipset.go: cmd := exec.Command(IPSetCmd, "--version")
pkg/util/iptables/iptables.go: cmd := exec.Command(iptablesRestoreCmd, "--version")
pkg/volume/cephfs/cephfs.go: if _, err := execute.Command("/usr/bin/test", "-x", "/sbin/mount.fuse.ceph").CombinedOutput(); err == nil {
pkg/volume/fc/fc_util.go: out, err := exec.Command("blockdev", "--flushbufs", deviceName).CombinedOutput()
pkg/volume/fc/fc_util.go: out, err := exec.Command("multipath", "-f", dmDevice).CombinedOutput()
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", args, dir); err != nil {
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", []string{"checkout", b.revision}, subdir); err != nil {
pkg/volume/git_repo/git_repo.go: if output, err := b.execCommand("git", []string{"reset", "--hard"}, subdir); err != nil {
pkg/volume/iscsi/iscsi_util.go: out, err := b.exec.Command("iscsiadm", "-m", "discoverydb", "-t", "sendtargets", "-p", tp, "-I", b.Iface, "-o", "update", "-n", k, "-v", v).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := b.exec.Command("iscsiadm", "-m", "node", "-p", tp, "-T", b.Iqn, "-I", b.Iface, "-o", "update", "-n", k, "-v", v).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := exec.Command("iscsiadm", deleteArgs...).CombinedOutput()
pkg/volume/iscsi/iscsi_util.go: out, err := exec.Command("iscsiadm", logoutArgs...).CombinedOutput()
pkg/volume/rbd/rbd_util.go: _, err := b.exec.Command("modprobe", "rbd").CombinedOutput()
pkg/volume/rbd/rbd_util.go: _, err := e.Command("modprobe", "nbd").CombinedOutput()
pkg/volume/rbd/rbd_util.go: if _, err := e.Command("rbd-nbd", "--version").CombinedOutput(); err != nil {
pkg/volume/testing/testing.go: out, err := exec.New().Command("nice", "-n", "19", "du", "-x", "-s", "-B", "1", tmpDir).CombinedOutput()
pkg/volume/util/fsquota/common/quota_common_linux_impl.go: cmd := exec.Command(lsattrCmd, "-pd", path)
pkg/volume/util/fsquota/common/quota_common_linux_impl.go: cmd := exec.Command(quotaCmd, "-t", mountsFile, "-P/dev/null", "-D/dev/null", "-x", "-f", mountpoint, "-c", command)
pkg/volume/util/hostutil/hostutil_test.go: outputBytes, err := exec.New().Command("mknod", tempBlockFile, "b", "89", "1").CombinedOutput()
pkg/volume/util/hostutil/hostutil_test.go: outputBytes, err := exec.New().Command("mknod", tempCharFile, "c", "89", "1").CombinedOutput()
pkg/volume/util/subpath/subpath_windows.go: cmd := exec.Command("powershell", "/c", "$ErrorActionPreference = 'Stop'; (Get-Item -Force -LiteralPath $env:linkpath).LinkType")
pkg/volume/util/subpath/subpath_windows.go: cmd := exec.Command("powershell", "/c", "$ErrorActionPreference = 'Stop'; (Get-Item -Force -LiteralPath $env:linkpath).Target")
pkg/volume/util/subpath/subpath_windows_test.go: if output, err := exec.Command("cmd", "/c", "mklink", "/D", link, target).CombinedOutput(); err != nil {
pkg/volume/util/util.go: cmd := exec.Command("powershell", "/c", cmdString)
pkg/volume/vsphere_volume/vsphere_volume_util_windows.go: cmd := exec.Command("powershell", "/c", "Get-Disk | Select Number, SerialNumber | ConvertTo-JSON")
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go: cmd := exec.Command(protoc, "--decode_raw")
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go: protoc, err := exec.LookPath("protoc")
staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go: cmd := exec.Command("protoc", append(args, path)...)
staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go: if _, err := exec.LookPath("protoc"); err != nil {
staging/src/k8s.io/kubectl/pkg/cmd/annotate/annotate_test.go: cmd := NewCmdAnnotate("kubectl", tf, iostreams)
staging/src/k8s.io/kubectl/pkg/cmd/annotate/annotate_test.go: cmd := NewCmdAnnotate("kubectl", tf, iostreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go: cmd := NewCmdApply("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/cmd.go: lp, err := exec.LookPath(name)
staging/src/k8s.io/kubectl/pkg/cmd/cmd.go: path, err := exec.LookPath(fmt.Sprintf("%s-%s", prefix, filename))
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, genericiooptions.NewTestIOStreamsDiscard())
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/describe/describe_test.go: cmd := NewCmdDescribe("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/explain/explain_test.go: cmd := explain.NewCmdExplain("kubectl", tf, genericiooptions.NewTestIOStreamsDiscard())
staging/src/k8s.io/kubectl/pkg/cmd/explain/explain_test.go: cmd := explain.NewCmdExplain("kubectl", tf, ioStreams)
staging/src/k8s.io/kubectl/pkg/cmd/get/get_test.go: cmd := NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/get/get_test.go: cmd := NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/kubectl/pkg/cmd/plugin/plugin_completion.go: path, err := exec.LookPath(pluginCompExec)
staging/src/k8s.io/kubectl/pkg/util/completion/completion_test.go: cmd := get.NewCmdGet("kubectl", tf, streams)
staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go: result, err := exec.Command("wmic", "bios", "get", "serialnumber").Output()
staging/src/k8s.io/mount-utils/mount_linux.go: cmd := exec.Command("systemd-run", "--description=Kubernetes systemd probe", "--scope", "true")
staging/src/k8s.io/mount-utils/mount_linux.go: cmd := exec.Command("umount", path)
staging/src/k8s.io/mount-utils/mount_linux.go: dataOut, err := exec.Command("blkid", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/mount_linux.go: if _, err := exec.LookPath("systemd-run"); err != nil {
staging/src/k8s.io/mount-utils/mount_linux.go: out, err := mounter.Exec.Command("fsck", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", cmdLine)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", "(Get-Disk -DeviceId $env:diskID | Get-Partition | Get-Volume | Sort-Object -Property UniqueId).UniqueId")
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Get-SmbGlobalMapping -RemotePath $Env:smbremotepath`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Remove-SmbGlobalMapping -RemotePath $Env:smbremotepath -Force`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := exec.Command("powershell", "/c", `Test-Path $Env:remoteapth`)
staging/src/k8s.io/mount-utils/mount_windows.go: cmd := mounter.Exec.Command("powershell", "/c", cmdString)
staging/src/k8s.io/mount-utils/mount_windows_test.go: if output, err := exec.Command("cmd", "/c", "mklink", "/D", link, target).CombinedOutput(); err != nil {
staging/src/k8s.io/mount-utils/mount_windows_test.go: if output, err := exec.Command("cmd", "/c", "rmdir", link).CombinedOutput(); err != nil {
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("btrfs", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("btrfs", "inspect-internal", "dump-super", "-f", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("dumpe2fs", "-h", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("resize2fs", devicePath).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("xfs_growfs", args...).CombinedOutput()
staging/src/k8s.io/mount-utils/resizefs_linux.go: output, err := resizefs.exec.Command("xfs_io", "-c", "statfs", devicePath).CombinedOutput()
test/e2e/apimachinery/apiserver_identity.go: cmd := "pidof kube-apiserver | xargs sudo kill"
test/e2e/apps/statefulset.go: cmd := "echo $(hostname) | dd of=/data/hostname conv=fsync"
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("mv -v /tmp%v /usr/local/apache2/htdocs/ || true", path)
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("mv -v /usr/local/apache2/htdocs%v /tmp/ || true", path)
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("/opt/zookeeper/bin/zkCli.sh create /%v %v", k, v)
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("/opt/zookeeper/bin/zkCli.sh get /%v", key)
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("UPSERT INTO foo.bar VALUES ('%v', '%v');", k, v)
test/e2e/apps/statefulset.go: cmd := fmt.Sprintf("use statefulset; insert into foo (k, v) values (\"%v\", \"%v\");", k, v)
test/e2e/autoscaling/cluster_size_autoscaling.go: if output, err := exec.Command("gcloud", "compute", "instances", "list",
test/e2e/cloud/gcp/common/upgrade_mechanics.go: cmd := exec.Command(traceroute, "-I", framework.APIAddress())
test/e2e/cloud/gcp/common/upgrade_mechanics.go: traceroute, err := exec.LookPath("traceroute")
test/e2e/cloud/gcp/gke_node_pools.go: out, err := exec.Command("gcloud", "container", "node-pools", "create",
test/e2e/cloud/gcp/ha_master.go: output, err := exec.Command("gcloud", "compute", "zones", "list", "--filter=region="+region,
test/e2e/cloud/gcp/ha_master.go: region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").Output()
test/e2e/cloud/gcp/reboot.go: cmd := fmt.Sprintf("cat %v && rm %v", logPath, logPath)
test/e2e/cloud/gcp/reboot.go: cmd := "nohup sh -c '" +
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "echo ok >/tmp/health; sleep 10; rm -rf /tmp/health; sleep 600"}
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "echo ok >/tmp/health; sleep 32; echo ok >/tmp/startup; sleep 600"}
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "echo ok >/tmp/health; sleep 600"}
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "sleep 1000"}
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "sleep 10; echo ok >/tmp/startup; sleep 600"}
test/e2e/common/node/container_probe.go: cmd := []string{"/bin/sh", "-c", "sleep 600"}
test/e2e/common/node/expansion.go: cmd := "touch /volume_mount/mypath/foo/test.log"
test/e2e/common/node/privileged.go: cmd := []string{"ip", "link", "add", "dummy1", "type", "dummy"}
test/e2e/e2e.go: outputBytes, err := exec.Command("gcloud", args...).CombinedOutput()
test/e2e/framework/kubesystem/kubesystem.go: cmd := "curl -k https://localhost:" + strconv.Itoa(framework.KubeControllerManagerPort) + "/healthz"
test/e2e/framework/kubesystem/kubesystem.go: cmd := "pidof kube-controller-manager | xargs sudo kill"
test/e2e/framework/network/utils.go: cmd := fmt.Sprintf("curl -g -q -s -o /dev/null -w %%{http_code} http://%s:%d%s",
test/e2e/framework/network/utils.go: cmd := fmt.Sprintf("curl -i -q -s --connect-timeout 1 http://localhost:%d%s", port, path)
test/e2e/framework/network/utils.go: cmd := fmt.Sprintf("curl -o /dev/null -i -q -s -w %%{http_code} --connect-timeout 1 http://localhost:%d%s", port, path)
test/e2e/framework/network/utils.go: cmd := makeCURLDialCommand(ipPort, "hostName", protocol, targetIP, targetPort)
test/e2e/framework/providers/gce/gce.go: output, err := exec.Command("gcloud", "compute", "instance-groups", "managed",
test/e2e/framework/providers/gce/gce.go: output, err := exec.Command("gcloud", "compute", "instance-groups", "managed", "list",
test/e2e/framework/providers/gce/gce.go: output, err := exec.Command("gcloud", "compute", "instance-groups", "managed", "resize",
test/e2e/framework/providers/gce/ingress.go: output, err := exec.Command("gcloud", argList...).CombinedOutput()
test/e2e/framework/providers/gce/ingress.go: output, err := exec.Command("gcloud", argsList...).CombinedOutput()
test/e2e/framework/providers/gce/ingress.go: output, err := exec.Command("gcloud", command...).Output()
test/e2e/framework/service/jig.go: cmd := ""
test/e2e/framework/service/jig.go: cmd := fmt.Sprintf("nslookup %s", svcName)
test/e2e/framework/statefulset/rest.go: cmd := "printf $(hostname)"
test/e2e/kubectl/kubectl.go: cmd := tk.KubectlCmd("proxy", fmt.Sprintf("--unix-socket=%s", path))
test/e2e/kubectl/kubectl.go: cmd := tk.KubectlCmd("proxy", "-p", "0", "--disable-filter")
test/e2e/kubectl/portforward.go: cmd := tk.KubectlCmd("port-forward", fmt.Sprintf("--namespace=%v", ns), podName, fmt.Sprintf(":%d", port))
test/e2e/network/conntrack.go: cmd := fmt.Sprintf(`date; for i in $(seq 1 3000); do echo "$(date) Try: ${i}"; echo hostname | nc -u -w 5 -p %d %s %d; echo; done`, srcPort, serverNodeInfo.nodeIP, udpService.Spec.Ports[0].NodePort)
test/e2e/network/conntrack.go: cmd := fmt.Sprintf(`date; for i in $(seq 1 3000); do echo "$(date) Try: ${i}"; echo hostname | nc -u -w 5 -p %d %s %d; echo; done`, srcPort, udpService.Spec.ClusterIP, udpService.Spec.Ports[0].Port)
test/e2e/network/dns_common.go: cmd := []string{"dig", "+short"}
test/e2e/network/dns.go: cmd := []string{"/agnhost", arg}
test/e2e/network/dns.go: cmd := []string{"cat", "/etc/resolv.conf"}
test/e2e/network/dual_stack.go: cmd := []string{"/bin/sh", "-c", curl}
test/e2e/network/funny_ips.go: cmd := fmt.Sprintf("echo hostName | nc -v -t -w 2 %s %v", ip.String(), servicePort)
test/e2e/network/kube_proxy.go: cmd := fmt.Sprintf("conntrack -L -f %s -d %v "+
test/e2e/network/networking.go: cmd := strings.Join(append(deleteRuleCmds, deleteChainCmds...), "\n")
test/e2e/network/service.go: cmd := "curl -q -s --connect-timeout 1 http://localhost:10249/proxyMode"
test/e2e/network/service.go: cmd := fmt.Sprintf("/agnhost connect --timeout=3s %s", serviceAddress)
test/e2e/network/service.go: cmd := fmt.Sprintf("curl -q -s --connect-timeout 2 http://%s:%d/", svcName, port)
test/e2e/network/service.go: cmd := fmt.Sprintf(`curl -s -o /dev/null -w "%%{http_code}" --max-time 5 http://%s/healthz`, healthCheckNodePortAddr)
test/e2e/network/service.go: cmd := fmt.Sprintf("for i in $(seq 0 %d); do echo; %s ; done", AffinityConfirmCount, curl)
test/e2e/network/service.go: cmd := fmt.Sprintf("for i in $(seq 1 %d); do %s http://%s 2>&1 || true; echo; done",
test/e2e/network/service.go: cmd := fmt.Sprintf("wget -T 5 -qO- %q", target)
test/e2e/network/topology_hints.go: cmd := fmt.Sprintf(`date; for i in $(seq 1 3000); do sleep 1; echo "Date: $(date) Try: ${i}"; curl -q -s --connect-timeout 2 http://%s:80/ ; echo; done`, svc.Name)
test/e2e/network/util.go: cmd := ""
test/e2e/network/util.go: cmd := "lsmod | grep sctp"
test/e2e_node/apparmor_test.go: cmd := exec.Command("apparmor_parser", "-r", "-W", f.Name())
test/e2e_node/builder/build.go: cmd := exec.Command("make", "-C", k8sRoot,
test/e2e_node/container_manager_test.go: out, err := exec.Command("sudo", "cat", procfsPath).CombinedOutput()
test/e2e_node/cpu_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"NUMA node(s):\" | cut -d \":\" -f 2").Output()
test/e2e_node/cpu_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"Thread(s) per core:\" | cut -d \":\" -f 2").Output()
test/e2e_node/cpu_manager_test.go: out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat /sys/devices/system/cpu/cpu%d/topology/core_siblings_list | tr -d \"\n\r\"", cpuRes)).Output()
test/e2e_node/cpu_manager_test.go: out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat /sys/devices/system/cpu/cpu%d/topology/thread_siblings_list | tr -d \"\n\r\"", cpuID)).Output()
test/e2e_node/cpu_manager_test.go: out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat /sys/devices/system/cpu/cpu%d/topology/thread_siblings_list | tr -d \"\n\r\"", cpuRes)).Output()
test/e2e_node/e2e_node_suite_test.go: output, err := exec.Command("systemctl", "mask", "--now", "locksmithd").CombinedOutput()
test/e2e_node/environment/conformance.go: kubecmd, err := exec.Command("ps", "aux").CombinedOutput()
test/e2e_node/environment/conformance.go: out, err := exec.Command("iptables", "-L", "INPUT").CombinedOutput()
test/e2e_node/hugepages_test.go: if err := exec.Command("/bin/sh", "-c", command).Run(); err != nil {
test/e2e_node/hugepages_test.go: if err := exec.Command("/bin/sh", "-c", command).Run(); err != nil {
test/e2e_node/hugepages_test.go: if err := exec.Command("/bin/sh", "-c", "echo 1 > /proc/sys/vm/compact_memory").Run(); err != nil {
test/e2e_node/hugepages_test.go: outData, err := exec.Command("/bin/sh", "-c", command).Output()
test/e2e_node/kubeletconfig/kubeletconfig.go: cmd := tk.KubectlCmd("proxy", "-p", "0")
test/e2e/node/kubelet.go: cmd := tk.KubectlCmd("get", "--raw", queryCommand)
test/e2e_node/memory_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu").Output()
test/e2e_node/memory_manager_test.go: out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("cat %s", memoryManagerStateFile)).Output()
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("cat /mnt/test/%s/file", mountName)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("mkdir %[1]q/host; mount -t tmpfs e2e-mount-propagation-host %[1]q/host; echo host > %[1]q/host/file", hostDir)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("mkdir /mnt/test/%[1]s; sleep 3600", name)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("mount -t tmpfs e2e-mount-propagation-%[1]s /mnt/test/%[1]s; echo %[1]s > /mnt/test/%[1]s/file", podName)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("%s cat \"%s/%s/file\"", enterKubeletMountNS, hostDir, mountName)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("%s test ! -e \"%s/%s/file\"", enterKubeletMountNS, hostDir, podName)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("test -d /mnt/test/%s", dirName)
test/e2e/node/mount_propagation.go: cmd := fmt.Sprintf("umount %q/host", hostDir)
test/e2e/node/node_problem_detector.go: cmd := "systemctl status node-problem-detector.service"
test/e2e_node/node_shutdown_linux_test.go: cmd := "systemctl daemon-reload"
test/e2e_node/node_shutdown_linux_test.go: _, err := runCommand("sh", "-c", cmd)
test/e2e_node/node_shutdown_linux_test.go: if _, err := exec.LookPath("systemd-run"); err == nil {
test/e2e_node/node_shutdown_linux_test.go: if version, verr := exec.Command("systemd-run", "--version").Output(); verr == nil {
test/e2e_node/perf/workloads/npb_ep.go: cmd := "/bin/sh"
test/e2e_node/perf/workloads/tf_wide_deep.go: cmd := "/bin/sh"
test/e2e/node/pod_resize.go: cmd := []string{"head", "-n", "1", cgPath}
test/e2e/node/pod_resize.go: cmd := "trap exit TERM; while true; do sleep 1; done"
test/e2e_node/remote/cadvisor_e2e.go: if err := runCommand("cp", "-R", cadvisorRootDir, fmt.Sprintf("%s/", tardir)); err != nil {
test/e2e_node/remote/node_conformance.go: cmd := exec.Command("make", "-C", conformancePath, "BIN_DIR="+binDir,
test/e2e_node/remote/node_conformance.go: cmd := fmt.Sprintf("'timeout -k 30s %fs docker run --rm --privileged=true --net=host -v /:/rootfs -v %s:%s -v %s:/var/result -e TEST_ARGS=--report-prefix=%s -e EXTRA_ENVS=%s -e TEST_ARGS=--bearer-token=%s %s'",
test/e2e_node/remote/node_conformance.go: output, err := exec.Command("cp", source, filepath.Join(tardir, file)).CombinedOutput()
test/e2e_node/remote/node_e2e.go: cmd := getSSHCommand(" && ",
test/e2e_node/remote/node_e2e.go: out, err := exec.Command("cp", source, filepath.Join(tardir, bin)).CombinedOutput()
test/e2e_node/remote/node_e2e.go: out, err := exec.Command("cp", source, tardir).CombinedOutput()
test/e2e_node/remote/remote.go: cmd := getSSHCommand(" && ",
test/e2e_node/remote/remote.go: out, err := exec.Command("tar", "-zcvf", archiveName, "-C", tardir, ".").CombinedOutput()
test/e2e_node/remote/run_remote_suite.go: output, err := exec.Command("./test/e2e_node/gubernator.sh", "y").Output()
test/e2e_node/remote/utils.go: cmd := getSSHCommand(" ; ",
test/e2e_node/remote/utils.go: cmd := getSSHCommand("&&",
test/e2e_node/restart_test.go: if _, err := exec.Command("sudo", "ps", "-p", fmt.Sprintf("%d", pid)).CombinedOutput(); err != nil {
test/e2e_node/restart_test.go: if stdout, err := exec.Command("sudo", "kill", "-SIGKILL", fmt.Sprintf("%d", pid)).CombinedOutput(); err != nil {
test/e2e_node/restart_test.go: stdout, err := exec.Command("sudo", "systemctl", "reset-failed", "dbus").CombinedOutput()
test/e2e_node/runner/local/run_local.go: cmd := exec.Command("sudo", "sh", "-c", strings.Join(append([]string{name}, args...), " "))
test/e2e_node/security_context_test.go: _, err := exec.Command("sh", "-c", fmt.Sprintf("ipcrm -m %q", hostSharedMemoryID)).Output()
test/e2e_node/security_context_test.go: output, err := exec.Command("sh", "-c", "ipcmk -M 1048576 | awk '{print $NF}'").Output()
test/e2e_node/services/kubelet.go: if systemdRun, err := exec.LookPath("systemd-run"); err == nil {
test/e2e_node/services/kubelet.go: if version, verr := exec.Command("systemd-run", "--version").Output(); verr == nil {
test/e2e_node/services/server.go: cmd := exec.Command("kill", signal, strconv.Itoa(pid))
test/e2e_node/services/server.go: err := exec.Command("sudo", "systemctl", "stop", s.systemdUnitName).Run()
test/e2e_node/services/services.go: _, err := exec.LookPath("journalctl")
test/e2e_node/services/services.go: if out, err := exec.Command("chmod", "a+r", target).CombinedOutput(); err != nil {
test/e2e_node/services/services.go: if out, err := exec.Command("cp", src, target).CombinedOutput(); err != nil {
test/e2e_node/services/services.go: out, err := exec.Command("journalctl", log.JournalctlCommand...).CombinedOutput()
test/e2e_node/topology_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"Core(s) per socket:\" | cut -d \":\" -f 2").Output()
test/e2e_node/topology_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"NUMA node(s):\" | cut -d \":\" -f 2").Output()
test/e2e_node/topology_manager_test.go: outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"Thread(s) per core:\" | cut -d \":\" -f 2").Output()
test/e2e_node/util.go: cmd := fmt.Sprintf("echo 0 > /sys/fs/cgroup/memory/%s/memory.force_empty", toCgroupFsName(cm.NewCgroupName(cm.RootCgroupName, defaultNodeAllocatableCgroup)))
test/e2e_node/util.go: err := exec.Command("/bin/sh", "-c", fmt.Sprintf("rm -f %s", stateFileName)).Run()
test/e2e_node/util.go: _, err := exec.Command("sudo", "sh", "-c", cmd).CombinedOutput()
test/e2e_node/util.go: stdout, err := exec.Command("sudo", cmdLine...).CombinedOutput()
test/e2e_node/util.go: stdout, err := exec.Command("sudo", "systemctl", "reset-failed", kubeletServiceName).CombinedOutput()
test/e2e_node/util.go: stdout, err := exec.Command("sudo", "systemctl", "restart", kubeletServiceName).CombinedOutput()
test/e2e_node/util_sriov_linux.go: outData, err := exec.Command("/bin/sh", "-c", "ls /sys/bus/pci/devices/*/physfn | wc -w").Output()
test/e2e/storage/drivers/in_tree.go: cmd := fmt.Sprintf("mkdir %v -m 777 && ln -s %v %v", sourcePath, sourcePath, targetPath)
test/e2e/storage/drivers/in_tree.go: cmd := fmt.Sprintf("rm -rf %v&& rm -rf %v", v.targetPath, v.sourcePath)
test/e2e/storage/flexvolume.go: cmd := fmt.Sprintf("sudo mkdir -p %s", flexDir)
test/e2e/storage/flexvolume.go: cmd := fmt.Sprintf("sudo rm -r %s", flexDir)
test/e2e/storage/host_path_type.go: cmd := fmt.Sprintf("mknod %s b 89 1", path.Join(mountBaseDir, "ablkdev"))
test/e2e/storage/host_path_type.go: cmd := fmt.Sprintf("mknod %s c 89 1", path.Join(mountBaseDir, "achardev"))
test/e2e/storage/nfs_persistent_volume-disruptive.go: cmd := "pidof kube-controller-manager"
test/e2e/storage/static_pods.go: cmd := exec.Command("docker", args...)
test/e2e/storage/testsuites/fsgroupchangepolicy.go: cmd := fmt.Sprintf("touch %s", rootDirFilePath)
test/e2e/storage/testsuites/provisioning.go: cmd := fmt.Sprintf("stat -f -c %%s %v", mountPath)
test/e2e/storage/testsuites/volumemode.go: cmd := fmt.Sprintf("find %s -mindepth 2 -maxdepth 2", path)
test/e2e/storage/testsuites/volumes.go: cmd := "echo \"" + content + "\" > " + fullPath + "; .\\" + fullPath
test/e2e/storage/testsuites/volumes.go: cmd := fmt.Sprintf("echo \"%s\" > %s; chmod u+x %s; %s;", content, fullPath, fullPath, fullPath)
test/e2e/storage/utils/local.go: cmd := fmt.Sprintf("E2E_LOOP_DEV=$(losetup | grep %s/file | awk '{ print $1 }') 2>&1 > /dev/null && echo ${E2E_LOOP_DEV}", dir)
test/e2e/storage/utils/local.go: cmd := fmt.Sprintf("mkdir %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDir)
test/e2e/storage/utils/local.go: cmd := fmt.Sprintf("mkdir %s && mount --bind %s %s", hostDir, hostDir, hostDir)
test/e2e/storage/utils/local.go: cmd := fmt.Sprintf("mkdir %s && mount --bind %s %s && ln -s %s %s", hostDirBackend, hostDirBackend, hostDirBackend, hostDirBackend, hostDir)
test/e2e/storage/utils/local.go: cmd := fmt.Sprintf("mkfs -t ext4 %s && mount -t ext4 %s %s && chmod o+rwx %s", loopDev, loopDev, loopDir, loopDir)
test/e2e/storage/utils/utils.go: cmd := fmt.Sprintf("chgrp %s %s", targetGid, filePath)
test/e2e/storage/utils/utils.go: cmd := fmt.Sprintf("ls -l %s", filePath)
test/e2e/storage/vsphere/vsphere_volume_master_restart.go: cmd := "curl http://localhost:" + strconv.Itoa(ports.KubeletReadOnlyPort) + "/healthz"
test/e2e/upgrades/apps/statefulset.go: cmd := "echo $(hostname) > /data/hostname; sync;"
test/e2e/windows/dns.go: cmd := []string{"ipconfig", "/all"}
test/e2e/windows/hybrid_network.go: cmd := []string{"/bin/sh", "-c", nc}
test/e2e/windows/hybrid_network.go: cmd := []string{"cmd", "/c", curl}
test/e2e/windows/volumes.go: cmd := []string{"cmd", "/c", "echo windows-volume-test", ">", filePath}
test/e2e/windows/volumes.go: readcmd := []string{"cmd", "/c", "type", filePath}
test/e2e/windows/volumes.go: writecmd := []string{"cmd", "/c", "echo windows-volume-test", ">", filePath}
test/images/agnhost/guestbook/guestbook.go: cmd := strings.ToLower(values.Query().Get("cmd"))
test/images/agnhost/mounttest/mt_utils_windows.go: cmd := exec.Command("powershell.exe", "-NonInteractive", "./filePermissions.ps1",
test/images/agnhost/netexec/netexec.go: cmd := r.FormValue("shellCommand")
test/images/apparmor-loader/loader.go: cmd := exec.Command(parser, "--names", path)
test/images/apparmor-loader/loader.go: cmd := exec.Command(parser, "--verbose", path)
test/images/apparmor-loader/loader.go: if _, err := exec.LookPath(parser); err != nil {
vendor/github.com/cyphar/filepath-securejoin/README.md: cmd := exec.Command("chroot", root,
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "-f", "-")
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", "chain", string(nft.family), nft.table, chain)
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", objectType, string(nft.family), nft.table, name)
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.CommandContext(ctx, nft.path, "--json", "list", typePlural, string(nft.family))
vendor/github.com/danwinship/knftables/nftables.go: cmd := exec.Command(nft.path, "--check", "add", "table", string(nft.family), nft.table)
vendor/github.com/godbus/dbus/v5/conn_darwin.go: cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET")
vendor/github.com/godbus/dbus/v5/conn_other.go: cmd := execCommand("dbus-launch")
vendor/github.com/google/cadvisor/fs/fs.go: out, err := exec.Command("dmsetup", "status", poolName).Output()
vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go: cmd := exec.Command("uname", "-s")
vendor/github.com/moby/ipvs/netlink_linux.go: if out, err := exec.Command("modprobe", "-va", "ip_vs").CombinedOutput(); err != nil {
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go: cmd := exec.Command("go", args...)
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go: cmd := exec.Command("go", "tool", "cover", "-func", profile)
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go: out, err := exec.Command("go", "fmt", path).CombinedOutput()
vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go: cmd := exec.Command("go", "list", "-m", "github.com/onsi/ginkgo/v2")
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go: b, err := exec.Command("busctl", "--user", "--no-pager", "status").CombinedOutput()
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go: b, err := exec.Command("systemctl", "--user", "--no-pager", "show-environment").CombinedOutput()
vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go: name, err := exec.LookPath(l.config.Args[0])
vendor/github.com/opencontainers/runc/libcontainer/system/linux.go: name, err := exec.LookPath(cmd)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", args...)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", args[i]...)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "exec", id, "tar", "Ccf", path.Dir(file), "-", path.Base(file))
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "exec", "-i", id, "tar", "Cxf", path.Dir(file), "-")
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "inspect", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "pause", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "restart", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "run", "--rm", "-i", "-v", name+":"+"/"+name, image, "tar", "-C", "/"+name, "-xf", "-")
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", start, c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command("docker", "stop", c.id)
vendor/github.com/vmware/govmomi/simulator/container.go: cmd := exec.Command(shell, "-c", strings.Join(args, " "))
vendor/github.com/vmware/govmomi/simulator/container.go: if sh, err := exec.LookPath("bash"); err != nil {
vendor/github.com/vmware/govmomi/toolbox/process/process.go: if sh, err := exec.LookPath("bash"); err != nil {
vendor/github.com/vmware/govmomi/toolbox/process/process.go: name, err := exec.LookPath(r.ProgramPath)
vendor/golang.org/x/sys/execabs/execabs.go: path, err := exec.LookPath(file)
vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go: cmd := exec.Command("go", "list", "-json", "-export", "--", importPath)
vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go: cmd := exec.Command("go", "list", "-export", "-f", "{{.Export}}", pkgDir)
vendor/golang.org/x/tools/internal/gocommand/invoke.go: cmd := exec.Command("go", goArgs...)
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go: if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go: result, err := r.execCommand("ioreg", "-rd1", "-c", "IOPlatformExpertDevice")
vendor/k8s.io/gengo/parser/parse.go: if p, err := exec.Command("which", "go").CombinedOutput(); err == nil {
vendor/k8s.io/system-validators/validators/docker_validator.go: cmd := exec.Command("docker", "info", "--format", "{{json .}}")
vendor/k8s.io/system-validators/validators/os_validator.go: os, err := exec.Command("uname").CombinedOutput()
vendor/k8s.io/system-validators/validators/package_validator_linux.go: _, err := exec.LookPath("dpkg-query")
vendor/k8s.io/system-validators/validators/package_validator_linux.go: output, err := exec.Command("dpkg-query", "--show", "--showformat='${Version}'", packageName).Output()
vendor/k8s.io/system-validators/validators/package_validator_linux.go: output, err := exec.Command("uname", "-r").Output()
vendor/k8s.io/system-validators/validators/types_unix.go: releaseVersion, err := exec.Command("uname", "-r").CombinedOutput()
vendor/k8s.io/system-validators/validators/types_windows.go: releaseVersion, err := exec.Command("powershell", args...).Output()
vendor/k8s.io/utils/exec/exec.go: path, err := osexec.LookPath(file)
vendor/sigs.k8s.io/kustomize/api/internal/git/gitrunner.go: gitProgram, err := exec.LookPath("git")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment