Commit Graph

165 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
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 96509d4f5b generated code for iSCSI plugin change 2018-01-10 11:39:01 -05:00
Mitsuhiro Tanino a6d979dd88 Block volumes Support: iSCSI plugin update
This patch adds block volume support to iSCSI volume plugin.
2018-01-10 11:38:36 -05:00
Kubernetes Submit Queue 462db17df0
Merge pull request #57475 from stmcginnis/iscsi_node_startup
Automatic merge from submit-queue (batch tested with PRs 57399, 57751, 57475). 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>.

iscsi: set node.startup to manual

If the default iSCSI node.startup is set to automatic, if there is a node failure,
any pods on that node will get rescheduled to another node. If the failed node is
later brought back up it will then try to log back in to any iSCSI sessions it had
prior to the failure, which may no longer exist or may be now in-use by the other
nodes.

It appears most platforms keep the open-iscsi default of node.startup-automatic.
But in case this system-wide setting has been changed, and just to be explicit, this
sets node.startup values for kubernetes controlled volumes to manual.

Fixes #21305

```release-note
iSCSI sessions managed by kubernetes will now explicitly set startup.mode to 'manual' to
prevent automatic login after node failure recovery. This is the default open-iscsi mode, so
this change will only impact users who have changed their startup.mode to be 'automatic'
in /etc/iscsi/iscsid.conf.
```
2018-01-02 10:57:57 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Sean McGinnis 9f97d61de4
Fixed space/tab indentation
Some lines had spaces for indentation instead of tabs.
2017-12-20 23:48:15 -06:00
Sean McGinnis 69a2deea9c iscsi: set node.startup to manual
If the default iSCSI node.startup is set to automatic, if there is a node failure,
any pods on that node will get rescheduled to another node. If the failed node is
later brought back up it will then try to log back in to any iSCSI sessions it had
prior to the failure, which may no longer exist or may be now in-use by the other
nodes.

It appears most platforms keep the open-iscsi default of node.startup-automatic.
But in case this system-wide setting has been changed, and just to be explicit, this
sets node.startup values for kubernetes controlled volumes to manual.

Closes issue #21305
2017-12-20 15:37:22 -06:00
supereagle 032416c75d use core client with explicit version
fix more usage of deprecated core client
2017-11-25 08:14:10 +08:00
Huamin Chen bb34a0b7ef use SecretObject to reference iSCSI CHAP secret
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-11-18 20:02:44 +00:00
Sergey Lanzman 3474747465 Move regexp.MustCompile to global variable 2017-11-16 22:03:12 +02: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
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 855c5e0e93 Merge pull request #51628 from jsafrane/fix-iscsi-attach
Automatic merge from submit-queue (batch tested with PRs 51628, 51637, 51490, 51279, 51302)

Fix iSCSI WaitForAttach not mounting a volume

WaitForAttach failed consistently with this error:
```
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory
```

We should ignore "no such file or directory" eror, the directory is created just few lines below.

Fixes: #51625



**Release note**:

```release-note
NONE
```

/sig storage
/assign @mtanino
2017-09-01 00:11:12 -07:00
Jan Safranek 540752d0a1 Fix iSCSI WaitForAttach not mounting a volume
WaitForAttach failed consistently with this error:
Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory

We should ignore "no such file or directory" eror, the directory is created
just few lines below.
2017-08-30 15:34:49 +02:00
Kubernetes Submit Queue 5f8d229585 Merge pull request #51361 from yastij/iscsi-handle-failedMount
Automatic merge from submit-queue (batch tested with PRs 51439, 51361, 51140, 51539, 51585)

Iscsi handle failed mount

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-30 03:59:30 -07:00
allencloud c8c7139d21 refactor codes in volume iscsi to improve readability
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-08-27 12:05:21 +08:00
mtanino e21b68b4ca Support iscsi volume attach and detach
Fixes #48953
2017-08-26 17:23:47 -04:00
Kubernetes Submit Queue 223227eb59 Merge pull request #51391 from alrs/fix-iscsi-swallowed-error
Automatic merge from submit-queue

Fix swallowed error in iscsi package

**What this PR does / why we need it**: Fixes a swallowed error in the iscsi package.


```release-note NONE
```
2017-08-26 08:23:09 -07:00
Lars Lehtonen 47ee11437d
Fix swallowed error in iscsi package 2017-08-25 20:57:58 -07:00
Yassine TIJANI 588fe268dc handle iscsi failed mounts 2017-08-25 22:32:13 +02:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Kubernetes Submit Queue 915371cfdc Merge pull request #51108 from jsafrane/exec-iscsi
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins

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

This PR updates iSCSI volume plugin to use `VolumeHost.GetExec()` to execute utilities like mkfs and lsblk instead of simple `os/exec`. This prepares the volume plugin to run these utilities in containers instead of running them on the host + makes the volume plugin more independent and less hardcoded.

See proposal in https://github.com/kubernetes/community/pull/589.

Note that this PR does **not** change place where the utilities are executed - `VolumeHost.GetExec()` still leads directly to `os/exec`. It will be changed when the aforementioned proposal is merged and implemented.

**Release note**:
```release-note
NONE
```
2017-08-24 02:32:04 -07: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
Jan Safranek bc6ad1ad9f iscsi: Use VolumeHost.GetExec() to execute stuff in volume plugins 2017-08-23 14:56:51 +02:00
Kubernetes Submit Queue d235fa3f1c Merge pull request #48789 from mtanino/issue/47311
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

iSCSI volume plugin: iSCSI initiatorname support

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

This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource to enable automatic configuration of initiator name per volume. This would allow for more fine grained configuration, and remove the need to configure the initiator name on the host by administrator.

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

**Special notes for your reviewer**:

/cc @rootfs @jsafrane @msau42

**Release note**:

```
iSCSI volume plugin: Support customization of iSCSI initiator name per volume
```
2017-08-22 19:45:29 -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
mtanino b0d4664a27 Autogenerated files 2017-08-21 12:29:32 -04:00
Mitsuhiro Tanino a6e523f2e7 iSCSI volume plugin: iSCSI initiatorname support
This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource
to enable automatic configuration of initiator name per volume.
This would allow for more fine grained configuration, and remove
the need to configure the initiator name on the host by
administrator.

fixes: #47311
2017-08-21 11:26:56 -04: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
deads2k 94e9993900 remove deads2k from volume reviewer 2017-07-25 08:52:25 -04:00
Huamin Chen 3b91bdc261 tune iscsi and fc volume owner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-07-24 13:59:06 +00:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
Kubernetes Submit Queue ad077c4ccb Merge pull request #47619 from mtanino/iscsi-remove-redundant-nil-check
Automatic merge from submit-queue (batch tested with PRs 47619, 47951, 46260, 48277)

iSCSi plugin: Remove redundant nil check

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

This patch is for cleanup of redundant nil check in iSCSI plugin.
This was mentioned at the code review on origin github thread.

https://github.com/openshift/origin/pull/14565

**Which issue this PR fixes** 

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-06-29 14:05:24 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
mbohlool c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
Mitsuhiro Tanino 285ac8935f iSCSi plugin: Remove redundant nil check 2017-06-15 18:00:29 -04:00
mtanino b1f06aaed5 iSCSI plugin: Update devicepath with filepath.Glob result
If iscsiTransport is not tcp, iSCSI plugin tries to
find devicepath using filepath.Glob but never updates
devicepath with the filepath.Glob result.

This patch fixes the problem.

Fixes #47253
2017-06-09 22:54:25 -04:00