UPSTREAM: <drop>: Add extra logs for flake analysis
@@ -1722,6 +1722,8 @@ func (c *Cloud) getMountDevice(
}
deviceMappings[mountDevice(name)] = EBSVolumeID(aws.StringValue(blockDevice.Ebs.VolumeId))
}
+ // De-flaking https://bugzilla.redhat.com/show_bug.cgi?id=1698829
+ klog.V(4).Infof("Device mappings from EC2 Instance: %+v", deviceMappings)
// We lock to prevent concurrent mounts from conflicting
// We may still conflict if someone calls the API concurrently,
@@ -1732,6 +1734,8 @@ func (c *Cloud) getMountDevice(
for mountDevice, volume := range c.attaching[i.nodeName] {
deviceMappings[mountDevice] = volume
}
+ // De-flaking https://bugzilla.redhat.com/show_bug.cgi?id=1698829
+ klog.V(4).Infof("Full device mappings: %+v", deviceMappings)
// Check to see if this volume is already assigned a device on this machine
for mountDevice, mappingVolumeID := range deviceMappings {
@@ -2093,6 +2097,8 @@ func (c *Cloud) AttachDisk(diskName KubernetesVolumeID, nodeName types.NodeName)
if err != nil {
return "", fmt.Errorf("error finding instance %s: %q", nodeName, err)
}
+ // De-flaking https://bugzilla.redhat.com/show_bug.cgi?id=1698829
+ klog.V(4).Infof("AttachDisk got AWS instance %+v", info.BlockDeviceMappings)
// mountDevice will hold the device where we should try to attach the disk
var mountDevice mountDevice
@@ -2244,6 +2250,13 @@ func (c *Cloud) DetachDisk(diskName KubernetesVolumeID, nodeName types.NodeName)
// in progress, though it might have been
}
+ // De-flaking https://bugzilla.redhat.com/show_bug.cgi?id=1698829
+ _, info, err2 := c.getFullInstance(nodeName)
+ if err2 != nil {
+ klog.V(4).Infof("error finding instance %s: %q", nodeName, err2)
+ }
+ klog.V(4).Infof("DetachDisk: instance after detach: %+v", info.BlockDeviceMappings)
+
hostDevicePath := "/dev/xvd" + string(mountDevice)
return hostDevicePath, err
}
