Commit Graph

117 Commits (1c012f1c4966dfe6124192abafeba892ae9510a0)

Author SHA1 Message Date
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Yecheng Fu c542b6be5d Remove mount.GetMountRefs in favor of mounter.GetMountRefs 2018-06-20 17:01:27 +08:00
Vladimir Vivien 3569287993 Refactor of GenerateMapDeviceFunc to delegate Map call to volume plugin. 2018-06-03 17:25:37 -04:00
Ian Chakeres 3fc5601e35 Return error in mount_unsupported for unsupported platforms 2018-03-29 14:17:07 -07:00
Ian Chakeres 470980d4a8 Skip volume unit tests that don't work on osx. 2018-03-26 12:47:36 -07:00
wackxu b3ba80b223 update bazel 2018-02-27 20:23:36 +08:00
wackxu f737ad62ed update import 2018-02-27 20:23:35 +08:00
jianglingxia d759c601b6 FIX the os.Stat() func in volume file/kind bug 2018-02-24 19:31:21 +08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
linyouchong e92f6eb0fe fix incorrect logic in canSupport 2018-02-09 11:45:15 +08:00
Serguei Bezverkhi 40e0c38988 Cleaning up loopback removal process 2018-02-02 10:33:25 -05:00
Mitsuhiro Tanino 6fa583381e Update comments for getting and removing loopback device at iSCSI,FC,RBD
This PR add comments for the background why plugin gets loopback
device and removes loopback device even if operation_generator has
same functionality.
2018-01-17 10:22:39 -05:00
mtanino 41cb533ad6 [FC Plugin] Create proper volumeSpec during ConstructVolumeSpec
Currently, FC plugin returns volume name and empty
FCVolumeSource during ConstrutVolumeSpec during
filesystem volume's reconstruction.

In this fix, ConstructVolumeSpec retrieves global
mount path, analyzes volume parameters such as
WWN, LUN, WWID from the path.

Fixes #58085
2018-01-11 12:04:56 -05:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
mtanino c8fffea765 Autogenerated code 2017-12-15 11:56:49 -05:00
mtanino 1443b1bd1f Update detach logic for block volume if devicePath is empty 2017-12-15 11:56:14 -05:00
Mitsuhiro Tanino 75829d2676 generated code for FC plugin change 2017-11-20 16:46:45 -05:00
mtanino 224d39b06b Block volumes Support: FC plugin update
This patch adds block volume support to FC volume plugin.
2017-11-20 16:46:39 -05:00
Kubernetes Submit Queue d4d326b39d
Merge pull request #54856 from jsafrane/fix-detacher-param-name
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rename Detach() parameter.

`Detach()` does not get device name, it gets volume name. Parameters named `deviceMountPath` or `deviceName` just confuses developers.

Note that this PR  just renames parameters here and there, there should be no behavior change.

@kubernetes/sig-storage-pr-reviews 

/assign @gnufied @jingxu97 

**Release note**:
```release-note
NONE
```
2017-11-03 14:33:16 -07:00
Kubernetes Submit Queue 443908193d
Merge pull request #54652 from msau42/update-owners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update volume OWNERS to reflect active sig-storage reviewers

**What this PR does / why we need it**:
Update sig-storage reviewers to add new members and remove those that don't have as much time to review storage PRs.   Approvers are unchanged.

**Special notes for your reviewer**:
For all those that have been removed, please approve.  If you want to remain as a reviewer, let me know and I will add you back.

**Release note**:
NONE
2017-11-01 16:30:32 -07:00
Jan Safranek 6f160c3570 Rename Detach() parameter.
Detach() does not get device name, it gets volume name.
2017-10-31 10:55:19 +01:00
Michelle Au 7d1e279d3b Update volume OWNERS to reflect active sig-storage reviewers 2017-10-26 13:26:33 -07:00
linyouchong 02e8ffe13c fix incorrect log 2017-10-26 01:40:24 +08:00
linyouchong 66d68d7d2a Abstract contains func to common place 2017-10-20 19:27:55 +08:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue a1a441f7b5 Merge pull request #52687 from mtanino/teardown-refactor
Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Refactoring and improvements for iSCSI and FC storage plugins

**What this PR does / why we need it**:

This PR makes following changes.

- Simplify volume tearDown path for iSCSI and FC using
  util.UnmountPath().
- Log lastErr during iscsi connection
  If iscsid fails to connect second portal, currently
  the error is ignored silently. The lastErr should be
  logged to find the root cause of problem.
- Remove iscsi plugin directory after iscsi connection
  is successfully closed.

**Which issue this PR fixes** : No related issues.

**Special notes for your reviewer**:

/cc @rootfs @jsafrane 

**Release note**:

```
NONE
```
2017-09-23 19:49:52 -07:00
Kubernetes Submit Queue 26bb28b046 Merge pull request #52691 from mtanino/issue/52690
Automatic merge from submit-queue (batch tested with PRs 52675, 52691). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

FC plugin: Return target wwn + lun at GetVolumeName()

**What this PR does / why we need it**:

At volume attach/detach controller, GetVolumeName() is
expected to return unique volume identifier, but FC
plugin didn't return unique identifier if user specified
FC volume using target wwn and lun.

In order to return unique identifier, GetVolumeName()
should use combination of target wwn and lun.

**Which issue this PR fixes** : fixes #52690

**Special notes for your reviewer**:

Should we use same format of unique volume identifier between v1.7 and v1.8 `for the purpose of backward compatibility?`

- At v1.7(before introducing attach/detach function), unique ID was pod's uuid + volume name
```
I0918 22:47:13.113481   44661 reconciler.go:257] operationExecutor.MountVolume started for volume "pv0001" (UniqueName: "kubernetes.io/fc/d6c66980-9ce4-11e7-8bb7-f8bc12550954-pv0001") pod "nginx-pod1" (UID: "d6c66980-9ce4-11e7-8bb7-f8bc12550954")  
I0918 22:47:15.116584   44661 operation_generator.go:476] MountVolume.SetUp succeeded for volume "pv0001" (UniqueName: "kubernetes.io/fc/d6c66980-9ce4-11e7-8bb7-f8bc12550954-pv0001") pod "nginx-pod1" (UID: "d6c66980-9ce4-11e7-8bb7-f8bc12550954")  
```

- At latest master, unique ID is targetWWNs.(if a user specifies a volume using target wwn + lun)
```
I0918 22:23:48.389339    1016 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "pv0001" (UniqueName: "kubernetes.io/fc/[78060e801049abcd]") pod "nginx-pod3" (UID: "8f76b894-9ce1-11e7-b8f4-f8bc12550954")  
```

/cc @jsafrane @rootfs @msau42 @jingxu97 

**Release note**:

```
NONE
```
2017-09-20 10:01:42 -07:00
mtanino a95a1ff6f1 FC plugin: Return target wwn + lun at GetVolumeName()
At volume attach/detach controller, GetVolumeName() is
expected to return unique volume identifier, but FC
plugin didn't return unique identifier if user specified
FC volume using target wwn and lun.

In order to return unique identifier, GetVolumeName()
should use combination of target wwn and lun.

Fixes #52690
2017-09-19 16:39:36 -04:00
mtanino 9e83cc78e6 Fix FC WaitForAttach not mounting a volume
WaitForAttach failed consistently with this error:

Heuristic determination of mount point failed:stat
/var/lib/kubelet/plugins/kubernetes.io/fc/<wwn>-lun-0:
no such file or directory

We should create dir first to avoid the error.

Fixes: #52674
2017-09-18 22:42:02 -04:00
mtanino 629718ef0b Refactoring and improvements for iSCSI and FC
This PR makes following changes.

- Simplify volume tearDown path for iSCSI and FC using
  util.UnmountPath().
- Log lastErr during iscsi connection
  If iscsid fails to connect second portal, currently
  the error is ignored silently. The lastErr should be
  logged to find the root cause of problem.
- Remove iscsi plugin directory after iscsi connection
  is successfully closed.
2017-09-18 21:33:11 -04:00
Kubernetes Submit Queue 1c55faf0bb Merge pull request #51387 from alrs/fix-storageos-swallowed-err
Automatic merge from submit-queue

Fix swallowed errors in various volume packages

**What this PR does / why we need it**: Fixes swallowed errors in various volume packages.

**Release note**:
```release-note NONE
```
2017-09-13 11:10:24 -07:00
Lars Lehtonen 30b9038bbb
Merge branch 'fix-fc-swallowed-error' into fix-storageos-swallowed-err 2017-08-26 14:46:36 -07:00
mtanino 5ff9dc0b3b WaitForAttach refactoring for iSCSI attacher/detacher
This change is prerequisite for implementing iSCSI attacher
and detacher.

In order to use chap authentication at iSCSI plugin after
implementing attacher and detacher, secret is needed at
AttachDisk() which is called from WaitForAttach().
To obtain secret, pod information is required, but
WaitForAttach() doesn't pass pod information inside.

This patch adds 'pod' as an argument of WaitForAttach()
and adds changes to drivers who implements WaitForAttach().

Fixes #48953
2017-08-26 17:21:34 -04:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Lars Lehtonen e8a3424c1c
Fix swallowed error in fc 2017-08-25 21:34:40 -07:00
Kubernetes Submit Queue 85f963310e Merge pull request #50504 from yastij/fcVolume-handleFailedMount
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

handle failed mounts for fc volumes

**What this PR does / why we need it**: handles failed mounts for fc

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50502

**Special notes for your reviewer**: 

**Release note**:

```release-note
None
```
2017-08-25 19:40:38 -07:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Yassine TIJANI c02aeb7ec1 handle failed mounts for fc volumes 2017-08-25 09:59:42 +02:00
Kubernetes Submit Queue 7df5c63218 Merge pull request #38947 from xiangpengzhao/fix-testcase-errorf
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Call Fatalf instead of Errorf when mounter/unmounter is nil in volume tests

If we get a nil mounter or unmounter, a panic will occur. Should call `Fatalf` instead of `Errorf`.
2017-08-23 08:41:01 -07:00
xiangpengzhao 35b45d60b2 Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests 2017-08-23 10:29:30 +08:00
Jan Safranek f744b12ee9 fibre channel: Remove unused exe interface 2017-08-22 14:28:10 +02:00
Jan Safranek 0e547bae22 SafeFormatAndMount should use volume.Exec provided by VolumeHost
We need to execute mkfs / fsck where the utilities are.
2017-08-14 12:16:27 +02:00
Jan Safranek bc0e170d9c Add pluginName to VolumeHost.GetMouter
Different plugins can get different mounter, depending where the mount
utilities are.
2017-08-14 12:16:26 +02:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
mtanino 03e28476c4 FC plugin: Support WWID for volume identifier
This PR adds World Wide Identifier (WWID) parameter to
FCVolumeSource as an unique volume identifier.

fixes #48639
2017-08-10 09:59:31 -04:00
mtanino ed46466b95 FC volume plugin: remove block device at DetachDisk
After a volume is unmounted from pod and worker node,
cluster admin or external-provisioner might delete
the disk from storage, therefore block device on
the node should be cleaned up beforehand.

The photon volume plugin already has same functionality.

Fixes #49392
2017-07-31 15:36:39 -04:00
mtanino 0c262ba9de FC volume plugin: remove unmount of global mount 2017-07-26 19:45:15 -04:00
deads2k 94e9993900 remove deads2k from volume reviewer 2017-07-25 08:52:25 -04:00