Commit Graph

468 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Doug Davis 9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Kubernetes Submit Queue b1e8c9fc13 Merge pull request #29491 from justinsb/aws_deprecate_orempty
Automatic merge from submit-queue

AWS: Deprecate a few functions in favor of aws-sdk-go
2016-09-28 03:01:39 -07:00
Kubernetes Submit Queue c20965c652 Merge pull request #33067 from justinsb/better_aws_logging
Automatic merge from submit-queue

Better AWS logging around volumes
2016-09-28 00:20:56 -07:00
Kubernetes Submit Queue 4b4e8ad6a7 Merge pull request #33569 from justinsb/fix_31127
Automatic merge from submit-queue

AWS: Add log line when we're updating ELB attributes
2016-09-27 22:58:20 -07:00
Justin Santa Barbara 54309acd84 AWS: Add log line when we're updating ELB attributes
We want to be sure that reflect.DeepEqual doesn't give false positives

Fix #31127
2016-09-27 11:19:19 -04:00
Justin Santa Barbara 310423a4f9 AWS: more information in volume log messages 2016-09-27 11:10:40 -04: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
Kubernetes Submit Queue fd2469a0bb Merge pull request #33219 from dagnello/vsphere-instance-not-found
Automatic merge from submit-queue

vSphere cloud provider: ExternalID/InstanceID not returning appropriate error for non-existing VM

Addresses #33215.
When vCenter returns error vm not found, this is now being translated to
the appropriate error 'cloudprovider.InstanceNotFound' which indicates
to Kubernetes node controller that the VM is in fact not found.
2016-09-27 01:11:56 -07:00
Kubernetes Submit Queue abcc7927d1 Merge pull request #33208 from hacktastic/fix_openstack_lbaas_healthmonitors
Automatic merge from submit-queue

Fixed a bug that causes k8s to delete all healthmonitors on your OpenStack tenant

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
The OpenStack LBaaS v2 api does not support filtering health monitors by pool_id, so /lbaas/healthmonitors?pool_id=abc123 will always return all health monitors in your OpenStack tenant. 

This presents a problem when, in the very next block of code, we loop over the list of monitorIDs and delete them one-by-one. This will delete all the health monitors in your tenant without warning. 

Fortunately, we already got the healthmonitor IDs when we built the list of pools. Using those, we can delete only those healthmonitors associated with our pool(s).

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

**Special notes for your reviewer**:
The main issue here was the use of v2_monitors.List(lbaas.network, v2_monitors.ListOpts{PoolID: poolID}). This is trying to filter healthmonitors by pool_id, but that is not supported by the API. It creates a call like /lbaas/healthmonitors?pool_id=abc123. The API server ignores the pool_id parameter and returns a list of all healthmonitors (which k8s then tries to delete).

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-09-26 18:42:18 -07:00
Kubernetes Submit Queue 4785f6f517 Merge pull request #31978 from jsafrane/detach-before-delete
Automatic merge from submit-queue

Do not report error when deleting an attached volume

Persistent volume controller should not send warning events to a PV and mark the PV as failed when the volume is still attached.

This happens when a user quickly deletes a pod and associated PVC - PV is slowly detaching, while the PVC is already deleted and the PV enters Failed phase.

`Deleter.Deleter` can now return `tryAgainError`, which is sent as INFO to the PV to let the user know we did not forget to delete the PV, however the PV stays in Released state. The controller tries again in the next sync (15 seconds by default).

Fixes #31511
2016-09-25 18:55:32 -07:00
Davide Agnello fda70d220b ExternalID/InstanceID not returning appropriate error for missing VM
Addresses #33215.
When vCenter returns error vm not found, this is now being translated to
the appropriate error 'cloudprovider.InstanceNotFound' which indicates
to Kubernetes node controller that the VM is in fact not found.
2016-09-23 08:54:35 -07:00
hacktastic 77a203c49f the api does not support filtering health monitors by pool_id, so /lbaas/healthmonitors?pool_id=abc123 will always return all health monitors in your OS tenant. fortunately, we can get the health monitor IDs from the query to /lbaas/pools and delete them 2016-09-22 23:52:32 -07:00
Abrar Shivani 57180093af Support for storage class for vSphere volume plugin. Custom disk format for dynamic provisioning. 2016-09-16 17:15:38 -07:00
Jan Safranek 9903b389b3 Update cloud providers 2016-09-15 10:33:57 +02:00
Kubernetes Submit Queue 98eadd6219 Merge pull request #32636 from justinsb/aws_slower_volume_poll
Automatic merge from submit-queue

AWS: Reduce frequency of volume-mount poll
2016-09-14 19:40:06 -07:00
Justin Santa Barbara 3688dc4a72 AWS: More robust volume-mount poll
When we are mounting a lot of volumes, we frequently hit rate limits.

Reduce the frequency with which we poll the status; introduces a bit of
latency but probably matches common attach times pretty closely, and
avoids causing rate limit problems everywhere.

Also, we now poll for longer, as when we timeout, the volume is in an
indeterminate state: it may be about to complete.  The volume controller
can tolerate a slow attach/detach, but it is harder to tolerate the
indeterminism.

Finally, we ignore a sequence of errors in DescribeVolumes (up to 5 in a
row currently).  So we will eventually return an error, but a one
off-failure (e.g. due to rate limits) does not cause us to spuriously
fail.
2016-09-14 16:47:53 -04:00
Davanum Srinivas 64efc3a744 Update Google Cloud API client import paths
Bump version of golang.org/x/oauth2
Vendor google.golang.org/cloud/
Vendor google.golang.org/api/
Vendor cloud.google.com/go/compute/
Replace google.golang.org/cloud with cloud.google.com/go/

Fixes #30069
2016-09-13 22:21:06 -04:00
Kubernetes Submit Queue 8a56b6b27c Merge pull request #32265 from lojies/errmodify
Automatic merge from submit-queue

modify error return

err is nil here,chage it to fmt.Errorf("cannot find SCSI controller in VM")
2016-09-13 01:16:03 -07:00
Kubernetes Submit Queue f7bea5d8fd Merge pull request #32290 from zhouhaibing089/lbaasv1-fix
Automatic merge from submit-queue

delete the member before delete the pool

fixes https://github.com/kubernetes/kubernetes/issues/32285. it is necessary to delete members before delete the pool.
2016-09-13 01:15:58 -07:00
Piotr Skamruk dc3674c8d0 Ensure that we are closing files. 2016-09-12 09:33:24 +02:00
Kubernetes Submit Queue ff1cec99cc Merge pull request #32307 from mikedanese/cloud-owners
Automatic merge from submit-queue

update pkg/cloudprovider OWNERS to spread the review load

This is going to make the mungebot start assigning reviews in your cloudprovider packages.

fyi @runseb @dagnello @imkin @anguslees @dagnello
2016-09-12 00:08:23 -07:00
Kubernetes Submit Queue fe08d0ad0f Merge pull request #31618 from sjenning/fix-externalid-error
Automatic merge from submit-queue

return cloudprovider.InstanceNotFound for Instance interface ExternalID()

Fixes #31615 

@kubernetes/rh-cluster-infra @ncdc @anguslees
2016-09-11 23:28:12 -07:00
Kubernetes Submit Queue 0c63bd03fa Merge pull request #32084 from jsafrane/create-zone-check
Automatic merge from submit-queue

Do not allow creation of GCE PDs in unmanaged zones.

Such volumes then couldn't be deleted as `getDiskByNameUnknownZone` goes through managed zones only.

Fixes: #31948
@kubernetes/rh-storage 
@saad-ali, PTAL.
2016-09-11 11:01:30 -07:00
Kubernetes Submit Queue 5b23de5b38 Merge pull request #30836 from abrarshivani/vsphere_dynamic_proviosioning
Automatic merge from submit-queue

Fix: Dynamic provisioning for vSphere

This PR does the following,

1. Fixes an error 'A specified parameter was not correct:' occurs while dynamically provisioning the volumes.
2. Adds VSAN support for dynamic provisioning.
2016-09-10 17:21:08 -07:00
Kubernetes Submit Queue 65f3fa9caf Merge pull request #31828 from girishkalele/esipp_toggle
Automatic merge from submit-queue

Service behaviour not correct when ESIPP annotation is toggled or deleted

Fixes #31649 

GCE controller: Correctly add/remove http health checks based on whether the annotation was added or removed

kube-proxy: Create/Delete XLB local-endpoints balancer chain and change jump actions from KUBE-FW- chain based on the annotation.
2016-09-09 13:09:59 -07:00
Mike Danese 418bfb6453 update pkg/cloudprovider OWNERS to spread the load 2016-09-08 15:13:21 -07:00
zhouhaibing089 fa5551b80d delete the member before delete the pool 2016-09-08 22:10:11 +08:00
lojies d45dfda425 modify error return 2016-09-08 16:36:33 +08:00
Kubernetes Submit Queue 93c9b05bc9 Merge pull request #31979 from dagnello/vsphere-cleanup-controller-nil-check
Automatic merge from submit-queue

vSphere Cloud provider null pointer exception

This PR addresses issue #31823.

SelectByType function in govmomi will panic if deviceType is not Array,
Chan, Map, Ptr, or Slice.  Also checking if vmDevices or vm are nil,
there is nothing to cleanup.
2016-09-07 23:30:48 -07:00
Jan Safranek 2e26019629 Do not allow creation of GCE PDs in unmanaged zones.
Such volumes then cannot be deleted.
2016-09-07 09:35:54 +02:00
Girish Kalele 81b36aaba6 Add NotFound safety check to the HealthCheck reconciler 2016-09-06 11:35:37 -07:00
Girish Kalele 87a0275993 GCE Cloud Provider - correctly handle toggling of ESIPP on or off 2016-09-06 11:04:36 -07:00
Kubernetes Submit Queue 2977d03bfe Merge pull request #30935 from vipulsabhaya/vsphere_zones
Automatic merge from submit-queue

Make a vSphere cluster the failure_zone

vSphere cloud provider returns the FailureZone as Cluster, if the VM belongs to a ResourcePool under a Cluster. 

fixes: #30933

* Currently the vSphere cloud provider treats Datacenter as the failure
  Zone.  This doesn't necessarily work since in the current implemention
  Kubernetes nodes cannot span Datacenters.
* This change introduces Clusters as the failure zone, while treating
  Datacenters as Regions
* Also updated tests for Zones
2016-09-05 18:57:45 -07:00
Kubernetes Submit Queue 61dda4d34a Merge pull request #31773 from pigmej/typos_englishify_some_pkgs
Automatic merge from submit-queue

Typos and englishify pkg/cloudprovider + pkg/dns + pkg/kubectl

**What this PR does / why we need it**: Just fixed some typos + "englishify" in pkg/cloudprovider + pkg/dns + pkg/kubectl

**Which issue this PR fixes** : None

**Special notes for your reviewer**: It's just fixes typos

**Release note**: `NONE`
2016-09-05 11:10:09 -07:00
Kubernetes Submit Queue 1f70140c4f Merge pull request #32021 from mikedanese/flake
Automatic merge from submit-queue

retry oauth token fetch in gce cloudprovider

Fixes https://github.com/kubernetes/kubernetes/issues/31560

The oauth client fetches a token on the initial request of that client. Let's warm the cache.

cc @goltermann @lavalamp
2016-09-03 01:58:19 -07:00
Mike Danese 1a3ff0788b retry oauth token fetch in gce cloudprovider
The ouath client fetches a token on it's first request. Let's warm
the cache to avoid pesky flakes.
2016-09-02 18:20:10 -07:00
Kubernetes Submit Queue 130051b2d9 Merge pull request #31090 from justinsb/fix_29324
Automatic merge from submit-queue

AWS: fix volume device assignment race condition

* Move volume attachment map to cloud level
* Perform sanity check after volume attach, to double-check everything is right
2016-09-02 16:19:57 -07:00
Davide Agnello 87e721367e vSphere Cloud provider null pointer exception
SelectByType function in govmomi will panic if deviceType is not Array,
Chan, Map, Ptr, or Slice.  Also checking if vmDevices or vm are nil,
there is nothing to cleanup.
2016-09-02 07:50:19 -07:00
Jedrzej Nowak 9e2abd4b02 Fix various typos in pgk/cloudprovider,dns,kubectl 2016-08-31 18:56:52 +02:00
Thom May 3f219065b5
I'm not a rackspace or kubernetes user any more
Signed-off-by: Thom May <thom@may.lt>
2016-08-30 12:04:50 +01:00
Seth Jennings bde3966699 return cloudprovider.InstanceNotFound in opentack ExternalID() 2016-08-29 21:23:08 -05:00
Justin Santa Barbara 7e5c6877d7 Fixes per code review 2016-08-25 22:51:04 -04:00
Vipul Sabhaya 808f18439d Make a vSphere cluster the failure_zone
* Currently the vSphere cloud provider treats Datacenter as the failure
  Zone.  This doesn't necessarily work since in the current implemention
  Kubernetes nodes cannot span Datacenters.
* This change introduces Clusters as the failure zone, while treating
  Datacenters as Regions
* Also updated tests for Zones
2016-08-25 15:37:24 -07:00
Kubernetes Submit Queue 49ff2e8831 Merge pull request #31115 from jsafrane/add-constants
Automatic merge from submit-queue

Add constants and documentation around AWS magic numbers

Also, bumped max IOPS/GB to 50, it changed from 30 since last time I checked.

Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html

@kubernetes/sig-storage
2016-08-24 12:59:50 -07:00
Kubernetes Submit Queue f96b8fc85a Merge pull request #31334 from jsafrane/fix-aws-encryption
Automatic merge from submit-queue

Fix AWS reporting "The parameter KmsKeyId requires the parameter Encrypted to be set."

- use aws.String/Int/Bool functions
- don't set the key to empty string, use nil instead

@justinsb @kubernetes/sig-storage
2016-08-24 10:55:33 -07:00
Justin Santa Barbara 6a1f892c1d AWS: Sanity checks after volume attach
In the light of issue #29324, double check that the volume was attached
correctly where we expect it, before returning.

Issue #29324
2016-08-24 13:00:38 -04:00
Justin Santa Barbara 81240da858 AWS: move volume attachment map to cloud level
The problem is that attachments are now done on the master, and we are
only caching the attachment map persistently for the local instance.  So
there is now a race, because the attachment map is cleared every time.

Issue #29324
2016-08-24 13:00:33 -04:00
Kubernetes Submit Queue 3544f8a717 Merge pull request #29836 from rootfs/azuredd
Automatic merge from submit-queue

support Azure data disk volume

This is a WIP of supporting azure data disk volume. Will add test and dynamic provisioning support once #29006 is merged

replace #25915
fix #23259

@kubernetes/sig-storage 
@colemickens @brendandburns
2016-08-24 02:49:54 -07:00
Jan Safranek 8cd5e263b8 Fix AWS reporting "The parameter KmsKeyId requires the parameter Encrypted to be set."
- use aws.String/Int/Bool functions
- don't set the key to empty string, use nil instead
2016-08-24 10:05:07 +02:00
Kubernetes Submit Queue e427ab0baa Merge pull request #30649 from dagnello/openstack-lbaasv2-multiport
Automatic merge from submit-queue

fix Openstack provider to allow more than one service port for lbaas v2

This resolves bug #30477 where if a service defines multiple ports for load balancer, the plugin will fail with multiple ports are not supported.

@anguslees @jianhuiz
2016-08-23 22:36:09 -07:00