Commit Graph

271 Commits (4397bdedf3cedb3dd6e172e1013bc3c7dd712411)

Author SHA1 Message Date
markturansky a5feac5739 improved recycler unit test 2015-09-07 14:44:49 -04:00
Quinton Hoole e5e2bc9580 Merge pull request #10833 from markturansky/loosen_binding
Allow PV/Claim matching on inexact access modes
2015-09-04 09:06:31 -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
k8s-merge-robot e8cda9dc92 Merge pull request #13310 from markturansky/volume_config
Auto commit by PR queue bot
2015-09-02 14:05:30 -07:00
Brendan Burns 2df5010834 Merge branch 'sdminonne-container_sidecar' 2015-09-02 10:42:08 -07:00
Brendan Burns 74ef517097 Merge pull request #6649 from rootfs/wip-cephfs
add Ceph FS volume plugin
2015-09-02 09:48:15 -07:00
k8s-merge-robot f5c2d90c3a Merge pull request #12293 from deads2k/testclient-specific-reaction
Auto commit by PR queue bot
2015-09-02 09:18:24 -07:00
Salvatore Dario Minonne f4dc0653aa adding downward api volume plugin 2015-09-01 22:23:03 +02:00
Huamin Chen fe559f2726 implement Ceph FS volume plugin and add to e2e volume test
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-01 14:05:17 -04:00
deads2k 7e180c258d update testclient for delegating reaction chain 2015-09-01 12:58:35 -04:00
markturansky 68358fd308 Added VolumeConfig to volumes 2015-09-01 12:04:26 -04:00
Sreekanth Pothanis f5da6b34ce Cinder Volume Plugin 2015-08-30 19:56:27 -07:00
Prashanth B 05b205bab6 Revert "Volume Plugin for Cinder; Openstack Block Storage" 2015-08-28 10:56:24 -07:00
Prashanth B 8d0d54ffed Merge pull request #6689 from spothanis/cinder-vol-plugin
Volume Plugin for Cinder; Openstack Block Storage
2015-08-28 10:47:31 -07:00
markturansky 0b6030f50c added better matching for PV access modes 2015-08-27 15:34:07 -04:00
Sami Wagiaalla ab0258f259 Support formatting and mounting GCE PD without 'safe_format_and_mount'
The GCE PD plugin uses safe_format_and_mount found on standard GCE images:

https://github.com/GoogleCloudPlatform/compute-image-packages/blob/master/google-startup-scripts/usr/share/google/safe_format_and_mount

On custom images where this is not available pods fail to format and
mount GCE PDs. This patch uses linux utilities in a similar way to the
safe_format_and_mount script to format and mount the GCE PD and AWS EBC
devices. That is first attempt a mount. If mount fails try to use file to
investigate the device. If 'file' fails to get any information about
the device and simply returns "data" then assume the device is not
formatted and format it and attempt to mount it again.

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-08-26 11:53:40 -04:00
Sreekanth Pothanis c841a20361 Cinder Volume Plugin 2015-08-25 15:13:56 -07: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
Bryan Stenson 9541414742 create cloudprovider "providers" package
move all providers into new package
    update all references to old package path
2015-08-11 22:36:51 -07:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Rohith dc23ded091 - fixing the complaint on the gofmt 2015-08-10 23:57:05 +01:00
Rohith bb31cd29ea - fixed the defencing of the rbd lock 2015-08-10 23:33:25 +01:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese fe6b15ba2f rewrite all links to issues to k8s links 2015-08-05 21:11:11 -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
Mike Danese e58ea24d0b Merge pull request #12001 from uluyol/os-exp-hack
Add (stopgap) support for an experimental API prefix.
2015-07-31 10:15:06 -07:00
Muhammed Uluyol 58a875ac2c Add (stopgap) support for an experimental API prefix. 2015-07-30 18:14:29 -07:00
jiangyaoguo 8eeda24652 new builder and cleaner type for aws-ebs 2015-07-30 10:23:38 +08:00
Paul Morie 5394aa979f Make emptyDir volumes work for non-root UIDs 2015-07-29 18:36:51 -04:00
Brendan Burns 63cf00d24f Merge pull request #10424 from markturansky/readonly_fix
Auto commit by PR queue bot
2015-07-29 14:25:44 -07:00
Mike Danese f40b970bd9 Merge pull request #11987 from markturansky/recyc_fix
Fixed newRecycler func for HostPath & NFS
2015-07-29 13:11:08 -07:00
markturansky e8289ceb9d rebased and updated 2015-07-29 14:48:06 -04:00
markturansky 8639f24374 rebased and updated 2015-07-29 14:38:40 -04:00
markturansky 920cb34b1e rebased and updated to latest 2015-07-29 14:38:40 -04: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
Mike Danese 33888ba804 Merge pull request #11575 from jiangyaoguo/new-builder-cleaner-for-host-path
Refactor host_path volume to seperate builder and cleaner
2015-07-29 11:24:09 -07:00
markturansky 649374ddb4 fixed newRecycler func for HostPath & NFS 2015-07-29 14:13:05 -04:00
Daniel Smith 226c950bda Merge pull request #11409 from pmorie/secrets-bc-type
Refactor secrets volume plugin to separate builder and cleaner types
2015-07-27 16:22:58 -07:00
Paul Morie 918925e09d Refactor git repo volume to separate builder and cleaner 2015-07-27 18:18:41 -04:00
Paul Morie 20ba173913 Refactor secrets volume plugin to separate builder and cleaner types 2015-07-27 18:13:39 -04:00
markturansky e380242b16 Changed pdManager to ebsManager 2015-07-27 13:52:04 -04:00
markturansky 98ec116f3f Improved internal naming from 'pd' to 'ebs' to match the volume 2015-07-27 13:52:04 -04:00
jiangyaoguo 72e899e1b5 refector rbd volume to seperate builder and cleaner 2015-07-26 01:11:25 +08:00
Mike Danese 39a7fc3706 Merge pull request #11552 from jiangyaoguo/new-builder-cleaner-for-gce-pd
Refactor gec-pd to seperate builder and cleaner
2015-07-24 12:18:21 -07:00
Mike Danese a4a48f5849 Merge pull request #11802 from jiangyaoguo/new-builder-cleaner-for-iscis
Refector iscsi volume to seperate builder and cleaner
2015-07-24 11:27:36 -07:00
Huamin Chen fa8a2ef81d fencing off multiple rbd mount
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-07-24 11:49:32 -04:00
jiangyaoguo ce52ae782d refector iscsi volume to seperate builder and cleaner 2015-07-24 16:55:56 +08:00
jiangyaoguo 27524d6b36 refector gec-pd to seperate builder and cleaner 2015-07-24 16:15:37 +08:00
Vish Kannan cc326c714b Merge pull request #11561 from saad-ali/issue11231
Fix GCE PD attach/detach issues
2015-07-23 14:53:45 -07:00
saadali 234f3ed814 Make GCE PD attach block on pending detach. Retry on detach/attach errors. 2015-07-23 14:03:50 -07:00
Vish Kannan d09d121b6c Merge pull request #11572 from jiangyaoguo/new-builder-cleaner-for-nfs
Refactor nfs volume to seperate builder and cleaner
2015-07-23 13:54:46 -07:00
Vish Kannan 94bed5a426 Merge pull request #11739 from jiangyaoguo/new-builder-cleaner-for-glusterfs
Refector glusterfs volume to seperate builder and cleaner
2015-07-23 13:17:22 -07:00
jiangyaoguo 8bb0ae9f89 refector glusterfs volume to seperate builder and cleaner 2015-07-23 15:07:40 +08:00
Tim Hockin 6eda8f47df Remove volumes legacy mode 2015-07-22 21:53:35 -07: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
Vish Kannan 2e3841efc5 Merge pull request #10485 from markturansky/volume_rbd_export
Changed RBD Volume plugin name from exported to private
2015-07-22 17:02:55 -07:00
jiangyaoguo 612f68f820 reflector nfs volume to seperate builder and cleaner 2015-07-20 19:16:48 +08:00
jiangyaoguo 63560f385c refector host_path volume to seperate builder and cleaner 2015-07-20 17:23:04 +08:00
Zach Loafman 7df8d76a93 Merge pull request #10169 from saad-ali/fixPDIssue2
Work around for PDs stop mounting after a few hours issue
2015-06-30 15:47:21 -07:00
saadali c952ee23a7 Work around for PDs stop mounting after a few hours issue 2015-06-30 13:31:03 -07:00
markturansky fe6399a689 Changed plugin name from exported to private 2015-06-29 13:07:22 -04: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
markturansky 39c5152e2c fixed pv recycler timeout precision 2015-06-20 00:34:29 -04:00
Satnam Singh b48aa0b693 Merge pull request #9957 from rootfs/fix-9952
check IsNotExist error when validating mountpoint
2015-06-18 15:18:06 -07:00
markturansky 88a4ff02f5 Fixed typo in error string 2015-06-17 17:51:42 -04:00
markturansky 0a6b7b61ec Changed PVClaimVolumeSource name to match other volume names 2015-06-17 16:17:49 -04:00
Huamin Chen 0280dac6b1 check IsNotExist error when validating mountpoint
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-06-17 15:25:15 -04:00
markturansky cfc08c4fdf Changed busybox img to official gcr.io image 2015-06-16 16:15:19 -04:00
markturansky 4210a5dfd8 Scrub pod closes watch channel 2015-06-11 14:25:44 -04:00
markturansky 986cbb56d4 Recycling HostPath and NFS impls 2015-06-04 15:46:03 -04:00
markturansky cb547f4b5c RecyclableVolumePlugin interfaces 2015-06-04 15:40:52 -04:00
markturansky b1464437de fixed test 2015-06-02 09:19:28 -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
Justin Santa Barbara 9839253233 Add logging to volume tear-down to help understand mount behaviour 2015-05-29 20:11:13 -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
Saad Ali 8e25670c07 Merge pull request #8688 from markturansky/nfs_missing_pv
Fixed NFS CanSupport func for PVs
2015-05-26 18:48:31 -07:00
Saad Ali c8d2026fa4 Merge pull request #8737 from pmorie/volume-doc
Add doc.go files for all volume plugins
2015-05-26 14:53:35 -07:00
Paul Morie feb0880b1e Add tests for secret volume plugin reboot/idempotency 2015-05-25 13:34:07 -04: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
markturansky 4f88d418c8 Added missing PV support to NFS 2015-05-22 15:10:40 -04:00
Huamin Chen 4a800fd10e add rados block device(rbd) volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-05-21 14:51:31 -04:00
Tim Hockin fd22f48f5b rename StorageType StorageMedium 2015-05-18 17:21:30 -07:00
Tim Hockin f66ca25d9f Rename AccessMode to PersistentVolumeAccessMode 2015-05-18 17:21:30 -07:00
Tim Hockin 2c28c6d99f Merge pull request #8191 from pmorie/secrets-reboot
Make secret volumes function correctly across reboot
2015-05-14 09:31:02 -07:00
Victor Marmol aa744f92da Merge pull request #7847 from swagiaal/fix-gce-pd-on-atomic-host
Support default udev GCE PD device path
2015-05-14 09:10:06 -07:00
Paul Morie bea1c05057 Make secret volumes function correctly across reboot 2015-05-14 01:51:14 -04:00
markturansky 0191574f7e Bi-directional bind between pv.Spec.ClaimRef and pvc.Spec.VolumeName 2015-05-13 14:05:21 -04:00
Paul Morie e2dd95a8b3 Make nfs volume plugin use injected mounter 2015-05-11 13:36:36 -04: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
Sami Wagiaalla a85451addc Support default udev GCE PD device path
The expected GCE PD device name is google-{name of disk}. This is
because standard GCE images contain a udev rules file which renames
the GCE PD device to google-{name of disk} https://github.com/GoogleCloudPlatform/compute-image-packages/blob/master/google-startup-scripts/lib/udev/rules.d/65-gce-disk-naming.rules. In custome images which do not have that udev rules file
the device gets the default rules apply http://cgit.freedesktop.org/systemd/systemd/tree/rules/60-persistent-storage.rules
and the GCE PD device ends up with a name which looks like scsi-0Google_PersistentDisk_{name of disk}
This patch adds support for that scenario.

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-05-06 15:09:15 -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
Clayton Coleman 1a8845af61 Merge pull request #7490 from smarterclayton/alter_list
Do not automatically decode runtime.RawExtension
2015-05-01 16:48:26 -04:00
Clayton Coleman 12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Deyuan Deng 6897095e56 Change mount.Interface.Mount to exec('mount'), instead of syscall 2015-04-29 10:46:32 -04:00
Chris Moos 36e3ec9c1f Fix crash in kubelet when persistent volume claim is not bound.
While testing #6105 ran into this issue, kubelet crashed because
controller had not yet bound the claim to a volume.
2015-04-25 12:38:18 -07:00
Paul Morie bc8f010a10 Make secret volume plugin idempotent 2015-04-23 11:23:23 -04:00
Vish Kannan a054201556 Merge pull request #7110 from swagiaal/improve-iscsi-test
iscsi Test: Add explicit check for attach and detach calls.
2015-04-22 11:21:42 -07: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
Jan Safranek 0293c6b7f0 Use pod namespace when looking for its GlusterFS endpoints.
I have a pod, which exports a Gluster filesystem in non-default namespace.
When I try to use this FS as a GlusterfsVolumeSource in a 'client' pod
definition, Kubernetes looks for the appropriate endpoint in 'default'
namespace instead of the namespace where the client pod is being defined.
2015-04-21 12:33:59 +02:00
markturansky d904e747e3 PVClaim volume plugin 2015-04-14 16:21:29 -04:00
markturansky e1481fb9c2 Refactored Volume plugins to use InternalVolume instead of API types 2015-04-14 14:25:01 -04:00
Tim Hockin f318da8344 Merge pull request #6379 from pmorie/rootcontext
Skeletal security context to facilitate tmpfs mount
2015-04-13 12:01:11 -07:00
Vish Kannan 810ad7116d Merge pull request #6763 from swagiaal/improve-gce-pd-test
GCE PD Test: Add explicit check for attach and detach calls
2015-04-13 10:55:10 -07:00
Paul Morie c98e89fca0 Set rootcontext of emptyDir tmpfs mounts correctly 2015-04-13 12:50:36 -04:00
Sami Wagiaalla 309fd272b6 GCE PD Test: Add explicit check for attach and detach calls
Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-04-13 11:36:28 -04:00
Marko Luksa 9bfa29896b Added missing argument 2015-04-13 15:46:27 +02:00
Justin Santa Barbara 7626914344 Rename aws_pd.go -> aws_ebs.go, aws_pd_test.go -> aws_ebs_test.go 2015-04-10 13:25:44 -07:00
Justin Santa Barbara 503e19e58c Rename aws_pd -> aws_ebs 2015-04-10 13:25:44 -07:00
Justin Santa Barbara 933cf60af7 Style: volumeId -> volumeID 2015-04-10 13:25:44 -07:00
Justin Santa Barbara a20484b5ed Apply latest changes from copy-and-pasted gce_pd 2015-04-10 13:25:43 -07:00
Justin Santa Barbara 9711e771c5 Rename AWSPersistentDisk -> AWSElasticBlockStore, aws-pd -> aws-ebs
Per comments from @markturansky - thanks!
2015-04-10 13:25:43 -07:00
Justin Santa Barbara 95b68ae0b0 Rename pdName -> volumeId for AWS persistent volumes 2015-04-10 13:25:43 -07:00
Justin Santa Barbara 3689bf0298 Fix pd name parse 2015-04-10 13:25:43 -07:00
Justin Santa Barbara cdc569a6c8 Parse the pdName from the volume mount
Don't assume there are no slashes!
2015-04-10 13:25:43 -07:00
Justin Santa Barbara f0cedd7375 More logging around error causes
Come back exceptions, all is forgiven!
2015-04-10 13:25:43 -07:00
Justin Santa Barbara 3549b30c8e Add missing import 2015-04-10 13:25:42 -07:00
Justin Santa Barbara 6c823dbdab Small clean-ups 2015-04-10 13:25:42 -07:00
Justin Santa Barbara 8fde691aa7 Fix tests 2015-04-10 13:25:42 -07:00
Justin Santa Barbara edf0292d4a Add initial support for Volumes to AWS 2015-04-10 13:25:42 -07:00
Clayton Coleman 51db3bd654 Create a new testclient package that can be backed by disk files
Standardize how our fakes are used so that a test case can use a
simpler mechanism for providing large, complex data sets, as well
as represent queries over time.
2015-04-07 14:56:15 -04:00
Huamin Chen a278ceeb0a implement glusterfs volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-07 09:14:39 -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
markturansky c4a53a23bd Added validation to prevent mutating Claim.Spec after binding 2015-04-06 08:46:44 -04:00
markturansky 95bd170ca2 PV & PVC Client implementation 2015-04-06 08:46:43 -04:00
Deyuan Deng d62afa85ff Abstract ismountpoint and use platform mounter for NFS volume 2015-04-01 23:05:02 -04:00
Kris Rousey 6904c4d585 Fixing a lot of string formatting issues with regards to:
* Improper format specifier (e.g. %s for bools or %s for ints)
  * More or less parameters than format specifiers
  * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
Paul Morie 852362ee39 Add positive logging for secret volume plugin 2015-03-25 17:25:13 -04:00
Tim Hockin e1a66ad015 Merge pull request #5398 from markturansky/volume_access_modes
Add GetAccessModes to volume plugin interface
2015-03-24 15:16:01 -07:00
markturansky 519cbc498b Added conversion and check to prevent panic 2015-03-24 17:33:31 -04:00
Tim Hockin 064b7dec42 Merge pull request #5807 from pmorie/secret_volume_ref
Change secret volume plugin reference to name
2015-03-24 14:18:35 -07:00
markturansky 5fa07f57b6 Removed PersistentVolumeSource and FindPersistentPluginBySpec func 2015-03-24 16:26:33 -04:00
markturansky 111f3d5120 Add GetAccessModes to volume plugin interface 2015-03-24 16:02:39 -04:00
Paul Morie e40ba109a1 Change SecretVolumeSource to use a secret name instead of ObjRef 2015-03-24 13:58:41 -04:00
markturansky 2fd82f60f4 Move escape function to util and clarify name 2015-03-24 13:52:31 -04:00
Tim Hockin bfadae77e0 Promote volume plugins, prep for persistent vols
Move pkg/kubelet/volume/... to pkg/volume/...
Some renames to make the soon-to-come persistent volumes work clearer.
2015-03-20 13:49:40 -07:00
Tim Hockin 6cb275829f Implement volumes as plugins.
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface.  Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00