Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set admin user in windows image build #338

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Oct 7, 2022

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix: set admin user in windows image build
This PR fixes the following problem: failed to connect to csi-proxy v1beta with error=open \\.\\pipe\\csi-proxy-volume-v1beta2: Access is denied

I1007 12:40:03.767056    3796 common.go:348] StorageClass "local-disk" configured with MountDir "c:\\dev", HostDir "c:\\dev", VolumeMode "Filesystem", FsType "ext4", BlockCleanerCommand ["/scripts/shred.sh" "2"], NamePattern "nvme*"
I1007 12:40:04.066660    3796 main.go:66] Loaded configuration: {StorageClassConfig:map[local-disk:{HostDir:c:\dev MountDir:c:\dev BlockCleanerCommand:[/scripts/shred.sh 2] VolumeMode:Filesystem FsType:ext4 NamePattern:nvme*}] NodeLabelsForPV:[] UseAlphaAPI:false UseJobForCleaning:false MinResyncPeriod:{Duration:5m0s} UseNodeNameOnly:false LabelsForPV:map[] SetPVOwnerRef:false}
I1007 12:40:04.066660    3796 main.go:67] Ready to run...
I1007 12:40:04.069659    3796 common.go:425] Creating client using in-cluster config
I1007 12:40:04.091705    3796 main.go:132] Could not get node information (remaining retries: 2): Get "https://andy-aks1219-dns-a2701255.hcp.uksouth.azmk8s.io:443/api/v1/nodes/akswin000000": dial tcp: lookup andy-aks1219-dns-a2701255.hcp.uksouth.azmk8s.io: no such host
I1007 12:40:05.296040    3796 main.go:88] Starting controller
I1007 12:40:05.296040    3796 main.go:105] Starting metrics server at :8080
I1007 12:40:05.296040    3796 controller.go:47] Initializing volume cache
E1007 12:40:05.296040    3796 csi_proxy_windows.go:59] failed to connect to csi-proxy v1beta with error=open \\.\\pipe\\csi-proxy-volume-v1beta2: Access is denied.
F1007 12:40:05.296040    3796 controller.go:68] Error initializing VolumeUtil: open \\.\\pipe\\csi-proxy-volume-v1beta2: Access is denied.
goroutine 12 [running]:
k8s.io/klog/v2.stacks(0x1)
        /workspace/vendor/k8s.io/klog/v2/klog.go:1140 +0x8a
k8s.io/klog/v2.(*loggingT).output(0x31f1a00, 0x3, 0x0, 0xc000457260, 0x0, {0x28be7de, 0x1}, 0xc0000b9a10, 0x0)
        /workspace/vendor/k8s.io/klog/v2/klog.go:1088 +0x66f
k8s.io/klog/v2.(*loggingT).printf(0x2, 0x0, 0x0, {0x0, 0x0}, {0x22883f2, 0x21}, {0xc0000b9a10, 0x1, 0x1})
        /workspace/vendor/k8s.io/klog/v2/klog.go:753 +0x1c5
k8s.io/klog/v2.Fatalf(...)
        /workspace/vendor/k8s.io/klog/v2/klog.go:1642
sigs.k8s.io/sig-storage-local-static-provisioner/pkg/controller.StartLocalController(0xc000334480, {0x24d3420, 0xc0003ed320}, 0x24df038, 0xc0004572d0)
        /workspace/pkg/controller/controller.go:68 +0x4ce
created by main.main
        /workspace/cmd/local-volume-provisioner/main.go:91 +0x8e5

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x1dabc4e4fb0, 0x72)
        /usr/local/go/src/runtime/netpoll.go:234 +0x89
internal/poll.(*pollDesc).wait(0xc00001da28, 0xd1d574, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • update: it's stuck with following error since csi-proxy v0.2.2 only supports csi-proxy-filesystem-v1beta1
E1008 03:30:03.406419    9976 csi_proxy_windows.go:59] failed to connect to csi-proxy v1beta with error=open \\.\\pipe\\csi-proxy-filesystem-v1beta2: The system cannot find the file specified.
F1008 03:30:03.406419    9976 controller.go:68] Error initializing VolumeUtil: open \\.\\pipe\\csi-proxy-filesystem-v1beta2: The system cannot find the file specified.
# Source: provisioner/templates/daemonset_windows.yaml
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: v2.5.0-provisioner-win
  namespace: kube-system
  labels:
    helm.sh/chart: provisioner-2.6.0-alpha.1
    app.kubernetes.io/name: provisioner
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/instance: v2.5.0
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: provisioner
      app.kubernetes.io/instance: v2.5.0
  template:
    metadata:
      labels:
        app.kubernetes.io/name: provisioner
        app.kubernetes.io/instance: v2.5.0
      annotations:
        checksum/config: 20a3edec0c099121d7af4b08b9541580be7db170188398c208bcef5b57ea91a8
    spec:
      nodeSelector:
        kubernetes.io/os: windows
      tolerations:
        # an empty key operator Exists matches all keys, values and effects
        # which meants that this will tolerate everything
        - operator: "Exists"
      containers:
        - name: provisioner
          image: gcr.io/k8s-staging-sig-storage/local-volume-provisioner:canary
          env:
          - name: MY_NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: MY_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: JOB_CONTAINER_IMAGE
            value: k8s.gcr.io/sig-storage/local-volume-provisioner:v2.5.0
          ports:
          - name: metrics
            containerPort: 8080
          volumeMounts:
            - name: provisioner-config
              mountPath: /etc/provisioner/config
              readOnly: true
            - name: provisioner-dev
              mountPath: /dev
            - name: fast-disks
              mountPath: /mnt/fast-disks
              mountPropagation: HostToContainer
            - name: azure-config
              mountPath: C:\k
            - name: csi-proxy-fs-pipe-v1
              mountPath: \\.\pipe\csi-proxy-filesystem-v1
            - name: csi-proxy-disk-pipe-v1
              mountPath: \\.\pipe\csi-proxy-disk-v1
            - name: csi-proxy-volume-pipe-v1
              mountPath: \\.\pipe\csi-proxy-volume-v1
            # these paths are still included for compatibility, they're used
            # only if the node has still the beta version of the CSI proxy
            - name: csi-proxy-fs-pipe-v1beta1
              mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1
            - name: csi-proxy-disk-pipe-v1beta2
              mountPath: \\.\pipe\csi-proxy-disk-v1beta2
            - name: csi-proxy-volume-pipe-v1beta2
              mountPath: \\.\pipe\csi-proxy-volume-v1beta2
      volumes:
        - name: csi-proxy-fs-pipe-v1
          hostPath:
            path: \\.\pipe\csi-proxy-filesystem-v1
        - name: csi-proxy-disk-pipe-v1
          hostPath:
            path: \\.\pipe\csi-proxy-disk-v1
        - name: csi-proxy-volume-pipe-v1
          hostPath:
            path: \\.\pipe\csi-proxy-volume-v1
        # these paths are still included for compatibility, they're used
        # only if the node has still the beta version of the CSI proxy
        - name: csi-proxy-fs-pipe-v1beta1
          hostPath:
            path: \\.\pipe\csi-proxy-filesystem-v1beta1
        - name: csi-proxy-disk-pipe-v1beta2
          hostPath:
            path: \\.\pipe\csi-proxy-disk-v1beta2
        - name: csi-proxy-volume-pipe-v1beta2
          hostPath:
            path: \\.\pipe\csi-proxy-volume-v1beta2
        - name: azure-config
          hostPath:
            path: C:\k
            type: DirectoryOrCreate
        - name: provisioner-config
          configMap:
            name: local-provisioner-config
        - name: provisioner-dev
          hostPath:
            path: "C:\\dev"
            # If nothing exists at the given path, an empty directory will be
            # created there as needed with permission set to 0755,
            # having the same group and ownership with Kubelet.
            type: DirectoryOrCreate
        - name: fast-disks
          hostPath:
            path: "C:\\k"

Release note:

fix: set admin user in windows image build

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 7, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 7, 2022
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 7, 2022
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 8, 2022
Copy link
Member

@ZeroMagic ZeroMagic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, ZeroMagic

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 40b7334 into kubernetes-sigs:master Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants