-
Notifications
You must be signed in to change notification settings - Fork 31
Attach failing with NotAuthenticated error. #404
Comments
I couldn't attach logs because of huge file size, even with tar.gz. Here is the analysis so far-
|
@abrarshivani and I discussed this issue and have finalized this solution: VCP code is caching VirtualMachine and Datacenter govmomi objects. These objects contain reference to govmomi client. These references don't get updated when new vSphere connection is made. To solve this problem we will add a callback to vclib.Connect() method. In this callback we will update connection object in all required places. |
I ran into the same issue when creating a pvc - here are the logs: {"log":"I1218 19:52:44.711058 1 vsphere_volume_util.go:137] VSANStorageProfileData in vsphere volume ""\n","stream":"stderr","time":"2017-12-18T19:52:44.71240654Z"} |
Since this is a critical issue and needs to be fixed in next 1.9.*, here is the short term solution that team has agreed on (discarding any other previously discussed solution) to minimize impact on existing code:
Ideally we should not be mixing business logic with vSphere connection details. We need to make a bigger change to remove all connection and low level failure (ManagedObjectNotFound) from vsphere.go and move it to vclib methods that are closest to the failure. I will file a separate issue for that. |
I am testing with 1.9 but PR generation will get blocked by #422, as our tests are failing for master. |
@prashima you can try out with this new ignition image - |
Sure, let me give it a try. |
PR out for review kubernetes#57978 |
Cherry pick to 1.9 is out - kubernetes#58124 |
Pod is not getting created successfully with statically created disk, attached to pod directly as volume or via PVC.
Steps to reproduce
AttachVolume.Attach failed for volume "test-volume" : NotAuthenticated
Unable to mount volumes for pod "test-vmdk_default(5467bfc6-d6f4-11e7-8b4c-005056ae23f1)": timeout expired waiting for volumes to attach/mount for pod "default"/"test-vmdk". list of unattached/unmounted volumes=[test-volume]
Will be attaching logs shortly.
======================================
Pasting 'events' for reference:
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
28m 28m 1 {default-scheduler } Normal Scheduled Successfully assigned test-vmdk to kubernetes-node2
28m 28m 1 {kubelet kubernetes-node2} Normal SuccessfulMountVolume MountVolume.SetUp succeeded for volume "default-token-b99km"
26m 5m 10 {kubelet kubernetes-node2} Warning FailedMount Unable to mount volumes for pod "test-vmdk_default(5467bfc6-d6f4-11e7-8b4c-005056ae23f1)": timeout expired waiting for volumes to attach/mount for pod "default"/"test-vmdk". list of unattached/unmounted volumes=[test-volume]
28m 5m 19 {attachdetach-controller } Warning FailedMount AttachVolume.Attach failed for volume "test-volume" : NotAuthenticated
3m 3m 1 {kubelet kubernetes-node2} Normal SuccessfulMountVolume MountVolume.SetUp succeeded for volume "test-volume"
3m 3m 1 {kubelet kubernetes-node2} spec.containers{test-container} Normal Pulling pulling image "gcr.io/google_containers/test-webserver"
3m 3m 1 {kubelet kubernetes-node2} spec.containers{test-container} Normal Pulled Successfully pulled image "gcr.io/google_containers/test-webserver"
3m 3m 1 {kubelet kubernetes-node2} spec.containers{test-container} Normal Created Created container
3m 3m 1 {kubelet kubernetes-node2} spec.containers{test-container} Normal Started Started container
The text was updated successfully, but these errors were encountered: