Merge pull request #46968 from mtanino/issue/45394-followup

Automatic merge from submit-queue (batch tested with PRs 46112, 46764, 46727, 46974, 46968)

iscsi storage plugin: bkpPortal should be initialized beforehand

**What this PR does / why we need it**:
This patch is a follow up patch for the PR #46239.
The bkpPortal in DetachDisk() path should be initialized before using it.

**Special notes for your reviewer**:
/cc @rootfs @childsb 

**Release note**:

```
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-06-06 03:17:48 -07:00
committed by GitHub

View File

@@ -334,6 +334,7 @@ func (util *ISCSIUtil) DetachDisk(c iscsiDiskUnmounter, mntPath string) error {
// If the iscsi disk config is not found, fall back to the original behavior.
// This portal/iqn/iface is no longer referenced, log out.
// Extract the portal and iqn from device path.
bkpPortal = make([]string, 1)
bkpPortal[0], iqn, err = extractPortalAndIqn(device)
if err != nil {
return err