• Kubernetes Submit Queue's avatar
    Merge pull request #37380 from jsafrane/rbd-errors · 49fe0bea
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 39092, 39126, 37380, 37093, 39237)
    
    Improve error reporting in Ceph RBD provisioner.
    
    - We should report an error when user references a secret that cannot be found
    - We should report output of rbd create/delete commands, logging "exit code 1"
      is not enough.
    
    
    Before:
    ```
    Events:
      FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
      ---------     --------        -----   ----                            -------------   --------        ------                  -------
      33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": rbd: create volume failed, err: exit status 1
    ```
    
    After:
    
    ```
    Events:
      FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason                  Message
      ---------     --------        -----   ----                            -------------   --------        ------                  -------
      33m           33m             1       {persistentvolume-controller }                  Warning         ProvisioningFailed      Failed to provision volume with StorageClass "cephrbdprovisioner": failed to create rbd image: exit status 1, command output: rbd: couldn't connect to the cluster
    ```
    
    
    @rootfs, PTAL
    49fe0bea
Name
Last commit
Last update
..
BUILD Loading commit data...
OWNERS Loading commit data...
disk_manager.go Loading commit data...
doc.go Loading commit data...
rbd.go Loading commit data...
rbd_test.go Loading commit data...
rbd_util.go Loading commit data...