Commit Graph

23 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
Jesse Haka 4e1b5c6a32 move detach out of os volumes attach
add test

add test

fix bazel

fix tests

change loglevel, remove else statement
2018-01-10 19:09:32 +02:00
NickrenREN af108fb938 implement cinder resize 2017-11-21 15:55:49 +08:00
Jesse Haka e45457b0d8 add possibility to ignore volume label in dynamic provisioning
ignorelabel -> addlabel

FIX tests

small fix to test

fixes according what was asked

fix test

fix test
2017-10-09 09:52:42 +03:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
FengyunPan 1f47323187 Waiting attach operation to be finished rather than returning nil 2017-06-06 22:58:44 +08:00
FengyunPan 300f531389 Wait for detach operation to complete
When volume's status is 'detaching', controllermanager will detach
it again and return err. It is necessary to wait for detach
operation to complete within the alloted time.
2017-05-31 07:52:15 +08:00
Jamie Hannaford 4bd71a3b77 Refactor to use Volume IDs and remove ambiguity 2017-05-24 12:59:16 +02:00
FengyunPan 4a6e1f2a1d Don't return err when volume's status is 'attaching'
When volume's status is 'attaching', its attachments will be None,
controllermanager can't get device path and make some failed event.
But it is normal, let's fix it.
2017-05-12 19:53:50 +08:00
Jesse Haka 66e49eecca add possibility to leave AZ empty, and it will automatically generate zone for it
update bazel

fix gofmt

make getzones function lowercase

add az to log
2017-05-03 16:37:20 +03:00
wlan0 a68c783dc8 Use ProviderID to address nodes in the cloudprovider
The cloudprovider is being refactored out of kubernetes core. This is being
done by moving all the cloud-specific calls from kube-apiserver, kubelet and
kube-controller-manager into a separately maintained binary(by vendors) called
cloud-controller-manager. The Kubelet relies on the cloudprovider to detect information
about the node that it is running on. Some of the cloudproviders worked by
querying local information to obtain this information. In the new world of things,
local information cannot be relied on, since cloud-controller-manager will not
run on every node. Only one active instance of it will be run in the cluster.

Today, all calls to the cloudprovider are based on the nodename. Nodenames are
unqiue within the kubernetes cluster, but generally not unique within the cloud.
This model of addressing nodes by nodename will not work in the future because
local services cannot be queried to uniquely identify a node in the cloud. Therefore,
I propose that we perform all cloudprovider calls based on ProviderID. This ID is
a unique identifier for identifying a node on an external database (such as
the instanceID in aws cloud).
2017-03-27 23:13:13 -07:00
Anton Klautsan 084d801e0a Add unit-tests for DisksAreAttached 2017-01-18 01:55:39 +00:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
NickrenREN 430abfbdfe cinder attacher GetDeviceMountPath
add function to test GetDeviceMountPath func return value
2016-12-20 10:15:34 +08:00
Chao Xu bb675d395f dependencies: pkg/volume 2016-11-23 15:53:09 -08:00
Kubernetes Submit Queue 43a915e628 Merge pull request #35491 from pmorie/byebye-getrootcontext
Automatic merge from submit-queue

Remove GetRootContext method from VolumeHost interface

Remove the `GetRootContext` call from the `VolumeHost` interface, since Kubernetes no longer needs to know the SELinux context of the Kubelet directory.

Per #33951 and #35127.

Depends on #33663; only the last commit is relevant to this PR.
2016-11-06 01:09:19 -08:00
Paul Morie 4722cb299b Remove GetRootContext from VolumeHost 2016-11-03 12:21:19 -04:00
Kiall Mac Innes ce8eda94df Don't rely on device name provided by Cinder
See issue #33128

We can't rely on the device name provided by Cinder, and thus must perform
detection based on the drive serial number (aka It's cinder ID) on the
kubelet itself.

This patch re-works the cinder volume attacher to ignore the supplied
deviceName, and instead defer to the pre-existing GetDevicePath method to
discover the device path based on it's serial number and /dev/disk/by-id
mapping.

This new behavior is controller by a config option, as falling back
to the cinder value when we can't discover a device would risk devices
not showing up, falling back to cinder's guess, and detecting the wrong
disk as attached.
2016-11-02 18:48:11 +01:00
Jing Xu abbde43374 Add sync state loop in master's volume reconciler
At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.

This PR adds the logic to periodically sync up the truth for attached volumes kept in the actual state cache. If the volume is no longer attached to the node, the actual state will be updated to reflect the truth. In turn, reconciler will take actions if needed.

To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.

More details are explained in PR #33760
2016-10-28 09:24:53 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Huamin Chen 259bce370e support storage class in Cinder provisioner
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-22 09:28:29 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Jan Safranek 6356d85db5 Add Cinder volume plugin attach tests. 2016-06-21 13:12:47 +02:00