Commit Graph

207 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Hemant Kumar 786da1de12 Impement bulk polling of volumes
This implements Bulk volume polling using ideas presented by
justin in https://github.com/kubernetes/kubernetes/pull/39564

But it changes the implementation to use an interface
and doesn't affect other implementations.
2017-03-02 14:59:59 -05:00
Hemant Kumar 2d3008fc56 Implement support for mount options in PVs
Add support for mount options via annotations on PVs
2017-03-01 11:50:40 -05:00
Humble Chirammal 1fd341ee72 Update reviewer list for iscsi volume plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-18 13:12:03 +05:30
Cristian Pop b23b475498 Implemented suggestions for #39202 fix to facilitate kubelet upgrade. The detachDisk behavior is now preserved for pods that were created before the kubelet upgrade. 2017-02-14 22:50:26 +02:00
Cristian Pop 2aaeefeeb8 Updated TestExtractDeviceAndPrefix and added TestExtractIface to reflect the changes brought by the #39202 fix. 2017-02-14 11:34:03 +02:00
Cristian Pop b0d285c706 Fix for Premature iSCSI logout #39202. 2017-02-14 11:34:03 +02:00
Humble Chirammal 332e26dc8c Add portals field to iscsi volume source to achieve multipathing.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-06 17:06:33 +05:30
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
Kubernetes Submit Queue f56b606985 Merge pull request #36520 from apelisse/owners-pkg-volume
Automatic merge from submit-queue

Curating Owners: pkg/volume

cc @jsafrane @spothanis @agonzalezro @justinsb @johscheuer @simonswine @nelcy @pmorie @quofelix @sdminonne @thockin @saad-ali @rootfs

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2017-01-17 19:56:39 -08:00
Saad Ali d25c20bc3f Update OWNERS 2017-01-17 16:35:21 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
rkouj 32766e3b6d Check if path exists before performing unmount 2017-01-11 14:33:05 -08:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Kubernetes Submit Queue 85bf256709 Merge pull request #39075 from ChenLingPeng/github-waitfor
Automatic merge from submit-queue

no need to sleep for last retry

break for needless sleep
2017-01-03 07:26:00 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
forrestchen 1d9f754565 no need to sleep for last retry
Signed-off-by: forrestchen <forrestchen@tencent.com>
2016-12-21 17:52:01 +08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu bb675d395f dependencies: pkg/volume 2016-11-23 15:53:09 -08:00
Rajat Ramesh Koujalagi d81e216fc6 Better messaging for missing volume components on host to perform mount 2016-11-09 15:16:11 -08:00
Antoine Pelisse fd510b1207 Update OWNERS approvers and reviewers: pkg/volume 2016-11-09 10:17:36 -08:00
Paul Morie 4722cb299b Remove GetRootContext from VolumeHost 2016-11-03 12:21:19 -04:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Jedrzej Nowak f0988b95e7 Typos and englishify pkg/volume 2016-10-03 22:39:33 +02:00
Tim Hockin d0a840798e Make rootfs the assignee for various volumes
This, combined with the '/lgtm' capability of reviewers means he can approve
PRs.
2016-08-23 14:40:05 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Anish Bhatt 531a961a96 Check iscsi iface file for transport name 2016-07-25 18:15:25 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
saadali 542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali 9b6a505f8a Rename UniqueDeviceName to UniqueVolumeName
Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
2016-06-15 09:32:12 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
tobad357 1811ded396 This is an update that allows the iscsi volume to check if a iscsi device belongs to a mpio device
If it does belong to the device then we make sure we mount the mpio device instead of
the raw device.

Heuristics
Login into /dev/disk/by-path/iqn-example.com.2999 -> /dev/sde
Check if sde existsin in /sys/block/[dm-X]/slaves/xx
If it does mount /dev/[dm-x] which will look like /dev/mapper/mpiodevicename in mount

examples/iscsi has more details
2016-04-20 09:42:11 +08:00
k8s-merge-robot 2205a30348 Merge pull request #23368 from saad-ali/renameBuilderCleaner
Auto commit by PR queue bot
2016-03-26 13:01:25 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
saadali 79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
Tim Hockin 23fe2a3584 add maintainers for each volume driver 2016-03-22 22:19:53 -07:00
k8s-merge-robot 3c5b57b217 Merge pull request #21805 from childsb/CanSupport_fix
Auto commit by PR queue bot
2016-03-05 10:09:35 -08:00
Tim St. Clair 246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
childsb 7fed6f9f47 Remove host command sniffing from CanSupport(..) 2016-02-23 17:13:14 -06:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Fabio Yeon 7205a160ac Remove all instances of "/tmp" from unit tests and replace with a common
tmp directory creator. Exception is documented.
2016-01-27 16:11:22 -08:00
k8s-merge-robot 3f5e417999 Merge pull request #19502 from swagiaal/internalize-ownership
Auto commit by PR queue bot
2016-01-26 23:06:39 -08:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
harry 7405c7899b Add strings pkg to hold strings utils
Replace funtions with strings pkg

Fix all references and rename the pkg
2016-01-15 12:37:50 +08:00
Sami Wagiaalla 7767698459 Remove SupportsOwnershipManagement volume attribute 2016-01-13 10:37:10 -05:00
Sami Wagiaalla 4ac151321a Call SetVolumeOwnership from volume plugins 2016-01-13 10:37:10 -05:00
Sami Wagiaalla f650648aae Add fsGroup to SetUp and SetUpAt 2016-01-13 10:37:10 -05:00
Chakravarthy Nelluri fa76de79e5 Add support for flex volume. Flex volume adds support for thirdparty(vendor)
volumes and custom mounts.
2015-12-23 14:11:38 -08:00
Phillip Wittrock c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00
Anish Bhatt 6e46fa1fd4 Add support for open-iscsi transports.
This enables use of software or hardware transports viz. be2iscsi,
bnx2i, cxgb3i, cxgb4i, qla4xx, iser and ocs. The default transport
(tcp) happens to be called "default".

Use of non-default transports changes the disk path to the following format:
/dev/disk/by-path/pci-<pci_id>-ip-<portal>-iscsi-<iqn>-lun-<lun_id>
2015-12-08 17:28:06 -08:00
k8s-merge-robot 13b0fd3cda Merge pull request #16942 from swagiaal/distinguish-format-and-mount
Auto commit by PR queue bot
2015-12-03 10:51:26 -08:00
Sami Wagiaalla 66c905d63e Distinguish normal mount from format and mount in SafeFormatAndMount 2015-12-02 11:16:00 -05:00
Anish Bhatt 18c82f743c Support iqn as well as eui format for iSCSI entity names.
Supported formats are :
iqn.<date code>.<reversed domain>[:<optional suffix>]

eui.<eui-64 identifier>
2015-11-24 00:13:59 -08:00
Paul Morie 911757486d Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes() 2015-11-13 23:34:48 -05:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
Paul Morie 3cd12f5e05 FSGroup implementation 2015-10-22 16:40:59 -04:00
k8s-merge-robot 372fb373aa Merge pull request #15562 from rootfs/iscsi-umount
Auto commit by PR queue bot
2015-10-16 07:12:23 -07:00
k8s-merge-robot 407f9b9e42 Merge pull request #15555 from rootfs/iscsi-def-port
Auto commit by PR queue bot
2015-10-15 07:22:18 -07:00
Huamin Chen 76df88f68b iscsi: make portal builder testable
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-10-14 13:30:30 -04:00
Huamin Chen 69a1f33dd5 iscsi: format disk if no filesystem is found
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-10-14 10:30:04 -04:00
Huamin Chen 9ca96abd46 iscsi: use global path to retrieve iscsi portal and iqn
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-10-14 09:48:07 -04:00
Huamin Chen 340cfcc284 iscsi: if port is not provided, use default 3260 for target portal
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-10-13 13:31:59 -04:00
Anish Bhatt 6d9e9561e8 Fix extraneous entries in iscsi path format
Code comments currently claim the default iscsi mount path as

kubernetes.io/pod/iscsi/<portal>-iqn-<iqn>-lun-<id>, however actual
path being used is
kubernetes.io/iscsi/iscsi/<portal>-iqn-<iqn>-lun-<id>

This leads to ultimate path being similar to this :

kubernetes.io/iscsi/iscsi/...iqn-iqn...-lun-N

Both iscsi and iqn are repated twice for no reason, since "iqn" is
required by spec to be part of an iqn. This is also  wrong on
multiple leves as actual allowed naming formats are :

iqn.2001-04.com.example:storage:diskarrays-sn-a8675309
eui.02004567A425678D
(RFC 3720 3.2.6.3)

and in the second case "iqn-eui" in the path would be misleading.

Change this to a more reasonable path of
kubernetes.io/iscsi/<portal>-<iqn>-lun-<id>

which also aligns up with how the /dev/by-path and sysfs entries
are created for iscsi devices on linux

  * -- *

Update iSCSI README and sample json file

There seems to have been quite a skew in recent updates to these
files adding in wrong info or info that no longer lines up the
sample config with the README.

Fixed the following issues :
* Fix discrepancy in samples json using initiator iqn from previous
  linked example as target iqn (which was just wrong)
* Generate sample output and README from the same json config provided.
* Remove recommendation to edit initiator name, this is not required
  (open-iscsi warns against editing this manually and provides a utility
   for the same)
* Update docker inspect command to one that works.
* Use separate LUNs for separate mount points instead of re-using.
2015-10-13 10:08:52 -07:00
Filip Grzadkowski 7fe34f2050 Introduce nsenter writer for volume plugins 2015-09-17 16:40:29 +02:00
Chao Xu 64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Sami Wagiaalla 9ca9ab1b66 iSCSI Plugin: Remove remounting of device in global path.
This code was originally added because the first mount call did not
respect the ro option. This no longer seems to be the cause so there
is no need to use remount.

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-09-03 15:59:27 -04:00
markturansky 0e7f73ad67 expand volume.Spec to include full Volume and PV 2015-09-03 08:57:32 -04:00
deads2k 7e180c258d update testclient for delegating reaction chain 2015-09-01 12:58:35 -04:00
Saad Ali b05cab0bc5 Merge pull request #6945 from eparis/IsMountPoint
Rename IsMountPoint to IsLikelyNotMountPoint
2015-08-19 12:47:51 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Eric Paris f125ad88ce Rename IsMountPoint to IsLikelyNotMountPoint
IsLikelyNotMountPoint determines if a directory is not a mountpoint.
It is fast but not necessarily ALWAYS correct. If the path is in fact
a bind mount from one part of a mount to another it will not be detected.
mkdir /tmp/a /tmp/b; mount --bin /tmp/a /tmp/b; IsLikelyNotMountPoint("/tmp/b")
will return true. When in fact /tmp/b is a mount point. So this patch
renames the function and switches it from a positive to a negative (I
could think of a good positive name). This should make future users of
this function aware that it isn't quite perfect, but probably good
enough.
2015-08-14 18:45:43 -04:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
markturansky 63ccfa2beb Added unit tests for each PV using IsReadOnly 2015-07-29 14:38:40 -04:00
markturansky fae6759490 IsReadOnly bool on builder 2015-07-29 14:35:37 -04:00
markturansky 124bb22f92 Honor ReadOnly flag from persistent-volume plugin 2015-07-29 14:34:15 -04:00
jiangyaoguo ce52ae782d refector iscsi volume to seperate builder and cleaner 2015-07-24 16:55:56 +08:00
Vish Kannan 5f79267b97 Merge pull request #10484 from markturansky/vol_iscsi_export
Changed ISCSI plugin name from exported to private
2015-07-22 17:07:15 -07:00
markturansky 7e1eb15434 Changed plugin name from exported to private 2015-06-29 13:04:09 -04:00
Sami Wagiaalla a317b5ffc8 iscsi plugin: print error messages not just exit status.
Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-06-29 11:28:56 -04:00
Jan Safranek d2b4ae4df4 Fix persistent volumes.
Check Spec.PersistentVolumeSource in NFS, RBD, Gluster and iSCSI volume
plugins.
2015-06-02 09:19:28 -04:00
Tim Hockin 0bbba1c3d1 Merge pull request #8732 from markturansky/missing_pv_support
Fixed CanSupport func across all volumes (for PV)
2015-05-27 08:45:47 -07:00
Tim Hockin d0249aac75 Merge pull request #8133 from markturansky/iscsi_pv2
added ISCSI volume plugin to PersistentVolumeSource
2015-05-27 08:36:37 -07:00
Paul Morie 38c96725c0 Add doc.go files for all volume plugins 2015-05-23 16:59:12 -04:00
markturansky 3ad583cf2d Fixed spotty CanSupport for PV and added more unit tests for same 2015-05-23 09:59:05 -04:00
markturansky 63ddfa537e fixed missing PV check in CanSupport 2015-05-22 15:23:34 -04:00
markturansky 5b23fc39b2 added ISCSI volume plugin to PersistentVolumeSource 2015-05-22 15:18:20 -04:00
Tim Hockin f66ca25d9f Rename AccessMode to PersistentVolumeAccessMode 2015-05-18 17:21:30 -07:00
Paul Morie cd359ffa73 Refactor volume interfaces to receive pod instead of ObjectReference 2015-05-10 20:12:57 -04:00
Abhi Shah 87e85e25f1 Revert "Added ISCSI to PV structs" 2015-05-08 11:31:35 -07:00
markturansky 4c9eac6c3d Added ISCSI to PV structs 2015-05-07 18:13:03 -04:00
Paul Morie b538642464 Inject mounter into volume plugins 2015-05-04 11:28:57 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Deyuan Deng 6897095e56 Change mount.Interface.Mount to exec('mount'), instead of syscall 2015-04-29 10:46:32 -04:00
Sami Wagiaalla 0a7f6c2999 iscsi Test: Add explicit check for attach and detach calls.
Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-04-21 10:30:47 -04:00
markturansky e1481fb9c2 Refactored Volume plugins to use InternalVolume instead of API types 2015-04-14 14:25:01 -04:00
Paul Morie c98e89fca0 Set rootcontext of emptyDir tmpfs mounts correctly 2015-04-13 12:50:36 -04:00
Huamin Chen 7a82af31de add iscsi volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-06 16:20:28 -04:00