Commit bd421c96 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #29399 from timothysc/etcd3_scripts

Automatic merge from submit-queue Update etcd 2.2 references to use 3.0.x This update an assortment of etcd 2.2.X references to 3.0.4 in the code base. /cc @hongchaodeng xref: https://github.com/kubernetes/kubernetes/issues/22448 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29399) <!-- Reviewable:end -->
parents e4a1ca71 24993b03
...@@ -72,7 +72,7 @@ RUN mkdir $TMPDIR \ ...@@ -72,7 +72,7 @@ RUN mkdir $TMPDIR \
github.com/jteeuwen/go-bindata/go-bindata github.com/jteeuwen/go-bindata/go-bindata
# Download and symlink etcd. We need this for our integration tests. # Download and symlink etcd. We need this for our integration tests.
RUN export ETCD_VERSION=v2.2.1; \ RUN export ETCD_VERSION=v3.0.3; \
mkdir -p /usr/local/src/etcd \ mkdir -p /usr/local/src/etcd \
&& cd /usr/local/src/etcd \ && cd /usr/local/src/etcd \
&& curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \ && curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \
......
...@@ -23,7 +23,7 @@ RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads} ...@@ -23,7 +23,7 @@ RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads}
FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"}
# Define etcd version to use. # Define etcd version to use.
ETCD_VERSION=${ETCD_VERSION:-"2.2.1"} ETCD_VERSION=${ETCD_VERSION:-"3.0.3"}
# Define k8s version to use. # Define k8s version to use.
K8S_VERSION=${K8S_VERSION:-"1.1.1"} K8S_VERSION=${K8S_VERSION:-"1.1.1"}
......
...@@ -14,7 +14,7 @@ spec: ...@@ -14,7 +14,7 @@ spec:
--listen-client-urls=http://127.0.0.1:4002 --listen-client-urls=http://127.0.0.1:4002
--data-dir=/var/etcd/data-events --data-dir=/var/etcd/data-events
1>>/var/log/etcd-events.log 2>&1 1>>/var/log/etcd-events.log 2>&1
image: gcr.io/google_containers/etcd:2.2.1 image: gcr.io/google_containers/etcd:3.0.3
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
livenessProbe: livenessProbe:
httpGet: httpGet:
......
...@@ -14,7 +14,7 @@ spec: ...@@ -14,7 +14,7 @@ spec:
--listen-client-urls=http://127.0.0.1:4001 --listen-client-urls=http://127.0.0.1:4001
--data-dir=/var/etcd/data --data-dir=/var/etcd/data
1>>/var/log/etcd.log 2>&1 1>>/var/log/etcd.log 2>&1
image: gcr.io/google_containers/etcd:2.2.1 image: gcr.io/google_containers/etcd:3.0.3
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
livenessProbe: livenessProbe:
httpGet: httpGet:
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"containers": [ "containers": [
{ {
"name": "etcd", "name": "etcd",
"image": "gcr.io/google_containers/etcd-ARCH:2.2.5", "image": "gcr.io/google_containers/etcd-ARCH:3.0.3",
"command": [ "command": [
"/usr/local/bin/etcd", "/usr/local/bin/etcd",
"--listen-client-urls=http://127.0.0.1:4001", "--listen-client-urls=http://127.0.0.1:4001",
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"containers":[ "containers":[
{ {
"name": "etcd-container", "name": "etcd-container",
"image": "gcr.io/google_containers/etcd:2.2.1", "image": "gcr.io/google_containers/etcd:3.0.3",
"resources": { "resources": {
"requests": { "requests": {
"cpu": {{ cpulimit }} "cpu": {{ cpulimit }}
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
}, },
{ {
"name": "etcd-container", "name": "etcd-container",
"image": "gcr.io/google_containers/etcd:2.2.1", "image": "gcr.io/google_containers/etcd:3.0.3",
"command": [ "command": [
"/bin/sh", "/bin/sh",
"-c", "-c",
......
...@@ -129,7 +129,7 @@ type FederatedReplicaSetPreferences struct { ...@@ -129,7 +129,7 @@ type FederatedReplicaSetPreferences struct {
// Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset. // Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset.
type ClusterReplicaSetPreferences struct { type ClusterReplicaSetPreferences struct {
// Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default. // Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default.
MinReplicas int64 `json:"maxReplicas,omitempty"` MinReplicas int64 `json:"minReplicas,omitempty"`
// Maximum number of replicas that should be assigned to this Local ReplicaSet. Unbounded if no value provided (default). // Maximum number of replicas that should be assigned to this Local ReplicaSet. Unbounded if no value provided (default).
MaxReplicas *int64 `json:"maxReplicas,omitempty"` MaxReplicas *int64 `json:"maxReplicas,omitempty"`
......
...@@ -50,23 +50,35 @@ var _ = proto.Marshal ...@@ -50,23 +50,35 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *Cluster) Reset() { *m = Cluster{} } // This is a compile-time assertion to ensure that this generated file
func (*Cluster) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *ClusterCondition) Reset() { *m = ClusterCondition{} } func (m *Cluster) Reset() { *m = Cluster{} }
func (*ClusterCondition) ProtoMessage() {} func (*Cluster) ProtoMessage() {}
func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *ClusterList) Reset() { *m = ClusterList{} } func (m *ClusterCondition) Reset() { *m = ClusterCondition{} }
func (*ClusterList) ProtoMessage() {} func (*ClusterCondition) ProtoMessage() {}
func (*ClusterCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *ClusterSpec) Reset() { *m = ClusterSpec{} } func (m *ClusterList) Reset() { *m = ClusterList{} }
func (*ClusterSpec) ProtoMessage() {} func (*ClusterList) ProtoMessage() {}
func (*ClusterList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
func (*ClusterStatus) ProtoMessage() {} func (*ClusterSpec) ProtoMessage() {}
func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *ClusterStatus) Reset() { *m = ClusterStatus{} }
func (*ClusterStatus) ProtoMessage() {}
func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) ProtoMessage() {}
func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{5}
}
func init() { func init() {
proto.RegisterType((*Cluster)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.Cluster") proto.RegisterType((*Cluster)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.Cluster")
...@@ -1473,3 +1485,56 @@ var ( ...@@ -1473,3 +1485,56 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 776 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xdf, 0x6a, 0x13, 0x4d,
0x14, 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9f, 0x4b, 0x73, 0xfb, 0x25, 0x5d, 0xb3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff,
0x48, 0x5d, 0x6b, 0x0c, 0x46, 0x08, 0x00, 0x00,
}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# A set of helpers for starting/running etcd for tests # A set of helpers for starting/running etcd for tests
ETCD_VERSION=${ETCD_VERSION:-2.2.1} ETCD_VERSION=${ETCD_VERSION:-3.0.3}
ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_HOST=${ETCD_HOST:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-4001} ETCD_PORT=${ETCD_PORT:-4001}
......
...@@ -61,19 +61,9 @@ cluster/vagrant/provision-utils.sh: api_servers: '$(echo "$MASTER_IP" | sed -e ...@@ -61,19 +61,9 @@ cluster/vagrant/provision-utils.sh: api_servers: '$(echo "$MASTER_IP" | sed -e
cluster/vagrant/provision-utils.sh: node_ip: '$(echo "$MASTER_IP" | sed -e "s/'/''/g")' cluster/vagrant/provision-utils.sh: node_ip: '$(echo "$MASTER_IP" | sed -e "s/'/''/g")'
cluster/vagrant/provision-utils.sh: runtime_config: '$(echo "$RUNTIME_CONFIG" | sed -e "s/'/''/g")' cluster/vagrant/provision-utils.sh: runtime_config: '$(echo "$RUNTIME_CONFIG" | sed -e "s/'/''/g")'
cluster/vsphere/templates/salt-minion.sh: hostname_override: $(ip route get 1.1.1.1 | awk '{print $7}') cluster/vsphere/templates/salt-minion.sh: hostname_override: $(ip route get 1.1.1.1 | awk '{print $7}')
docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js: host.cloud_config_file = cloud_config;
docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js: host.cloud_config_file = cloud_config[n];
docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js: if (cloud_config instanceof Array) {
docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js: var cloud_config = cloud_config_creator(x, conf);
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js: return cloud_config.generate_environment_file_entry_from_object(util.hostname(n, 'kube'), {
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js: return cloud_config.process_template(input_file, output_file, function(data) {
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js: return cloud_config.process_template(input_file, output_file, function(data) {
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js: var write_files_extra = cloud_config.write_files_from('addons', '/etc/kubernetes/addons');
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js:var cloud_config = require('../cloud_config.js');
examples/cluster-dns/images/frontend/client.py: service_address = socket.gethostbyname(hostname) examples/cluster-dns/images/frontend/client.py: service_address = socket.gethostbyname(hostname)
examples/storage/cassandra/image/run.sh: cluster_name \ examples/storage/cassandra/image/run.sh: cluster_name \
examples/storage/vitess/env.sh: node_ip=$(get_node_ip) examples/storage/vitess/env.sh: node_ip=$(get_node_ip)
hack/jenkins/e2e-runner.sh: local -r image_project="$1"
hack/local-up-cluster.sh: advertise_address="--advertise_address=${API_HOST}" hack/local-up-cluster.sh: advertise_address="--advertise_address=${API_HOST}"
hack/local-up-cluster.sh: runtime_config="--runtime-config=${RUNTIME_CONFIG}" hack/local-up-cluster.sh: runtime_config="--runtime-config=${RUNTIME_CONFIG}"
hack/local-up-cluster.sh: advertise_address="" hack/local-up-cluster.sh: advertise_address=""
...@@ -82,8 +72,8 @@ hack/test-update-storage-objects.sh: local storage_media_type=${2:-""} ...@@ -82,8 +72,8 @@ hack/test-update-storage-objects.sh: local storage_media_type=${2:-""}
hack/test-update-storage-objects.sh: local storage_versions=${1:-""} hack/test-update-storage-objects.sh: local storage_versions=${1:-""}
hack/test-update-storage-objects.sh: source_file=${test_data[0]} hack/test-update-storage-objects.sh: source_file=${test_data[0]}
hack/test-update-storage-objects.sh:# source_file,resource,namespace,name,old_version,new_version hack/test-update-storage-objects.sh:# source_file,resource,namespace,name,old_version,new_version
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort *int32 `protobuf:"varint,3,opt,name=container_port" json:"container_port,omitempty"` pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort *int32 `protobuf:"varint,3,opt,name=container_port,json=containerPort" json:"container_port,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj" json:"oom_score_adj,omitempty"` pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int32 container_port = 3; pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int32 container_port = 3;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int64 oom_score_adj = 5; pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int64 oom_score_adj = 5;
pkg/kubelet/network/hairpin/hairpin.go: hairpinModeRelativePath = "hairpin_mode" pkg/kubelet/network/hairpin/hairpin.go: hairpinModeRelativePath = "hairpin_mode"
......
...@@ -38,9 +38,32 @@ var _ = proto.Marshal ...@@ -38,9 +38,32 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *Quantity) Reset() { *m = Quantity{} } // This is a compile-time assertion to ensure that this generated file
func (*Quantity) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *Quantity) Reset() { *m = Quantity{} }
func (*Quantity) ProtoMessage() {}
func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func init() { func init() {
proto.RegisterType((*Quantity)(nil), "k8s.io.kubernetes.pkg.api.resource.Quantity") proto.RegisterType((*Quantity)(nil), "k8s.io.kubernetes.pkg.api.resource.Quantity")
} }
var fileDescriptorGenerated = []byte{
// 222 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08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 0x80, 0xb8, 0xe1, 0x91, 0x1c, 0xe3,
0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x78, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x0e, 0x98, 0x3f,
0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x1c, 0x7f, 0xff, 0x20, 0x01, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -49,17 +49,25 @@ var _ = proto.Marshal ...@@ -49,17 +49,25 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *PetSet) Reset() { *m = PetSet{} } // This is a compile-time assertion to ensure that this generated file
func (*PetSet) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *PetSetList) Reset() { *m = PetSetList{} } func (m *PetSet) Reset() { *m = PetSet{} }
func (*PetSetList) ProtoMessage() {} func (*PetSet) ProtoMessage() {}
func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *PetSetSpec) Reset() { *m = PetSetSpec{} } func (m *PetSetList) Reset() { *m = PetSetList{} }
func (*PetSetSpec) ProtoMessage() {} func (*PetSetList) ProtoMessage() {}
func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} } func (m *PetSetSpec) Reset() { *m = PetSetSpec{} }
func (*PetSetStatus) ProtoMessage() {} func (*PetSetSpec) ProtoMessage() {}
func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} }
func (*PetSetStatus) ProtoMessage() {}
func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func init() { func init() {
proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet") proto.RegisterType((*PetSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1alpha1.PetSet")
...@@ -1022,3 +1030,46 @@ var ( ...@@ -1022,3 +1030,46 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 611 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x4c,
0x10, 0xc6, 0xeb, 0xa6, 0xa9, 0xfc, 0x6e, 0xf3, 0x22, 0xb4, 0x54, 0x28, 0x8a, 0x50, 0x8a, 0x72,
0x8a, 0x50, 0xb3, 0x26, 0x85, 0xa2, 0x9e, 0x8d, 0x04, 0x42, 0x02, 0x5a, 0x39, 0x10, 0x21, 0x10,
0x48, 0x6b, 0x67, 0x48, 0x97, 0xd8, 0x5e, 0xcb, 0xbb, 0xce, 0x99, 0x03, 0xdc, 0x39, 0xf3, 0x31,
0xf8, 0x08, 0x9c, 0x72, 0xec, 0x91, 0x53, 0x05, 0xe5, 0x8b, 0xb0, 0x5e, 0xff, 0x49, 0xa8, 0x93,
0x96, 0x1e, 0x36, 0xca, 0xee, 0xce, 0xf3, 0xdb, 0x99, 0x67, 0xc6, 0xe8, 0x60, 0x72, 0x20, 0x08,
0xe3, 0xd6, 0x24, 0x71, 0x21, 0x0e, 0x41, 0x82, 0xb0, 0xa2, 0xc9, 0xd8, 0xa2, 0x11, 0x13, 0xea,
0x27, 0x12, 0xd6, 0xb4, 0x4f, 0xfd, 0xe8, 0x98, 0xf6, 0xad, 0x31, 0x84, 0x10, 0x53, 0x09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
0x67, 0xe9, 0x73, 0x78, 0x1f, 0x6d, 0x09, 0x88, 0xa7, 0xcc, 0x83, 0xe7, 0x34, 0x80, 0x66, 0x5d,
0xd5, 0xf9, 0x9f, 0x7d, 0x23, 0x07, 0x6d, 0x0d, 0xe6, 0x57, 0xce, 0x62, 0x5c, 0xe7, 0x93, 0x81,
0x1a, 0x8b, 0x23, 0x8a, 0x1f, 0x21, 0xcc, 0xdd, 0x34, 0x02, 0x46, 0x8f, 0xb3, 0x4f, 0x58, 0x59,
0xad, 0x1b, 0x58, 0xb3, 0x6f, 0x2a, 0x14, 0x3e, 0xac, 0xdc, 0x3a, 0x4b, 0x14, 0x78, 0x77, 0xa1,
0xfd, 0xeb, 0xba, 0xfd, 0xa5, 0x8b, 0xd5, 0x11, 0xb0, 0xef, 0xcc, 0x7e, 0xb5, 0xd7, 0x4e, 0xd4,
0xfa, 0xa1, 0xd6, 0xc7, 0xb3, 0xb6, 0x31, 0x53, 0xeb, 0x44, 0xad, 0x9f, 0x6a, 0x7d, 0xf9, 0xdd,
0x5e, 0x7b, 0x6d, 0x16, 0x43, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0x14, 0xcf, 0x45, 0x01, 0xd8,
0x05, 0x00, 0x00,
}
...@@ -48,20 +48,29 @@ var _ = proto.Marshal ...@@ -48,20 +48,29 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *ExtraValue) Reset() { *m = ExtraValue{} } // This is a compile-time assertion to ensure that this generated file
func (*ExtraValue) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *TokenReview) Reset() { *m = TokenReview{} } func (m *ExtraValue) Reset() { *m = ExtraValue{} }
func (*TokenReview) ProtoMessage() {} func (*ExtraValue) ProtoMessage() {}
func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (m *TokenReview) Reset() { *m = TokenReview{} }
func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReview) ProtoMessage() {}
func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewSpec) ProtoMessage() {}
func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
func (*UserInfo) ProtoMessage() {} func (*TokenReviewStatus) ProtoMessage() {}
func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *UserInfo) Reset() { *m = UserInfo{} }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func init() { func init() {
proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.ExtraValue") proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.ExtraValue")
...@@ -1225,3 +1234,47 @@ var ( ...@@ -1225,3 +1234,47 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 632 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x4f, 0x13, 0x41,
0x14, 0xef, 0x5f, 0x6c, 0xa7, 0xa2, 0x38, 0x89, 0x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3c, 0x5e, 0xdc, 0xc0, 0xcc, 0x68, 0xa1, 0x69, 0xa6, 0xb5, 0x51, 0x58, 0xcf, 0x7b, 0x4f, 0x86,
0xe7, 0x8b, 0xb9, 0x53, 0x75, 0x7e, 0xaa, 0x73, 0x72, 0xb1, 0x98, 0x1f, 0xaa, 0x73, 0xaa, 0xce,
0x6f, 0x75, 0xbe, 0xfc, 0x59, 0xcc, 0x7d, 0xb8, 0x63, 0x05, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff,
0xca, 0xd0, 0x35, 0x8c, 0xb5, 0x05, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -52,32 +52,51 @@ var _ = proto.Marshal ...@@ -52,32 +52,51 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *ExtraValue) Reset() { *m = ExtraValue{} } // This is a compile-time assertion to ensure that this generated file
func (*ExtraValue) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *ExtraValue) Reset() { *m = ExtraValue{} }
func (*ExtraValue) ProtoMessage() {}
func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) ProtoMessage() {}
func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{1}
}
func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) ProtoMessage() {}
func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) ProtoMessage() {}
func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) ProtoMessage() {}
func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{5}
}
func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) ProtoMessage() {}
func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) ProtoMessage() {}
func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) ProtoMessage() {}
func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{8}
}
func init() { func init() {
proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.ExtraValue") proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.ExtraValue")
...@@ -2262,3 +2281,61 @@ var ( ...@@ -2262,3 +2281,61 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 864 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x4f, 0x1b, 0x47,
0x18, 0xf6, 0xf7, 0xc7, 0xd0, 0x16, 0x3a, 0x88, 0x62, 0x5c, 0x09, 0x5b, 0xae, 0x54, 0x81, 0x04,
0xbb, 0x05, 0x09, 0x15, 0xa1, 0x1e, 0xea, 0x55, 0x2d, 0x84, 0x5a, 0x68, 0x35, 0x6e, 0x51, 0xd5,
0x9e, 0x66, 0xd7, 0x83, 0xd9, 0xd8, 0xde, 0xb5, 0x66, 0x66, 0x4d, 0xc8, 0x89, 0x1f, 0x90, 0x43,
0x8e, 0x1c, 0xf3, 0x17, 0xf2, 0x07, 0x72, 0x0d, 0x47, 0x72, 0x89, 0x12, 0x29, 0x42, 0x09, 0xf9,
0x17, 0x39, 0x65, 0x76, 0x76, 0xec, 0xc5, 0x78, 0x9d, 0xc8, 0x09, 0x8a, 0x72, 0xe0, 0x30, 0xd2,
0xce, 0xfb, 0xf1, 0xbc, 0xcf, 0xcc, 0x3c, 0xb3, 0xef, 0x80, 0x5f, 0x5b, 0x9b, 0x4c, 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, 0xa2, 0xdf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xa4, 0x8c, 0xef, 0x24, 0x0c, 0x00, 0x00,
}
...@@ -52,29 +52,49 @@ var _ = proto.Marshal ...@@ -52,29 +52,49 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) ProtoMessage() {}
func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{0}
}
func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) ProtoMessage() {}
func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) ProtoMessage() {}
func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{2}
}
func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{3}
}
func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{4}
}
func (m *Scale) Reset() { *m = Scale{} } func (m *Scale) Reset() { *m = Scale{} }
func (*Scale) ProtoMessage() {} func (*Scale) ProtoMessage() {}
func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) ProtoMessage() {}
func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) ProtoMessage() {}
func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func init() { func init() {
proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.CrossVersionObjectReference") proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.CrossVersionObjectReference")
...@@ -1708,3 +1728,59 @@ var ( ...@@ -1708,3 +1728,59 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 823 bytes of a g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d1, 0x1d, 0xb0, 0x98, 0x24, 0x00, 0x37, 0xc1, 0x02, 0x7d, 0xa8, 0x69, 0x4e, 0x16, 0x20, 0x99,
0x81, 0x49, 0x31, 0x13, 0x84, 0x4e, 0x80, 0x96, 0x8a, 0x30, 0x1b, 0x39, 0x42, 0x33, 0xdc, 0x15,
0x3e, 0x06, 0x54, 0xfd, 0xd7, 0x26, 0xe8, 0x13, 0x75, 0x8e, 0x12, 0x84, 0xf5, 0xe5, 0xcd, 0xcb,
0xea, 0xdc, 0xad, 0x58, 0xff, 0x8b, 0xf5, 0xc7, 0x7d, 0x35, 0x77, 0x23, 0xd6, 0xad, 0x58, 0x2f,
0xc4, 0xfa, 0xeb, 0x55, 0x75, 0xee, 0x97, 0xfc, 0xa0, 0xfe, 0x36, 0x00, 0x00, 0xff, 0xff, 0x45,
0xec, 0x9a, 0x15, 0x8e, 0x09, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -53,26 +53,39 @@ var _ = proto.Marshal ...@@ -53,26 +53,39 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *Job) Reset() { *m = Job{} } // This is a compile-time assertion to ensure that this generated file
func (*Job) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *JobCondition) Reset() { *m = JobCondition{} } func (m *Job) Reset() { *m = Job{} }
func (*JobCondition) ProtoMessage() {} func (*Job) ProtoMessage() {}
func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *JobList) Reset() { *m = JobList{} } func (m *JobCondition) Reset() { *m = JobCondition{} }
func (*JobList) ProtoMessage() {} func (*JobCondition) ProtoMessage() {}
func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *JobSpec) Reset() { *m = JobSpec{} } func (m *JobList) Reset() { *m = JobList{} }
func (*JobSpec) ProtoMessage() {} func (*JobList) ProtoMessage() {}
func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *JobStatus) Reset() { *m = JobStatus{} } func (m *JobSpec) Reset() { *m = JobSpec{} }
func (*JobStatus) ProtoMessage() {} func (*JobSpec) ProtoMessage() {}
func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (m *JobStatus) Reset() { *m = JobStatus{} }
func (*LabelSelector) ProtoMessage() {} func (*JobStatus) ProtoMessage() {}
func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *LabelSelector) Reset() { *m = LabelSelector{} }
func (*LabelSelector) ProtoMessage() {}
func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) ProtoMessage() {}
func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{6}
}
func init() { func init() {
proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.Job") proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.Job")
...@@ -2005,3 +2018,72 @@ var ( ...@@ -2005,3 +2018,72 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 1027 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x23, 0x45,
0x10, 0x8e, 0x3d, 0xb1, 0x63, 0xb7, 0x93, 0xac, 0x69, 0x88, 0x64, 0x2c, 0x91, 0xac, 0x0c, 0x42,
0xbb, 0x62, 0x33, 0x23, 0x07, 0x90, 0x56, 0x2b, 0xb1, 0x12, 0x13, 0x82, 0x04, 0xc4, 0x24, 0x6a,
0x47, 0x2b, 0xc4, 0xcf, 0xa1, 0x3d, 0xae, 0x75, 0x86, 0x8c, 0x67, 0x86, 0xe9, 0x1e, 0x43, 0x38,
0x21, 0x71, 0xe0, 0xca, 0x43, 0xf0, 0x0c, 0xec, 0x2b, 0xe4, 0xb8, 0x70, 0xe2, 0x14, 0xc1, 0xf2,
0x16, 0x9c, 0xe8, 0xee, 0xe9, 0xf9, 0xf1, 0x5f, 0xe4, 0xec, 0xa1, 0x25, 0x77, 0x75, 0x7d, 0x5f,
0x55, 0x77, 0x7d, 0x55, 0x63, 0xf4, 0xee, 0xc5, 0x43, 0x66, 0xba, 0x81, 0x75, 0x11, 0x0f, 0x20,
0xf2, 0x81, 0x03, 0xb3, 0xc2, 0x8b, 0x91, 0x45, 0x43, 0x97, 0x59, 0x03, 0xca, 0x9d, 0x73, 0x6b,
0xd2, 0xb5, 0x46, 0xe0, 0x43, 0x44, 0x39, 0x0c, 0xcd, 0x30, 0x0a, 0x78, 0x80, 0xdf, 0x4c, 0x40,
0x66, 0x0e, 0x32, 0x05, 0xc8, 0x94, 0x20, 0x53, 0x81, 0xcc, 0x49, 0xb7, 0xbd, 0x3f, 0x72, 0xf9,
0x79, 0x3c, 0x30, 0x9d, 0x60, 0x6c, 0x8d, 0x82, 0x51, 0x60, 0x29, 0xec, 0x20, 0x7e, 0xaa, 0x76,
0x6a, 0xa3, 0x7e, 0x25, 0x9c, 0xed, 0x83, 0xa5, 0x89, 0x58, 0x11, 0xb0, 0x20, 0x8e, 0x1c, 0x98,
0xcd, 0xa3, 0xfd, 0xfe, 0x72, 0x4c, 0xec, 0x4f, 0x20, 0x62, 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 0x61, 0x3d, 0x42, 0xb5, 0x20, 0x94, 0xff,
0x56, 0x44, 0x6f, 0x27, 0x1f, 0xd3, 0xfb, 0x69, 0xdb, 0x9d, 0x68, 0xbb, 0xf8, 0x9c, 0xee, 0x4c,
0xd1, 0xa7, 0x07, 0x24, 0x83, 0xe2, 0x0e, 0xaa, 0xaa, 0x7c, 0xe4, 0x20, 0x33, 0x04, 0x09, 0x92,
0xa5, 0x7f, 0xa2, 0x2c, 0x44, 0x9f, 0xd8, 0x6f, 0x5d, 0xfd, 0xb3, 0xbb, 0xf6, 0x5c, 0xac, 0xbf,
0xc4, 0xfa, 0xe9, 0xc5, 0x6e, 0xe9, 0x4a, 0xac, 0xe7, 0x62, 0xfd, 0x2d, 0xd6, 0xaf, 0xff, 0xee,
0xae, 0x7d, 0x59, 0x9e, 0x74, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x8b, 0x10, 0xf1, 0xb1,
0x0a, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -47,20 +47,39 @@ var _ = proto.Marshal ...@@ -47,20 +47,39 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} }
func (*CertificateSigningRequest) ProtoMessage() {} func (*CertificateSigningRequest) ProtoMessage() {}
func (*CertificateSigningRequest) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{0}
}
func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} }
func (*CertificateSigningRequestCondition) ProtoMessage() {} func (*CertificateSigningRequestCondition) ProtoMessage() {}
func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{1}
}
func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} }
func (*CertificateSigningRequestList) ProtoMessage() {} func (*CertificateSigningRequestList) ProtoMessage() {}
func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{2}
}
func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} }
func (*CertificateSigningRequestSpec) ProtoMessage() {} func (*CertificateSigningRequestSpec) ProtoMessage() {}
func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{3}
}
func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} }
func (*CertificateSigningRequestStatus) ProtoMessage() {} func (*CertificateSigningRequestStatus) ProtoMessage() {}
func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{4}
}
func init() { func init() {
proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest") proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest")
...@@ -1256,3 +1275,50 @@ var ( ...@@ -1256,3 +1275,50 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 681 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 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eb, 0x36, 0xb0, 0xbc, 0xb7, 0xf1, 0x1c, 0x6b, 0x1c, 0x3a, 0xa0, 0x1a, 0xb2, 0x58, 0x26,
0x5c, 0x6d, 0xbb, 0xac, 0x22, 0x80, 0x36, 0xd1, 0x0b, 0x83, 0x60, 0xfb, 0xe2, 0x7c, 0x2d, 0x81,
0xd6, 0x1f, 0xbe, 0x04, 0xf8, 0xa1, 0x04, 0x40, 0x90, 0x19, 0x95, 0xab, 0xfe, 0xb5, 0xaa, 0xbb,
0x37, 0xa8, 0xea, 0xe0, 0x2b, 0x18, 0xfe, 0xd1, 0x0c, 0x20, 0x8e, 0x73, 0xb5, 0x61, 0x1b, 0xd4,
0x73, 0xdc, 0x46, 0xa2, 0x59, 0x6f, 0x5e, 0x25, 0xd4, 0x73, 0xe4, 0x38, 0x1f, 0xe3, 0x3d, 0x3a,
0xfd, 0xbe, 0x38, 0x71, 0xa6, 0xce, 0x17, 0x75, 0xde, 0x5f, 0x2c, 0x96, 0x4e, 0xd5, 0x39, 0x53,
0xe7, 0x9b, 0x3a, 0x1f, 0x2f, 0x17, 0x27, 0xde, 0xd4, 0xb2, 0x0e, 0x7f, 0x05, 0x00, 0x00, 0xff,
0xff, 0x29, 0x0b, 0xef, 0x6d, 0xe0, 0x06, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -48,17 +48,27 @@ var _ = proto.Marshal ...@@ -48,17 +48,27 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } // This is a compile-time assertion to ensure that this generated file
func (*PodDisruptionBudget) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudget) ProtoMessage() {}
func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetList) ProtoMessage() {}
func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
func (*PodDisruptionBudgetSpec) ProtoMessage() {}
func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) ProtoMessage() {}
func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{3}
}
func init() { func init() {
proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudget") proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudget")
...@@ -955,3 +965,45 @@ var ( ...@@ -955,3 +965,45 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 607 bytes of a gzipped FileDescriptorProto
0x1f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x7a, 0xbc, 0x83, 0xe3,
0x89, 0x37, 0xb7, 0x14, 0xe9, 0x6c, 0x0f, 0xfe, 0x6c, 0x2c, 0x5c, 0x28, 0xfb, 0xa5, 0xec, 0xdb,
0xe5, 0x46, 0x6d, 0xa0, 0xec, 0x42, 0xd9, 0x6f, 0x65, 0xdf, 0xaf, 0x36, 0x16, 0xde, 0xd7, 0x47,
0xf7, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xae, 0xf9, 0xfa, 0xf1, 0x05, 0x00, 0x00,
}
...@@ -52,35 +52,49 @@ var _ = proto.Marshal ...@@ -52,35 +52,49 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *ClusterRole) Reset() { *m = ClusterRole{} } // This is a compile-time assertion to ensure that this generated file
func (*ClusterRole) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (m *ClusterRole) Reset() { *m = ClusterRole{} }
func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRole) ProtoMessage() {}
func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBinding) ProtoMessage() {}
func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleBindingList) ProtoMessage() {}
func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
func (*PolicyRule) ProtoMessage() {} func (*ClusterRoleList) ProtoMessage() {}
func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *Role) Reset() { *m = Role{} } func (m *PolicyRule) Reset() { *m = PolicyRule{} }
func (*Role) ProtoMessage() {} func (*PolicyRule) ProtoMessage() {}
func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (m *Role) Reset() { *m = Role{} }
func (*RoleBinding) ProtoMessage() {} func (*Role) ProtoMessage() {}
func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (m *RoleBinding) Reset() { *m = RoleBinding{} }
func (*RoleBindingList) ProtoMessage() {} func (*RoleBinding) ProtoMessage() {}
func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *RoleList) Reset() { *m = RoleList{} } func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
func (*RoleList) ProtoMessage() {} func (*RoleBindingList) ProtoMessage() {}
func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *Subject) Reset() { *m = Subject{} } func (m *RoleList) Reset() { *m = RoleList{} }
func (*Subject) ProtoMessage() {} func (*RoleList) ProtoMessage() {}
func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
func (m *Subject) Reset() { *m = Subject{} }
func (*Subject) ProtoMessage() {}
func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
func init() { func init() {
proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole") proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole")
...@@ -2326,3 +2340,56 @@ var ( ...@@ -2326,3 +2340,56 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 775 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xc1, 0x4f, 0x13, 0x4f,
0x14, 0x66, 0x69, 0xfb, 0xa3, 0x3b, 0xfc, 0x9a, 0xca, 0x1a, 0x4c, 0xd3, 0x44, 0x20, 0x3d, 0x35,
0x22, 0xb3, 0x29, 0x91, 0xc8, 0x41, 0x0f, 0xac, 0x31, 0x86, 0x88, 0x48, 0x86, 0x48, 0x94, 0xc4,
0x98, 0xed, 0x76, 0x28, 0x6b, 0xdb, 0xdd, 0x66, 0x66, 0x16, 0xf5, 0x46, 0xfc, 0x0b, 0xfc, 0x1b,
0xbc, 0x79, 0xf5, 0x6a, 0xe2, 0xc1, 0x13, 0x07, 0x0f, 0x1c, 0x8d, 0x07, 0xa2, 0xf8, 0x8f, 0xf8,
0x66, 0x76, 0x97, 0xdd, 0xd2, 0x56, 0x2a, 0x89, 0x24, 0x26, 0x1e, 0x26, 0xb0, 0xef, 0x7d, 0xdf,
0xb7, 0xef, 0x7b, 0x3b, 0xfd, 0xd0, 0x72, 0x6b, 0x99, 0x63, 0xd7, 0x37, 0x5b, 0x41, 0x9d, 0x32,
0x8f, 0x0a, 0xca, 0xcd, 0x6e, 0xab, 0x69, 0xda, 0x5d, 0x97, 0x9b, 0xac, 0x6e, 0x3b, 0xe6, 0x5e,
0xcd, 0x6e, 0x77, 0x77, 0xed, 0x9a, 0xd9, 0xa4, 0x1e, 0x65, 0xb6, 0xa0, 0x0d, 0xdc, 0x65, 0xbe,
0xf0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0x75, 0x48, 0x0a, 0x25, 0x55, 0x3d, 0x08, 0x07,
0x75, 0x91, 0x52, 0xaa, 0x32, 0x30, 0x88, 0xea, 0x18, 0x26, 0xd2, 0xe5, 0x5f, 0xde, 0xb5, 0x1d,
0x0a, 0xd9, 0x24, 0x61, 0x53, 0x11, 0x4c, 0x5f, 0x8f, 0x1b, 0x24, 0xc1, 0x58, 0xd7, 0x0e, 0xbe,
0xcf, 0x8c, 0x1d, 0xc2, 0xf9, 0x02, 0x67, 0xff, 0x78, 0x46, 0x3b, 0x80, 0x73, 0x08, 0xe7, 0x1b,
0x9c, 0x37, 0x3f, 0x66, 0xc6, 0xb6, 0xf3, 0xb1, 0xf7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf2,
0x51, 0x62, 0x4c, 0x04, 0x0b, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -45,14 +45,21 @@ var _ = proto.Marshal ...@@ -45,14 +45,21 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *RawExtension) Reset() { *m = RawExtension{} } // This is a compile-time assertion to ensure that this generated file
func (*RawExtension) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (m *RawExtension) Reset() { *m = RawExtension{} }
func (*TypeMeta) ProtoMessage() {} func (*RawExtension) ProtoMessage() {}
func (*RawExtension) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *Unknown) Reset() { *m = Unknown{} } func (m *TypeMeta) Reset() { *m = TypeMeta{} }
func (*Unknown) ProtoMessage() {} func (*TypeMeta) ProtoMessage() {}
func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *Unknown) Reset() { *m = Unknown{} }
func (*Unknown) ProtoMessage() {}
func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func init() { func init() {
proto.RegisterType((*RawExtension)(nil), "k8s.io.kubernetes.pkg.runtime.RawExtension") proto.RegisterType((*RawExtension)(nil), "k8s.io.kubernetes.pkg.runtime.RawExtension")
...@@ -729,3 +736,31 @@ var ( ...@@ -729,3 +736,31 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 380 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0xcf, 0x4e, 0x2a, 0x31,
0x14, 0xc6, 0x19, 0x20, 0x81, 0x5b, 0x48, 0xb8, 0xe9, 0x5d, 0xdc, 0x91, 0x44, 0x20, 0x6c, 0x94,
0x05, 0x6d, 0x24, 0x31, 0x71, 0xcb, 0x10, 0x16, 0xc6, 0x98, 0x98, 0x89, 0xb8, 0x70, 0xe5, 0x30,
0xd4, 0xb1, 0x19, 0x69, 0x27, 0x9d, 0x4e, 0xd0, 0x9d, 0x8f, 0xe0, 0x63, 0xb1, 0x64, 0xe9, 0x8a,
0x28, 0x3e, 0x83, 0x7b, 0x4b, 0x29, 0x7f, 0x04, 0xe2, 0xe2, 0x24, 0x33, 0xe7, 0xfc, 0xbe, 0xef,
0x7c, 0xa7, 0xa0, 0x19, 0x9e, 0xc5, 0x88, 0x72, 0x1c, 0x26, 0x7d, 0x22, 0x18, 0x91, 0x24, 0xc6,
0x51, 0x18, 0x60, 0x91, 0x30, 0x49, 0x87, 0x04, 0x07, 0x84, 0x11, 0xe1, 0x49, 0x32, 0x40, 0x91,
0xe0, 0x92, 0xc3, 0xc3, 0x05, 0x8e, 0xd6, 0x38, 0x52, 0x38, 0x32, 0x78, 0xb9,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0xb0, 0x33, 0x3a, 0xea, 0x7f, 0xe3, 0x57, 0xea, 0xfc, 0x1c, 0xbb,
0xdb, 0x3c, 0x3c, 0x05, 0x05, 0xd3, 0x9a, 0xaf, 0xb6, 0xb3, 0x5a, 0xfe, 0xcf, 0xc8, 0x0b, 0x9d,
0xf5, 0xc8, 0xdd, 0xe4, 0x9c, 0xc6, 0xf8, 0xa3, 0x92, 0x9a, 0xa8, 0x7a, 0x53, 0xf5, 0x32, 0xab,
0x58, 0x63, 0x55, 0x13, 0x55, 0xef, 0xaa, 0x5e, 0x3f, 0x2b, 0xa9, 0xdb, 0x9c, 0x39, 0xf2, 0x3b,
0x00, 0x00, 0xff, 0xff, 0x32, 0xc1, 0x73, 0x2d, 0x94, 0x02, 0x00, 0x00,
}
...@@ -153,7 +153,7 @@ func compact(ctx context.Context, client *clientv3.Client, t, rev int64) (int64, ...@@ -153,7 +153,7 @@ func compact(ctx context.Context, client *clientv3.Client, t, rev int64) (int64,
// We don't compact on bootstrap. // We don't compact on bootstrap.
return curTime, curRev, nil return curTime, curRev, nil
} }
if err = client.Compact(ctx, rev); err != nil { if _, err = client.Compact(ctx, rev); err != nil {
return curTime, curRev, err return curTime, curRev, err
} }
glog.Infof("etcd: compacted rev (%d), endpoints (%v)", rev, client.Endpoints()) glog.Infof("etcd: compacted rev (%d), endpoints (%v)", rev, client.Endpoints())
......
...@@ -36,14 +36,19 @@ func TestCompact(t *testing.T) { ...@@ -36,14 +36,19 @@ func TestCompact(t *testing.T) {
t.Fatalf("Put failed: %v", err) t.Fatalf("Put failed: %v", err)
} }
_, _, err = compact(ctx, client, 0, putResp.Header.Revision) putResp1, err := client.Put(ctx, "/somekey", "data2")
if err != nil {
t.Fatalf("Put failed: %v", err)
}
_, _, err = compact(ctx, client, 0, putResp1.Header.Revision)
if err != nil { if err != nil {
t.Fatalf("compact failed: %v", err) t.Fatalf("compact failed: %v", err)
} }
_, err = client.Get(ctx, "/somekey", clientv3.WithRev(putResp.Header.Revision)) obj, err := client.Get(ctx, "/somekey", clientv3.WithRev(putResp.Header.Revision))
if err != etcdrpc.ErrCompacted { if err != etcdrpc.ErrCompacted {
t.Errorf("Expecting ErrCompacted, but get=%v", err) t.Errorf("Expecting ErrCompacted, but get=%v err=%v", obj, err)
} }
} }
......
...@@ -18,7 +18,7 @@ package etcd3 ...@@ -18,7 +18,7 @@ package etcd3
import ( import (
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/storage/storagepb" "github.com/coreos/etcd/mvcc/mvccpb"
) )
type event struct { type event struct {
...@@ -29,7 +29,7 @@ type event struct { ...@@ -29,7 +29,7 @@ type event struct {
isCreated bool isCreated bool
} }
func parseKV(kv *storagepb.KeyValue) *event { func parseKV(kv *mvccpb.KeyValue) *event {
return &event{ return &event{
key: string(kv.Key), key: string(kv.Key),
value: kv.Value, value: kv.Value,
......
...@@ -40,8 +40,13 @@ var _ = proto.Marshal ...@@ -40,8 +40,13 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *IntOrString) Reset() { *m = IntOrString{} } // This is a compile-time assertion to ensure that this generated file
func (*IntOrString) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *IntOrString) Reset() { *m = IntOrString{} }
func (*IntOrString) ProtoMessage() {}
func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func init() { func init() {
proto.RegisterType((*IntOrString)(nil), "k8s.io.kubernetes.pkg.util.intstr.IntOrString") proto.RegisterType((*IntOrString)(nil), "k8s.io.kubernetes.pkg.util.intstr.IntOrString")
...@@ -345,3 +350,23 @@ var ( ...@@ -345,3 +350,23 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 256 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xcc, 0xb6, 0x28, 0xd6,
0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8,
0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, 0x4f, 0x4f,
0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x84,
0x68, 0xd1, 0x43, 0x68, 0xd1, 0x03, 0x6a, 0xd1, 0x03, 0x69, 0xd1, 0x83, 0x68, 0x91, 0xd2, 0x4d,
0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07,
0xeb, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa2, 0xd2, 0x44, 0x46, 0x2e,
0x6e, 0xcf, 0xbc, 0x12, 0xff, 0xa2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x21, 0x0d, 0x2e, 0x96,
0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x66, 0x27, 0x91, 0x13, 0xf7, 0xe4, 0x19,
0x1e, 0xdd, 0x93, 0x67, 0x09, 0x01, 0x8a, 0xfd, 0x82, 0xd2, 0x41, 0x60, 0x15, 0x42, 0x6a, 0x5c,
0x6c, 0x40, 0x2b, 0xc3, 0x12, 0x73, 0x24, 0x98, 0x80, 0x6a, 0x59, 0x9d, 0xf8, 0xa0, 0x6a, 0xd9,
0x3c, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x90, 0x3a, 0xa0, 0xbb, 0x40, 0xea, 0x98, 0x81, 0xea, 0x38,
0x11, 0xea, 0x82, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x2b, 0x8e, 0x19, 0x0b, 0xe4, 0x19, 0x1a, 0xee,
0x28, 0x30, 0x38, 0x69, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0x01, 0x88, 0x6f, 0x00, 0x71, 0xc3, 0x23,
0x39, 0xc6, 0x13, 0x40, 0x7c, 0x01, 0x88, 0x1f, 0x00, 0xf1, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x6c,
0x10, 0xcf, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0x57, 0xfb, 0xfa, 0x43, 0x01, 0x00, 0x00,
}
...@@ -43,8 +43,13 @@ var _ = proto.Marshal ...@@ -43,8 +43,13 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *Event) Reset() { *m = Event{} } // This is a compile-time assertion to ensure that this generated file
func (*Event) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *Event) Reset() { *m = Event{} }
func (*Event) ProtoMessage() {}
func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func init() { func init() {
proto.RegisterType((*Event)(nil), "k8s.io.kubernetes.pkg.watch.versioned.Event") proto.RegisterType((*Event)(nil), "k8s.io.kubernetes.pkg.watch.versioned.Event")
...@@ -361,3 +366,25 @@ var ( ...@@ -361,3 +366,25 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 273 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xcd, 0xb6, 0x28, 0xd6,
0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8,
0x4e, 0xd7, 0x2f, 0x4f, 0x2c, 0x49, 0xce, 0xd0, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x4b,
0x4d, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f,
0xc9, 0x17, 0x52, 0x85, 0x68, 0xd3, 0x43, 0x68, 0xd3, 0x03, 0x6a, 0xd3, 0x03, 0x6b, 0xd3, 0x83,
0x6b, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
0x4f, 0xcf, 0xd7, 0x07, 0xeb, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xaa,
0x94, 0x2e, 0x76, 0xc7, 0x14, 0x95, 0xe6, 0x95, 0x64, 0xe6, 0xa6, 0xa2, 0x3b, 0x42, 0xca, 0x10,
0xbb, 0xf2, 0xd2, 0x92, 0xcc, 0x1c, 0xfd, 0xcc, 0xbc, 0x92, 0xe2, 0x92, 0x22, 0x74, 0x2d, 0x4a,
0x75, 0x5c, 0xac, 0xae, 0x65, 0xa9, 0x79, 0x25, 0x42, 0x0a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9,
0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x3c, 0x27, 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf,
0x12, 0x02, 0x14, 0x0b, 0x02, 0xcb, 0x08, 0x05, 0x73, 0xb1, 0xe5, 0x27, 0x65, 0xa5, 0x26, 0x97,
0x48, 0x30, 0x01, 0xd5, 0x70, 0x1b, 0x69, 0xeb, 0x61, 0xf7, 0x33, 0xd4, 0x75, 0x7a, 0x41, 0x89,
0xe5, 0xae, 0x15, 0x25, 0xa9, 0x79, 0x20, 0xaf, 0x3b, 0xf1, 0x41, 0x0d, 0x64, 0xf3, 0x07, 0x1b,
0x11, 0x04, 0x35, 0xca, 0x49, 0xfb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1b,
0x1e, 0xc9, 0x31, 0x9e, 0x00, 0xe2, 0x0b, 0x40, 0xfc, 0x00, 0x88, 0x27, 0x3c, 0x96, 0x63, 0x88,
0xe2, 0x84, 0x87, 0x1e, 0x20, 0x00, 0x00, 0xff, 0xff, 0x23, 0x3d, 0x7b, 0x7e, 0x9c, 0x01, 0x00,
0x00,
}
...@@ -55,11 +55,11 @@ fi ...@@ -55,11 +55,11 @@ fi
# Install etcd # Install etcd
hash etcd 2>/dev/null hash etcd 2>/dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
curl -L https://github.com/coreos/etcd/releases/download/v2.2.5/etcd-v2.2.5-linux-amd64.tar.gz -o etcd-v2.2.5-linux-amd64.tar.gz curl -L https://github.com/coreos/etcd/releases/download/v3.0.3/etcd-v3.0.3-linux-amd64.tar.gz -o etcd-v3.0.3-linux-amd64.tar.gz
tar xzvf etcd-v2.2.5-linux-amd64.tar.gz tar xzvf etcd-v3.0.3-linux-amd64.tar.gz
sudo mv etcd-v2.2.5-linux-amd64/etcd* /usr/local/bin/ sudo mv etcd-v3.0.3-linux-amd64/etcd* /usr/local/bin/
sudo chown root:root /usr/local/bin/etcd* sudo chown root:root /usr/local/bin/etcd*
rm -r etcd-v2.2.5-linux-amd64* rm -r etcd-v3.0.3-linux-amd64*
fi fi
# Install nsenter for ubuntu images # Install nsenter for ubuntu images
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
runcmd: runcmd:
- mount /tmp /tmp -o remount,exec,suid - mount /tmp /tmp -o remount,exec,suid
- ETCD_VERSION=v2.2.5 - ETCD_VERSION=v3.0.3
- curl -L https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -o /tmp/etcd.tar.gz - curl -L https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -o /tmp/etcd.tar.gz
- tar xzvf /tmp/etcd.tar.gz -C /tmp - tar xzvf /tmp/etcd.tar.gz -C /tmp
- cp /tmp/etcd-${ETCD_VERSION}-linux-amd64/etcd* /tmp/ - cp /tmp/etcd-${ETCD_VERSION}-linux-amd64/etcd* /tmp/
......
...@@ -20,14 +20,14 @@ EVENT_STORE_IP=$1 ...@@ -20,14 +20,14 @@ EVENT_STORE_IP=$1
EVENT_STORE_URL="http://${EVENT_STORE_IP}:4002" EVENT_STORE_URL="http://${EVENT_STORE_IP}:4002"
NUM_NODES=$2 NUM_NODES=$2
if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
sudo docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd \ sudo docker run --net=host -d gcr.io/google_containers/etcd:3.0.3 /usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2381 \ --listen-peer-urls http://127.0.0.1:2381 \
--advertise-client-urls=http://127.0.0.1:4002 \ --advertise-client-urls=http://127.0.0.1:4002 \
--listen-client-urls=http://0.0.0.0:4002 \ --listen-client-urls=http://0.0.0.0:4002 \
--data-dir=/var/etcd/data --data-dir=/var/etcd/data
fi fi
sudo docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd \ sudo docker run --net=host -d gcr.io/google_containers/etcd:3.0.3 /usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2380 \ --listen-peer-urls http://127.0.0.1:2380 \
--advertise-client-urls=http://127.0.0.1:4001 \ --advertise-client-urls=http://127.0.0.1:4001 \
--listen-client-urls=http://0.0.0.0:4001 \ --listen-client-urls=http://0.0.0.0:4001 \
......
Bolt [![Build Status](https://drone.io/github.com/boltdb/bolt/status.png)](https://drone.io/github.com/boltdb/bolt/latest) [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.0-green.svg) Bolt [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.0-green.svg)
==== ====
Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas]
...@@ -427,6 +427,8 @@ db.View(func(tx *bolt.Tx) error { ...@@ -427,6 +427,8 @@ db.View(func(tx *bolt.Tx) error {
}) })
``` ```
Note that, while RFC3339 is sortable, the Golang implementation of RFC3339Nano does not use a fixed number of digits after the decimal point and is therefore not sortable.
#### ForEach() #### ForEach()
...@@ -437,7 +439,7 @@ all the keys in a bucket: ...@@ -437,7 +439,7 @@ all the keys in a bucket:
db.View(func(tx *bolt.Tx) error { db.View(func(tx *bolt.Tx) error {
// Assume bucket exists and has keys // Assume bucket exists and has keys
b := tx.Bucket([]byte("MyBucket")) b := tx.Bucket([]byte("MyBucket"))
b.ForEach(func(k, v []byte) error { b.ForEach(func(k, v []byte) error {
fmt.Printf("key=%s, value=%s\n", k, v) fmt.Printf("key=%s, value=%s\n", k, v)
return nil return nil
...@@ -617,7 +619,7 @@ Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) ...@@ -617,7 +619,7 @@ Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path)
{ {
NSURL* URL= [NSURL fileURLWithPath: filePathString]; NSURL* URL= [NSURL fileURLWithPath: filePathString];
assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
NSError *error = nil; NSError *error = nil;
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error]; forKey: NSURLIsExcludedFromBackupKey error: &error];
...@@ -835,6 +837,14 @@ Below is a list of public, open source projects that use Bolt: ...@@ -835,6 +837,14 @@ Below is a list of public, open source projects that use Bolt:
backed by boltdb. backed by boltdb.
* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining * [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining
simple tx and key scans. simple tx and key scans.
* [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets.
* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service * [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service
* [Go Report Card](https://goreportcard.com/) - Go code quality report cards as a (free and open source) service.
* [Boltdb Boilerplate](https://github.com/bobintornado/boltdb-boilerplate) - Boilerplate wrapper around bolt aiming to make simple calls one-liners.
* [lru](https://github.com/crowdriff/lru) - Easy to use Bolt-backed Least-Recently-Used (LRU) read-through cache with chainable remote stores.
* [Storm](https://github.com/asdine/storm) - A simple ORM around BoltDB.
* [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB.
* [SimpleBolt](https://github.com/xyproto/simplebolt) - A simple way to use BoltDB. Deals mainly with strings.
* [Algernon](https://github.com/xyproto/algernon) - A HTTP/2 web server with built-in support for Lua. Uses BoltDB as the default database backend.
If you are using Bolt in a project please send a pull request to add it to the list. If you are using Bolt in a project please send a pull request to add it to the list.
version: "{build}"
os: Windows Server 2012 R2
clone_folder: c:\gopath\src\github.com\boltdb\bolt
environment:
GOPATH: c:\gopath
install:
- echo %PATH%
- echo %GOPATH%
- go version
- go env
- go get -v -t ./...
build_script:
- go test -v ./...
// +build ppc
package bolt
// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0x7FFFFFFF // 2GB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0xFFFFFFF
// +build ppc64
package bolt
// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
) )
// flock acquires an advisory lock on a file descriptor. // flock acquires an advisory lock on a file descriptor.
func flock(f *os.File, exclusive bool, timeout time.Duration) error { func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error {
var t time.Time var t time.Time
for { for {
// If we're beyond our timeout then return an error. // If we're beyond our timeout then return an error.
...@@ -27,7 +27,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -27,7 +27,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
} }
// Otherwise attempt to obtain an exclusive lock. // Otherwise attempt to obtain an exclusive lock.
err := syscall.Flock(int(f.Fd()), flag|syscall.LOCK_NB) err := syscall.Flock(int(db.file.Fd()), flag|syscall.LOCK_NB)
if err == nil { if err == nil {
return nil return nil
} else if err != syscall.EWOULDBLOCK { } else if err != syscall.EWOULDBLOCK {
...@@ -40,8 +40,8 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -40,8 +40,8 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
} }
// funlock releases an advisory lock on a file descriptor. // funlock releases an advisory lock on a file descriptor.
func funlock(f *os.File) error { func funlock(db *DB) error {
return syscall.Flock(int(f.Fd()), syscall.LOCK_UN) return syscall.Flock(int(db.file.Fd()), syscall.LOCK_UN)
} }
// mmap memory maps a DB's data file. // mmap memory maps a DB's data file.
......
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
) )
// flock acquires an advisory lock on a file descriptor. // flock acquires an advisory lock on a file descriptor.
func flock(f *os.File, exclusive bool, timeout time.Duration) error { func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error {
var t time.Time var t time.Time
for { for {
// If we're beyond our timeout then return an error. // If we're beyond our timeout then return an error.
...@@ -32,7 +32,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -32,7 +32,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
} else { } else {
lock.Type = syscall.F_RDLCK lock.Type = syscall.F_RDLCK
} }
err := syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &lock) err := syscall.FcntlFlock(db.file.Fd(), syscall.F_SETLK, &lock)
if err == nil { if err == nil {
return nil return nil
} else if err != syscall.EAGAIN { } else if err != syscall.EAGAIN {
...@@ -45,13 +45,13 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -45,13 +45,13 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
} }
// funlock releases an advisory lock on a file descriptor. // funlock releases an advisory lock on a file descriptor.
func funlock(f *os.File) error { func funlock(db *DB) error {
var lock syscall.Flock_t var lock syscall.Flock_t
lock.Start = 0 lock.Start = 0
lock.Len = 0 lock.Len = 0
lock.Type = syscall.F_UNLCK lock.Type = syscall.F_UNLCK
lock.Whence = 0 lock.Whence = 0
return syscall.FcntlFlock(uintptr(f.Fd()), syscall.F_SETLK, &lock) return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock)
} }
// mmap memory maps a DB's data file. // mmap memory maps a DB's data file.
......
...@@ -16,6 +16,8 @@ var ( ...@@ -16,6 +16,8 @@ var (
) )
const ( const (
lockExt = ".lock"
// see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx // see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx
flagLockExclusive = 2 flagLockExclusive = 2
flagLockFailImmediately = 1 flagLockFailImmediately = 1
...@@ -46,7 +48,16 @@ func fdatasync(db *DB) error { ...@@ -46,7 +48,16 @@ func fdatasync(db *DB) error {
} }
// flock acquires an advisory lock on a file descriptor. // flock acquires an advisory lock on a file descriptor.
func flock(f *os.File, exclusive bool, timeout time.Duration) error { func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error {
// Create a separate lock file on windows because a process
// cannot share an exclusive lock on the same file. This is
// needed during Tx.WriteTo().
f, err := os.OpenFile(db.path+lockExt, os.O_CREATE, mode)
if err != nil {
return err
}
db.lockfile = f
var t time.Time var t time.Time
for { for {
// If we're beyond our timeout then return an error. // If we're beyond our timeout then return an error.
...@@ -62,7 +73,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -62,7 +73,7 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
flag |= flagLockExclusive flag |= flagLockExclusive
} }
err := lockFileEx(syscall.Handle(f.Fd()), flag, 0, 1, 0, &syscall.Overlapped{}) err := lockFileEx(syscall.Handle(db.lockfile.Fd()), flag, 0, 1, 0, &syscall.Overlapped{})
if err == nil { if err == nil {
return nil return nil
} else if err != errLockViolation { } else if err != errLockViolation {
...@@ -75,8 +86,11 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error { ...@@ -75,8 +86,11 @@ func flock(f *os.File, exclusive bool, timeout time.Duration) error {
} }
// funlock releases an advisory lock on a file descriptor. // funlock releases an advisory lock on a file descriptor.
func funlock(f *os.File) error { func funlock(db *DB) error {
return unlockFileEx(syscall.Handle(f.Fd()), 0, 1, 0, &syscall.Overlapped{}) err := unlockFileEx(syscall.Handle(db.lockfile.Fd()), 0, 1, 0, &syscall.Overlapped{})
db.lockfile.Close()
os.Remove(db.path+lockExt)
return err
} }
// mmap memory maps a DB's data file. // mmap memory maps a DB's data file.
......
...@@ -36,6 +36,9 @@ const ( ...@@ -36,6 +36,9 @@ const (
DefaultAllocSize = 16 * 1024 * 1024 DefaultAllocSize = 16 * 1024 * 1024
) )
// default page size for db is set to the OS page size.
var defaultPageSize = os.Getpagesize()
// DB represents a collection of buckets persisted to a file on disk. // DB represents a collection of buckets persisted to a file on disk.
// All data access is performed through transactions which can be obtained through the DB. // All data access is performed through transactions which can be obtained through the DB.
// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called. // All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called.
...@@ -93,7 +96,8 @@ type DB struct { ...@@ -93,7 +96,8 @@ type DB struct {
path string path string
file *os.File file *os.File
dataref []byte // mmap'ed readonly, write throws SEGV lockfile *os.File // windows only
dataref []byte // mmap'ed readonly, write throws SEGV
data *[maxMapSize]byte data *[maxMapSize]byte
datasz int datasz int
filesz int // current on disk file size filesz int // current on disk file size
...@@ -106,6 +110,8 @@ type DB struct { ...@@ -106,6 +110,8 @@ type DB struct {
freelist *freelist freelist *freelist
stats Stats stats Stats
pagePool sync.Pool
batchMu sync.Mutex batchMu sync.Mutex
batch *batch batch *batch
...@@ -177,7 +183,7 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { ...@@ -177,7 +183,7 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) {
// if !options.ReadOnly. // if !options.ReadOnly.
// The database file is locked using the shared lock (more than one process may // The database file is locked using the shared lock (more than one process may
// hold a lock at the same time) otherwise (options.ReadOnly is set). // hold a lock at the same time) otherwise (options.ReadOnly is set).
if err := flock(db.file, !db.readOnly, options.Timeout); err != nil { if err := flock(db, mode, !db.readOnly, options.Timeout); err != nil {
_ = db.close() _ = db.close()
return nil, err return nil, err
} }
...@@ -199,12 +205,27 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { ...@@ -199,12 +205,27 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) {
if _, err := db.file.ReadAt(buf[:], 0); err == nil { if _, err := db.file.ReadAt(buf[:], 0); err == nil {
m := db.pageInBuffer(buf[:], 0).meta() m := db.pageInBuffer(buf[:], 0).meta()
if err := m.validate(); err != nil { if err := m.validate(); err != nil {
return nil, err // If we can't read the page size, we can assume it's the same
// as the OS -- since that's how the page size was chosen in the
// first place.
//
// If the first page is invalid and this OS uses a different
// page size than what the database was created with then we
// are out of luck and cannot access the database.
db.pageSize = os.Getpagesize()
} else {
db.pageSize = int(m.pageSize)
} }
db.pageSize = int(m.pageSize)
} }
} }
// Initialize page pool.
db.pagePool = sync.Pool{
New: func() interface{} {
return make([]byte, db.pageSize)
},
}
// Memory map the data file. // Memory map the data file.
if err := db.mmap(options.InitialMmapSize); err != nil { if err := db.mmap(options.InitialMmapSize); err != nil {
_ = db.close() _ = db.close()
...@@ -261,12 +282,13 @@ func (db *DB) mmap(minsz int) error { ...@@ -261,12 +282,13 @@ func (db *DB) mmap(minsz int) error {
db.meta0 = db.page(0).meta() db.meta0 = db.page(0).meta()
db.meta1 = db.page(1).meta() db.meta1 = db.page(1).meta()
// Validate the meta pages. // Validate the meta pages. We only return an error if both meta pages fail
if err := db.meta0.validate(); err != nil { // validation, since meta0 failing validation means that it wasn't saved
return err // properly -- but we can recover using meta1. And vice-versa.
} err0 := db.meta0.validate()
if err := db.meta1.validate(); err != nil { err1 := db.meta1.validate()
return err if err0 != nil && err1 != nil {
return err0
} }
return nil return nil
...@@ -338,6 +360,7 @@ func (db *DB) init() error { ...@@ -338,6 +360,7 @@ func (db *DB) init() error {
m.root = bucket{root: 3} m.root = bucket{root: 3}
m.pgid = 4 m.pgid = 4
m.txid = txid(i) m.txid = txid(i)
m.checksum = m.sum64()
} }
// Write an empty freelist at page 3. // Write an empty freelist at page 3.
...@@ -379,10 +402,13 @@ func (db *DB) Close() error { ...@@ -379,10 +402,13 @@ func (db *DB) Close() error {
} }
func (db *DB) close() error { func (db *DB) close() error {
if !db.opened {
return nil
}
db.opened = false db.opened = false
db.freelist = nil db.freelist = nil
db.path = ""
// Clear ops. // Clear ops.
db.ops.writeAt = nil db.ops.writeAt = nil
...@@ -397,7 +423,7 @@ func (db *DB) close() error { ...@@ -397,7 +423,7 @@ func (db *DB) close() error {
// No need to unlock read-only file. // No need to unlock read-only file.
if !db.readOnly { if !db.readOnly {
// Unlock the file. // Unlock the file.
if err := funlock(db.file); err != nil { if err := funlock(db); err != nil {
log.Printf("bolt.Close(): funlock error: %s", err) log.Printf("bolt.Close(): funlock error: %s", err)
} }
} }
...@@ -409,6 +435,7 @@ func (db *DB) close() error { ...@@ -409,6 +435,7 @@ func (db *DB) close() error {
db.file = nil db.file = nil
} }
db.path = ""
return nil return nil
} }
...@@ -773,16 +800,37 @@ func (db *DB) pageInBuffer(b []byte, id pgid) *page { ...@@ -773,16 +800,37 @@ func (db *DB) pageInBuffer(b []byte, id pgid) *page {
// meta retrieves the current meta page reference. // meta retrieves the current meta page reference.
func (db *DB) meta() *meta { func (db *DB) meta() *meta {
if db.meta0.txid > db.meta1.txid { // We have to return the meta with the highest txid which doesn't fail
return db.meta0 // validation. Otherwise, we can cause errors when in fact the database is
// in a consistent state. metaA is the one with the higher txid.
metaA := db.meta0
metaB := db.meta1
if db.meta1.txid > db.meta0.txid {
metaA = db.meta1
metaB = db.meta0
} }
return db.meta1
// Use higher meta page if valid. Otherwise fallback to previous, if valid.
if err := metaA.validate(); err == nil {
return metaA
} else if err := metaB.validate(); err == nil {
return metaB
}
// This should never be reached, because both meta1 and meta0 were validated
// on mmap() and we do fsync() on every write.
panic("bolt.DB.meta(): invalid meta pages")
} }
// allocate returns a contiguous block of memory starting at a given page. // allocate returns a contiguous block of memory starting at a given page.
func (db *DB) allocate(count int) (*page, error) { func (db *DB) allocate(count int) (*page, error) {
// Allocate a temporary buffer for the page. // Allocate a temporary buffer for the page.
buf := make([]byte, count*db.pageSize) var buf []byte
if count == 1 {
buf = db.pagePool.Get().([]byte)
} else {
buf = make([]byte, count*db.pageSize)
}
p := (*page)(unsafe.Pointer(&buf[0])) p := (*page)(unsafe.Pointer(&buf[0]))
p.overflow = uint32(count - 1) p.overflow = uint32(count - 1)
...@@ -824,8 +872,10 @@ func (db *DB) grow(sz int) error { ...@@ -824,8 +872,10 @@ func (db *DB) grow(sz int) error {
// Truncate and fsync to ensure file size metadata is flushed. // Truncate and fsync to ensure file size metadata is flushed.
// https://github.com/boltdb/bolt/issues/284 // https://github.com/boltdb/bolt/issues/284
if !db.NoGrowSync && !db.readOnly { if !db.NoGrowSync && !db.readOnly {
if err := db.file.Truncate(int64(sz)); err != nil { if runtime.GOOS != "windows" {
return fmt.Errorf("file resize error: %s", err) if err := db.file.Truncate(int64(sz)); err != nil {
return fmt.Errorf("file resize error: %s", err)
}
} }
if err := db.file.Sync(); err != nil { if err := db.file.Sync(); err != nil {
return fmt.Errorf("file sync error: %s", err) return fmt.Errorf("file sync error: %s", err)
...@@ -930,12 +980,12 @@ type meta struct { ...@@ -930,12 +980,12 @@ type meta struct {
// validate checks the marker bytes and version of the meta page to ensure it matches this binary. // validate checks the marker bytes and version of the meta page to ensure it matches this binary.
func (m *meta) validate() error { func (m *meta) validate() error {
if m.checksum != 0 && m.checksum != m.sum64() { if m.magic != magic {
return ErrChecksum
} else if m.magic != magic {
return ErrInvalid return ErrInvalid
} else if m.version != version { } else if m.version != version {
return ErrVersionMismatch return ErrVersionMismatch
} else if m.checksum != 0 && m.checksum != m.sum64() {
return ErrChecksum
} }
return nil return nil
} }
......
...@@ -12,7 +12,8 @@ var ( ...@@ -12,7 +12,8 @@ var (
// already open. // already open.
ErrDatabaseOpen = errors.New("database already open") ErrDatabaseOpen = errors.New("database already open")
// ErrInvalid is returned when a data file is not a Bolt-formatted database. // ErrInvalid is returned when both meta pages on a database are invalid.
// This typically occurs when a file is not a bolt database.
ErrInvalid = errors.New("invalid database") ErrInvalid = errors.New("invalid database")
// ErrVersionMismatch is returned when the data file was created with a // ErrVersionMismatch is returned when the data file was created with a
......
...@@ -463,43 +463,6 @@ func (n *node) rebalance() { ...@@ -463,43 +463,6 @@ func (n *node) rebalance() {
target = n.prevSibling() target = n.prevSibling()
} }
// If target node has extra nodes then just move one over.
if target.numChildren() > target.minKeys() {
if useNextSibling {
// Reparent and move node.
if child, ok := n.bucket.nodes[target.inodes[0].pgid]; ok {
child.parent.removeChild(child)
child.parent = n
child.parent.children = append(child.parent.children, child)
}
n.inodes = append(n.inodes, target.inodes[0])
target.inodes = target.inodes[1:]
// Update target key on parent.
target.parent.put(target.key, target.inodes[0].key, nil, target.pgid, 0)
target.key = target.inodes[0].key
_assert(len(target.key) > 0, "rebalance(1): zero-length node key")
} else {
// Reparent and move node.
if child, ok := n.bucket.nodes[target.inodes[len(target.inodes)-1].pgid]; ok {
child.parent.removeChild(child)
child.parent = n
child.parent.children = append(child.parent.children, child)
}
n.inodes = append(n.inodes, inode{})
copy(n.inodes[1:], n.inodes)
n.inodes[0] = target.inodes[len(target.inodes)-1]
target.inodes = target.inodes[:len(target.inodes)-1]
}
// Update parent key for node.
n.parent.put(n.key, n.inodes[0].key, nil, n.pgid, 0)
n.key = n.inodes[0].key
_assert(len(n.key) > 0, "rebalance(2): zero-length node key")
return
}
// If both this node and the target node are too small then merge them. // If both this node and the target node are too small then merge them.
if useNextSibling { if useNextSibling {
// Reparent all child nodes being moved. // Reparent all child nodes being moved.
......
...@@ -111,13 +111,13 @@ type leafPageElement struct { ...@@ -111,13 +111,13 @@ type leafPageElement struct {
// key returns a byte slice of the node key. // key returns a byte slice of the node key.
func (n *leafPageElement) key() []byte { func (n *leafPageElement) key() []byte {
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize] return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize:n.ksize]
} }
// value returns a byte slice of the node value. // value returns a byte slice of the node value.
func (n *leafPageElement) value() []byte { func (n *leafPageElement) value() []byte {
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos+n.ksize]))[:n.vsize] return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos+n.ksize]))[:n.vsize:n.vsize]
} }
// PageInfo represents human readable information about a page. // PageInfo represents human readable information about a page.
......
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"io" "io"
"os" "os"
"sort" "sort"
"strings"
"time" "time"
"unsafe" "unsafe"
) )
...@@ -202,8 +203,17 @@ func (tx *Tx) Commit() error { ...@@ -202,8 +203,17 @@ func (tx *Tx) Commit() error {
// If strict mode is enabled then perform a consistency check. // If strict mode is enabled then perform a consistency check.
// Only the first consistency error is reported in the panic. // Only the first consistency error is reported in the panic.
if tx.db.StrictMode { if tx.db.StrictMode {
if err, ok := <-tx.Check(); ok { ch := tx.Check()
panic("check fail: " + err.Error()) var errs []string
for {
err, ok := <-ch
if !ok {
break
}
errs = append(errs, err.Error())
}
if len(errs) > 0 {
panic("check fail: " + strings.Join(errs, "\n"))
} }
} }
...@@ -297,12 +307,34 @@ func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { ...@@ -297,12 +307,34 @@ func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) {
} }
defer func() { _ = f.Close() }() defer func() { _ = f.Close() }()
// Copy the meta pages. // Generate a meta page. We use the same page data for both meta pages.
tx.db.metalock.Lock() buf := make([]byte, tx.db.pageSize)
n, err = io.CopyN(w, f, int64(tx.db.pageSize*2)) page := (*page)(unsafe.Pointer(&buf[0]))
tx.db.metalock.Unlock() page.flags = metaPageFlag
*page.meta() = *tx.meta
// Write meta 0.
page.id = 0
page.meta().checksum = page.meta().sum64()
nn, err := w.Write(buf)
n += int64(nn)
if err != nil { if err != nil {
return n, fmt.Errorf("meta copy: %s", err) return n, fmt.Errorf("meta 0 copy: %s", err)
}
// Write meta 1 with a lower transaction id.
page.id = 1
page.meta().txid -= 1
page.meta().checksum = page.meta().sum64()
nn, err = w.Write(buf)
n += int64(nn)
if err != nil {
return n, fmt.Errorf("meta 1 copy: %s", err)
}
// Move past the meta pages in the file.
if _, err := f.Seek(int64(tx.db.pageSize*2), os.SEEK_SET); err != nil {
return n, fmt.Errorf("seek: %s", err)
} }
// Copy data pages. // Copy data pages.
...@@ -441,6 +473,8 @@ func (tx *Tx) write() error { ...@@ -441,6 +473,8 @@ func (tx *Tx) write() error {
for _, p := range tx.pages { for _, p := range tx.pages {
pages = append(pages, p) pages = append(pages, p)
} }
// Clear out page cache early.
tx.pages = make(map[pgid]*page)
sort.Sort(pages) sort.Sort(pages)
// Write pages to disk in order. // Write pages to disk in order.
...@@ -485,8 +519,22 @@ func (tx *Tx) write() error { ...@@ -485,8 +519,22 @@ func (tx *Tx) write() error {
} }
} }
// Clear out page cache. // Put small pages back to page pool.
tx.pages = make(map[pgid]*page) for _, p := range pages {
// Ignore page sizes over 1 page.
// These are allocated using make() instead of the page pool.
if int(p.overflow) != 0 {
continue
}
buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:tx.db.pageSize]
// See https://go.googlesource.com/go/+/f03c9202c43e0abb130669852082117ca50aa9b1
for i := range buf {
buf[i] = 0
}
tx.db.pagePool.Put(buf)
}
return nil return nil
} }
......
// Copyright 2016 CoreOS, Inc. // Copyright 2016 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -19,8 +19,8 @@ import ( ...@@ -19,8 +19,8 @@ import (
"sync" "sync"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/backend"
"github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/storage/backend"
"github.com/coreos/pkg/capnslog" "github.com/coreos/pkg/capnslog"
) )
......
...@@ -13,10 +13,25 @@ option (gogoproto.goproto_enum_prefix_all) = false; ...@@ -13,10 +13,25 @@ option (gogoproto.goproto_enum_prefix_all) = false;
message User { message User {
bytes name = 1; bytes name = 1;
bytes password = 2; bytes password = 2;
int64 tombstone = 3; repeated string roles = 3;
}
// Permission is a single entity
message Permission {
enum Type {
READ = 0;
WRITE = 1;
READWRITE = 2;
}
Type permType = 1;
bytes key = 2;
bytes range_end = 3;
} }
// Role is a single entry in the bucket authRoles // Role is a single entry in the bucket authRoles
message Role { message Role {
bytes name = 2; bytes name = 1;
repeated Permission keyPermission = 2;
} }
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package auth provides client role authentication for accessing keys in etcd.
package auth
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package auth
import (
"bytes"
"sort"
"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/mvcc/backend"
)
// isSubset returns true if a is a subset of b
func isSubset(a, b *rangePerm) bool {
switch {
case len(a.end) == 0 && len(b.end) == 0:
// a, b are both keys
return bytes.Equal(a.begin, b.begin)
case len(b.end) == 0:
// b is a key, a is a range
return false
case len(a.end) == 0:
return 0 <= bytes.Compare(a.begin, b.begin) && bytes.Compare(a.begin, b.end) <= 0
default:
return 0 <= bytes.Compare(a.begin, b.begin) && bytes.Compare(a.end, b.end) <= 0
}
}
func isRangeEqual(a, b *rangePerm) bool {
return bytes.Equal(a.begin, b.begin) && bytes.Equal(a.end, b.end)
}
// removeSubsetRangePerms removes any rangePerms that are subsets of other rangePerms.
// If there are equal ranges, removeSubsetRangePerms only keeps one of them.
func removeSubsetRangePerms(perms []*rangePerm) []*rangePerm {
// TODO(mitake): currently it is O(n^2), we need a better algorithm
newp := make([]*rangePerm, 0)
for i := range perms {
skip := false
for j := range perms {
if i == j {
continue
}
if isRangeEqual(perms[i], perms[j]) {
// if ranges are equal, we only keep the first range.
if i > j {
skip = true
break
}
} else if isSubset(perms[i], perms[j]) {
// if a range is a strict subset of the other one, we skip the subset.
skip = true
break
}
}
if skip {
continue
}
newp = append(newp, perms[i])
}
return newp
}
// mergeRangePerms merges adjacent rangePerms.
func mergeRangePerms(perms []*rangePerm) []*rangePerm {
merged := make([]*rangePerm, 0)
perms = removeSubsetRangePerms(perms)
sort.Sort(RangePermSliceByBegin(perms))
i := 0
for i < len(perms) {
begin, next := i, i
for next+1 < len(perms) && bytes.Compare(perms[next].end, perms[next+1].begin) != -1 {
next++
}
merged = append(merged, &rangePerm{begin: perms[begin].begin, end: perms[next].end})
i = next + 1
}
return merged
}
func getMergedPerms(tx backend.BatchTx, userName string) *unifiedRangePermissions {
user := getUser(tx, userName)
if user == nil {
plog.Errorf("invalid user name %s", userName)
return nil
}
var readPerms, writePerms []*rangePerm
for _, roleName := range user.Roles {
role := getRole(tx, roleName)
if role == nil {
continue
}
for _, perm := range role.KeyPermission {
rp := &rangePerm{begin: perm.Key, end: perm.RangeEnd}
switch perm.PermType {
case authpb.READWRITE:
readPerms = append(readPerms, rp)
writePerms = append(writePerms, rp)
case authpb.READ:
readPerms = append(readPerms, rp)
case authpb.WRITE:
writePerms = append(writePerms, rp)
}
}
}
return &unifiedRangePermissions{
readPerms: mergeRangePerms(readPerms),
writePerms: mergeRangePerms(writePerms),
}
}
func checkKeyPerm(cachedPerms *unifiedRangePermissions, key, rangeEnd []byte, permtyp authpb.Permission_Type) bool {
var tocheck []*rangePerm
switch permtyp {
case authpb.READ:
tocheck = cachedPerms.readPerms
case authpb.WRITE:
tocheck = cachedPerms.writePerms
default:
plog.Panicf("unknown auth type: %v", permtyp)
}
requiredPerm := &rangePerm{begin: key, end: rangeEnd}
for _, perm := range tocheck {
if isSubset(requiredPerm, perm) {
return true
}
}
return false
}
func (as *authStore) isRangeOpPermitted(tx backend.BatchTx, userName string, key, rangeEnd []byte, permtyp authpb.Permission_Type) bool {
// assumption: tx is Lock()ed
_, ok := as.rangePermCache[userName]
if !ok {
perms := getMergedPerms(tx, userName)
if perms == nil {
plog.Errorf("failed to create a unified permission of user %s", userName)
return false
}
as.rangePermCache[userName] = perms
}
return checkKeyPerm(as.rangePermCache[userName], key, rangeEnd, permtyp)
}
func (as *authStore) clearCachedPerm() {
as.rangePermCache = make(map[string]*unifiedRangePermissions)
}
func (as *authStore) invalidateCachedPerm(userName string) {
delete(as.rangePermCache, userName)
}
type unifiedRangePermissions struct {
// readPerms[i] and readPerms[j] (i != j) don't overlap
readPerms []*rangePerm
// writePerms[i] and writePerms[j] (i != j) don't overlap, too
writePerms []*rangePerm
}
type rangePerm struct {
begin, end []byte
}
type RangePermSliceByBegin []*rangePerm
func (slice RangePermSliceByBegin) Len() int {
return len(slice)
}
func (slice RangePermSliceByBegin) Less(i, j int) bool {
switch bytes.Compare(slice[i].begin, slice[j].begin) {
case 0: // begin(i) == begin(j)
return bytes.Compare(slice[i].end, slice[j].end) == -1
case -1: // begin(i) < begin(j)
return true
default:
return false
}
}
func (slice RangePermSliceByBegin) Swap(i, j int) {
slice[i], slice[j] = slice[j], slice[i]
}
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package auth
// CAUTION: This randum number based token mechanism is only for testing purpose.
// JWT based mechanism will be added in the near future.
import (
"crypto/rand"
"math/big"
)
const (
letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
defaultSimpleTokenLength = 16
)
func (as *authStore) GenSimpleToken() (string, error) {
ret := make([]byte, defaultSimpleTokenLength)
for i := 0; i < defaultSimpleTokenLength; i++ {
bInt, err := rand.Int(rand.Reader, big.NewInt(int64(len(letters))))
if err != nil {
return "", err
}
ret[i] = letters[bInt.Int64()]
}
return string(ret), nil
}
func (as *authStore) assignSimpleTokenToUser(username, token string) {
as.simpleTokensMu.Lock()
_, ok := as.simpleTokens[token]
if ok {
plog.Panicf("token %s is alredy used", token)
}
as.simpleTokens[token] = username
as.simpleTokensMu.Unlock()
}
...@@ -4,9 +4,11 @@ etcd/client is the Go client library for etcd. ...@@ -4,9 +4,11 @@ etcd/client is the Go client library for etcd.
[![GoDoc](https://godoc.org/github.com/coreos/etcd/client?status.png)](https://godoc.org/github.com/coreos/etcd/client) [![GoDoc](https://godoc.org/github.com/coreos/etcd/client?status.png)](https://godoc.org/github.com/coreos/etcd/client)
etcd uses go's `vendor` directory to manage external dependencies. If `client` is imported etcd uses `cmd/vendor` directory to store external dependencies, which are
outside of etcd, simply copy `client` to the `vendor` directory or use tools like godep to to be compiled into etcd release binaries. `client` can be imported without
manage your own dependency, as in [vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories). vendoring. For full compatibility, it is recommended to vendor builds using
etcd's vendored packages, using tools like godep, as in
[vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories).
For more detail, please read [Go vendor design](https://golang.org/s/go15vendor). For more detail, please read [Go vendor design](https://golang.org/s/go15vendor).
## Install ## Install
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -36,6 +36,12 @@ type User struct { ...@@ -36,6 +36,12 @@ type User struct {
Revoke []string `json:"revoke,omitempty"` Revoke []string `json:"revoke,omitempty"`
} }
// userListEntry is the user representation given by the server for ListUsers
type userListEntry struct {
User string `json:"user"`
Roles []Role `json:"roles"`
}
type UserRoles struct { type UserRoles struct {
User string `json:"user"` User string `json:"user"`
Roles []Role `json:"roles"` Roles []Role `json:"roles"`
...@@ -194,7 +200,7 @@ func (u *httpAuthUserAPI) ListUsers(ctx context.Context) ([]string, error) { ...@@ -194,7 +200,7 @@ func (u *httpAuthUserAPI) ListUsers(ctx context.Context) ([]string, error) {
} }
var userList struct { var userList struct {
Users []User `json:"users"` Users []userListEntry `json:"users"`
} }
if err = json.Unmarshal(body, &userList); err != nil { if err = json.Unmarshal(body, &userList); err != nil {
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -37,6 +37,10 @@ var ( ...@@ -37,6 +37,10 @@ var (
ErrClusterUnavailable = errors.New("client: etcd cluster is unavailable or misconfigured") ErrClusterUnavailable = errors.New("client: etcd cluster is unavailable or misconfigured")
ErrNoLeaderEndpoint = errors.New("client: no leader endpoint available") ErrNoLeaderEndpoint = errors.New("client: no leader endpoint available")
errTooManyRedirectChecks = errors.New("client: too many redirect checks") errTooManyRedirectChecks = errors.New("client: too many redirect checks")
// oneShotCtxValue is set on a context using WithValue(&oneShotValue) so
// that Do() will not retry a request
oneShotCtxValue interface{}
) )
var DefaultRequestTimeout = 5 * time.Second var DefaultRequestTimeout = 5 * time.Second
...@@ -335,6 +339,7 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo ...@@ -335,6 +339,7 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo
var body []byte var body []byte
var err error var err error
cerr := &ClusterError{} cerr := &ClusterError{}
isOneShot := ctx.Value(&oneShotCtxValue) != nil
for i := pinned; i < leps+pinned; i++ { for i := pinned; i < leps+pinned; i++ {
k := i % leps k := i % leps
...@@ -348,6 +353,9 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo ...@@ -348,6 +353,9 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo
if err == context.Canceled || err == context.DeadlineExceeded { if err == context.Canceled || err == context.DeadlineExceeded {
return nil, nil, err return nil, nil, err
} }
if isOneShot {
return nil, nil, err
}
continue continue
} }
if resp.StatusCode/100 == 5 { if resp.StatusCode/100 == 5 {
...@@ -358,6 +366,9 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo ...@@ -358,6 +366,9 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo
default: default:
cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode))) cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode)))
} }
if isOneShot {
return nil, nil, cerr.Errors[0]
}
continue continue
} }
if k != pinned { if k != pinned {
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -337,7 +337,11 @@ func (k *httpKeysAPI) Set(ctx context.Context, key, val string, opts *SetOptions ...@@ -337,7 +337,11 @@ func (k *httpKeysAPI) Set(ctx context.Context, key, val string, opts *SetOptions
act.Dir = opts.Dir act.Dir = opts.Dir
} }
resp, body, err := k.client.Do(ctx, act) doCtx := ctx
if act.PrevExist == PrevNoExist {
doCtx = context.WithValue(doCtx, &oneShotCtxValue, &oneShotCtxValue)
}
resp, body, err := k.client.Do(doCtx, act)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -385,7 +389,8 @@ func (k *httpKeysAPI) Delete(ctx context.Context, key string, opts *DeleteOption ...@@ -385,7 +389,8 @@ func (k *httpKeysAPI) Delete(ctx context.Context, key string, opts *DeleteOption
act.Recursive = opts.Recursive act.Recursive = opts.Recursive
} }
resp, body, err := k.client.Do(ctx, act) doCtx := context.WithValue(ctx, &oneShotCtxValue, &oneShotCtxValue)
resp, body, err := k.client.Do(doCtx, act)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2015 CoreOS, Inc. // Copyright 2015 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
// Copyright 2016 CoreOS, Inc. // Copyright 2016 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
......
...@@ -40,9 +40,11 @@ if err != nil { ...@@ -40,9 +40,11 @@ if err != nil {
// use the response // use the response
``` ```
etcd uses go's `vendor` directory to manage external dependencies. If `clientv3` is imported etcd uses `cmd/vendor` directory to store external dependencies, which are
outside of etcd, simply copy `clientv3` to the `vendor` directory or use tools like godep to to be compiled into etcd release binaries. `client` can be imported without
manage your own dependency, as in [vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories). vendoring. For full compatibility, it is recommended to vendor builds using
etcd's vendored packages, using tools like godep, as in
[vendor directories](https://golang.org/cmd/go/#hdr-Vendor_Directories).
For more detail, please read [Go vendor design](https://golang.org/s/go15vendor). For more detail, please read [Go vendor design](https://golang.org/s/go15vendor).
## Error Handling ## Error Handling
...@@ -50,21 +52,22 @@ For more detail, please read [Go vendor design](https://golang.org/s/go15vendor) ...@@ -50,21 +52,22 @@ For more detail, please read [Go vendor design](https://golang.org/s/go15vendor)
etcd client returns 2 types of errors: etcd client returns 2 types of errors:
1. context error: canceled or deadline exceeded. 1. context error: canceled or deadline exceeded.
2. gRPC error: see [v3rpc/error](https://github.com/coreos/etcd/blob/master/etcdserver/api/v3rpc/error.go). 2. gRPC error: see [api/v3rpc/rpctypes](https://godoc.org/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes).
Here is the example code to handle client errors: Here is the example code to handle client errors:
```go ```go
resp, err := kvc.Put(ctx, "", "") resp, err := kvc.Put(ctx, "", "")
if err != nil { if err != nil {
if err == context.Canceled { switch err {
// ctx is canceled by another routine case context.Canceled:
} else if err == context.DeadlineExceeded { log.Fatalf("ctx is canceled by another routine: %v", err)
// ctx is attached with a deadline and it exceeded case context.DeadlineExceeded:
} else if verr, ok := err.(*v3rpc.ErrEmptyKey); ok { log.Fatalf("ctx is attached with a deadline is exceeded: %v", err)
// process (verr.Errors) case rpctypes.ErrEmptyKey:
} else { log.Fatalf("client-side error: %v", err)
// bad cluster endpoints, which are not etcd servers default:
log.Fatalf("bad cluster endpoints, which are not etcd servers: %v", err)
} }
} }
``` ```
......
// Copyright 2016 Nippon Telegraph and Telephone Corporation. // Copyright 2016 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -15,23 +15,49 @@ ...@@ -15,23 +15,49 @@
package clientv3 package clientv3
import ( import (
"fmt"
"strings"
"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
) )
type ( type (
AuthEnableResponse pb.AuthEnableResponse AuthEnableResponse pb.AuthEnableResponse
AuthUserAddResponse pb.AuthUserAddResponse AuthDisableResponse pb.AuthDisableResponse
AuthUserDeleteResponse pb.AuthUserDeleteResponse AuthenticateResponse pb.AuthenticateResponse
AuthUserChangePasswordResponse pb.AuthUserChangePasswordResponse AuthUserAddResponse pb.AuthUserAddResponse
AuthRoleAddResponse pb.AuthRoleAddResponse AuthUserDeleteResponse pb.AuthUserDeleteResponse
AuthUserChangePasswordResponse pb.AuthUserChangePasswordResponse
AuthUserGrantRoleResponse pb.AuthUserGrantRoleResponse
AuthUserGetResponse pb.AuthUserGetResponse
AuthUserRevokeRoleResponse pb.AuthUserRevokeRoleResponse
AuthRoleAddResponse pb.AuthRoleAddResponse
AuthRoleGrantPermissionResponse pb.AuthRoleGrantPermissionResponse
AuthRoleGetResponse pb.AuthRoleGetResponse
AuthRoleRevokePermissionResponse pb.AuthRoleRevokePermissionResponse
AuthRoleDeleteResponse pb.AuthRoleDeleteResponse
AuthUserListResponse pb.AuthUserListResponse
AuthRoleListResponse pb.AuthRoleListResponse
PermissionType authpb.Permission_Type
)
const (
PermRead = authpb.READ
PermWrite = authpb.WRITE
PermReadWrite = authpb.READWRITE
) )
type Auth interface { type Auth interface {
// AuthEnable enables auth of an etcd cluster. // AuthEnable enables auth of an etcd cluster.
AuthEnable(ctx context.Context) (*AuthEnableResponse, error) AuthEnable(ctx context.Context) (*AuthEnableResponse, error)
// AuthDisable disables auth of an etcd cluster.
AuthDisable(ctx context.Context) (*AuthDisableResponse, error)
// UserAdd adds a new user to an etcd cluster. // UserAdd adds a new user to an etcd cluster.
UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error)
...@@ -41,8 +67,35 @@ type Auth interface { ...@@ -41,8 +67,35 @@ type Auth interface {
// UserChangePassword changes a password of a user. // UserChangePassword changes a password of a user.
UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error)
// RoleAdd adds a new user to an etcd cluster. // UserGrantRole grants a role to a user.
UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error)
// UserGet gets a detailed information of a user.
UserGet(ctx context.Context, name string) (*AuthUserGetResponse, error)
// UserList gets a list of all users.
UserList(ctx context.Context) (*AuthUserListResponse, error)
// UserRevokeRole revokes a role of a user.
UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error)
// RoleAdd adds a new role to an etcd cluster.
RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error)
// RoleGrantPermission grants a permission to a role.
RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, permType PermissionType) (*AuthRoleGrantPermissionResponse, error)
// RoleGet gets a detailed information of a role.
RoleGet(ctx context.Context, role string) (*AuthRoleGetResponse, error)
// RoleList gets a list of all roles.
RoleList(ctx context.Context) (*AuthRoleListResponse, error)
// RoleRevokePermission revokes a permission from a role.
RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error)
// RoleDelete deletes a role.
RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error)
} }
type auth struct { type auth struct {
...@@ -62,26 +115,115 @@ func NewAuth(c *Client) Auth { ...@@ -62,26 +115,115 @@ func NewAuth(c *Client) Auth {
} }
func (auth *auth) AuthEnable(ctx context.Context) (*AuthEnableResponse, error) { func (auth *auth) AuthEnable(ctx context.Context) (*AuthEnableResponse, error) {
resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}) resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}, grpc.FailFast(false))
return (*AuthEnableResponse)(resp), err return (*AuthEnableResponse)(resp), toErr(ctx, err)
}
func (auth *auth) AuthDisable(ctx context.Context) (*AuthDisableResponse, error) {
resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{}, grpc.FailFast(false))
return (*AuthDisableResponse)(resp), toErr(ctx, err)
} }
func (auth *auth) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) { func (auth *auth) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) {
resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password}) resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password}, grpc.FailFast(false))
return (*AuthUserAddResponse)(resp), err return (*AuthUserAddResponse)(resp), toErr(ctx, err)
} }
func (auth *auth) UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) { func (auth *auth) UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) {
resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}) resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}, grpc.FailFast(false))
return (*AuthUserDeleteResponse)(resp), err return (*AuthUserDeleteResponse)(resp), toErr(ctx, err)
} }
func (auth *auth) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) { func (auth *auth) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) {
resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}) resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}, grpc.FailFast(false))
return (*AuthUserChangePasswordResponse)(resp), err return (*AuthUserChangePasswordResponse)(resp), toErr(ctx, err)
}
func (auth *auth) UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error) {
resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role}, grpc.FailFast(false))
return (*AuthUserGrantRoleResponse)(resp), toErr(ctx, err)
}
func (auth *auth) UserGet(ctx context.Context, name string) (*AuthUserGetResponse, error) {
resp, err := auth.remote.UserGet(ctx, &pb.AuthUserGetRequest{Name: name}, grpc.FailFast(false))
return (*AuthUserGetResponse)(resp), toErr(ctx, err)
}
func (auth *auth) UserList(ctx context.Context) (*AuthUserListResponse, error) {
resp, err := auth.remote.UserList(ctx, &pb.AuthUserListRequest{}, grpc.FailFast(false))
return (*AuthUserListResponse)(resp), toErr(ctx, err)
}
func (auth *auth) UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error) {
resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role}, grpc.FailFast(false))
return (*AuthUserRevokeRoleResponse)(resp), toErr(ctx, err)
} }
func (auth *auth) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) { func (auth *auth) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) {
resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}) resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}, grpc.FailFast(false))
return (*AuthRoleAddResponse)(resp), err return (*AuthRoleAddResponse)(resp), toErr(ctx, err)
}
func (auth *auth) RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, permType PermissionType) (*AuthRoleGrantPermissionResponse, error) {
perm := &authpb.Permission{
Key: []byte(key),
RangeEnd: []byte(rangeEnd),
PermType: authpb.Permission_Type(permType),
}
resp, err := auth.remote.RoleGrantPermission(ctx, &pb.AuthRoleGrantPermissionRequest{Name: name, Perm: perm}, grpc.FailFast(false))
return (*AuthRoleGrantPermissionResponse)(resp), toErr(ctx, err)
}
func (auth *auth) RoleGet(ctx context.Context, role string) (*AuthRoleGetResponse, error) {
resp, err := auth.remote.RoleGet(ctx, &pb.AuthRoleGetRequest{Role: role}, grpc.FailFast(false))
return (*AuthRoleGetResponse)(resp), toErr(ctx, err)
}
func (auth *auth) RoleList(ctx context.Context) (*AuthRoleListResponse, error) {
resp, err := auth.remote.RoleList(ctx, &pb.AuthRoleListRequest{}, grpc.FailFast(false))
return (*AuthRoleListResponse)(resp), toErr(ctx, err)
}
func (auth *auth) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error) {
resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: key, RangeEnd: rangeEnd}, grpc.FailFast(false))
return (*AuthRoleRevokePermissionResponse)(resp), toErr(ctx, err)
}
func (auth *auth) RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error) {
resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role}, grpc.FailFast(false))
return (*AuthRoleDeleteResponse)(resp), toErr(ctx, err)
}
func StrToPermissionType(s string) (PermissionType, error) {
val, ok := authpb.Permission_Type_value[strings.ToUpper(s)]
if ok {
return PermissionType(val), nil
}
return PermissionType(-1), fmt.Errorf("invalid permission type: %s", s)
}
type authenticator struct {
conn *grpc.ClientConn // conn in-use
remote pb.AuthClient
}
func (auth *authenticator) authenticate(ctx context.Context, name string, password string) (*AuthenticateResponse, error) {
resp, err := auth.remote.Authenticate(ctx, &pb.AuthenticateRequest{Name: name, Password: password}, grpc.FailFast(false))
return (*AuthenticateResponse)(resp), toErr(ctx, err)
}
func (auth *authenticator) close() {
auth.conn.Close()
}
func newAuthenticator(endpoint string, opts []grpc.DialOption) (*authenticator, error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return nil, err
}
return &authenticator{
conn: conn,
remote: pb.NewAuthClient(conn),
}, nil
} }
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package clientv3
import (
"net/url"
"strings"
"sync/atomic"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// simpleBalancer does the bare minimum to expose multiple eps
// to the grpc reconnection code path
type simpleBalancer struct {
// eps are the client's endpoints stripped of any URL scheme
eps []string
ch chan []grpc.Address
numGets uint32
}
func newSimpleBalancer(eps []string) grpc.Balancer {
ch := make(chan []grpc.Address, 1)
addrs := make([]grpc.Address, len(eps))
for i := range eps {
addrs[i].Addr = getHost(eps[i])
}
ch <- addrs
return &simpleBalancer{eps: eps, ch: ch}
}
func (b *simpleBalancer) Start(target string) error { return nil }
func (b *simpleBalancer) Up(addr grpc.Address) func(error) { return func(error) {} }
func (b *simpleBalancer) Get(ctx context.Context, opts grpc.BalancerGetOptions) (grpc.Address, func(), error) {
v := atomic.AddUint32(&b.numGets, 1)
ep := b.eps[v%uint32(len(b.eps))]
return grpc.Address{Addr: getHost(ep)}, func() {}, nil
}
func (b *simpleBalancer) Notify() <-chan []grpc.Address { return b.ch }
func (b *simpleBalancer) Close() error {
close(b.ch)
return nil
}
func getHost(ep string) string {
url, uerr := url.Parse(ep)
if uerr != nil || !strings.Contains(ep, "://") {
return ep
}
return url.Host
}
// Copyright 2016 CoreOS, Inc. // Copyright 2016 The etcd Authors
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
...@@ -15,18 +15,22 @@ ...@@ -15,18 +15,22 @@
package clientv3 package clientv3
import ( import (
"crypto/tls"
"errors" "errors"
"fmt"
"io/ioutil" "io/ioutil"
"log" "log"
"net" "net"
"net/url" "net/url"
"strings" "strings"
"sync"
"time" "time"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
) )
var ( var (
...@@ -42,21 +46,21 @@ type Client struct { ...@@ -42,21 +46,21 @@ type Client struct {
Auth Auth
Maintenance Maintenance
conn *grpc.ClientConn conn *grpc.ClientConn
cfg Config cfg Config
creds *credentials.TransportAuthenticator creds *credentials.TransportCredentials
mu sync.RWMutex // protects connection selection and error list
errors []error // errors passed to retryConnection
ctx context.Context ctx context.Context
cancel context.CancelFunc cancel context.CancelFunc
// Username is a username for authentication
Username string
// Password is a password for authentication
Password string
} }
// New creates a new etcdv3 client from a given configuration. // New creates a new etcdv3 client from a given configuration.
func New(cfg Config) (*Client, error) { func New(cfg Config) (*Client, error) {
if cfg.RetryDialer == nil {
cfg.RetryDialer = dialEndpointList
}
if len(cfg.Endpoints) == 0 { if len(cfg.Endpoints) == 0 {
return nil, ErrNoAvailableEndpoints return nil, ErrNoAvailableEndpoints
} }
...@@ -80,17 +84,8 @@ func NewFromConfigFile(path string) (*Client, error) { ...@@ -80,17 +84,8 @@ func NewFromConfigFile(path string) (*Client, error) {
// Close shuts down the client's etcd connections. // Close shuts down the client's etcd connections.
func (c *Client) Close() error { func (c *Client) Close() error {
c.mu.Lock()
if c.cancel == nil {
c.mu.Unlock()
return nil
}
c.cancel() c.cancel()
c.cancel = nil return toErr(c.ctx, c.conn.Close())
c.mu.Unlock()
c.Watcher.Close()
c.Lease.Close()
return c.conn.Close()
} }
// Ctx is a context for "out of band" messages (e.g., for sending // Ctx is a context for "out of band" messages (e.g., for sending
...@@ -101,72 +96,157 @@ func (c *Client) Ctx() context.Context { return c.ctx } ...@@ -101,72 +96,157 @@ func (c *Client) Ctx() context.Context { return c.ctx }
// Endpoints lists the registered endpoints for the client. // Endpoints lists the registered endpoints for the client.
func (c *Client) Endpoints() []string { return c.cfg.Endpoints } func (c *Client) Endpoints() []string { return c.cfg.Endpoints }
// Errors returns all errors that have been observed since called last. type authTokenCredential struct {
func (c *Client) Errors() (errs []error) { token string
c.mu.Lock()
defer c.mu.Unlock()
errs = c.errors
c.errors = nil
return errs
} }
// Dial establishes a connection for a given endpoint using the client's config func (cred authTokenCredential) RequireTransportSecurity() bool {
func (c *Client) Dial(endpoint string) (*grpc.ClientConn, error) { return false
}
func (cred authTokenCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) {
return map[string]string{
"token": cred.token,
}, nil
}
func (c *Client) dialTarget(endpoint string) (proto string, host string, creds *credentials.TransportCredentials) {
proto = "tcp"
host = endpoint
creds = c.creds
url, uerr := url.Parse(endpoint)
if uerr != nil || !strings.Contains(endpoint, "://") {
return
}
// strip scheme:// prefix since grpc dials by host
host = url.Host
switch url.Scheme {
case "unix":
proto = "unix"
case "http":
creds = nil
case "https":
if creds != nil {
break
}
tlsconfig := &tls.Config{}
emptyCreds := credentials.NewTLS(tlsconfig)
creds = &emptyCreds
default:
return "", "", nil
}
return
}
// dialSetupOpts gives the dial opts prioer to any authentication
func (c *Client) dialSetupOpts(endpoint string, dopts ...grpc.DialOption) []grpc.DialOption {
opts := []grpc.DialOption{ opts := []grpc.DialOption{
grpc.WithBlock(), grpc.WithBlock(),
grpc.WithTimeout(c.cfg.DialTimeout), grpc.WithTimeout(c.cfg.DialTimeout),
} }
if c.creds != nil { opts = append(opts, dopts...)
opts = append(opts, grpc.WithTransportCredentials(*c.creds))
} else {
opts = append(opts, grpc.WithInsecure())
}
proto := "tcp" // grpc issues TLS cert checks using the string passed into dial so
if url, uerr := url.Parse(endpoint); uerr == nil && url.Scheme == "unix" { // that string must be the host. To recover the full scheme://host URL,
proto = "unix" // have a map from hosts to the original endpoint.
// strip unix:// prefix so certs work host2ep := make(map[string]string)
endpoint = url.Host for i := range c.cfg.Endpoints {
_, host, _ := c.dialTarget(c.cfg.Endpoints[i])
host2ep[host] = c.cfg.Endpoints[i]
} }
f := func(a string, t time.Duration) (net.Conn, error) {
f := func(host string, t time.Duration) (net.Conn, error) {
proto, host, _ := c.dialTarget(host2ep[host])
if proto == "" {
return nil, fmt.Errorf("unknown scheme for %q", host)
}
select { select {
case <-c.ctx.Done(): case <-c.ctx.Done():
return nil, c.ctx.Err() return nil, c.ctx.Err()
default: default:
} }
return net.DialTimeout(proto, a, t) return net.DialTimeout(proto, host, t)
} }
opts = append(opts, grpc.WithDialer(f)) opts = append(opts, grpc.WithDialer(f))
conn, err := grpc.Dial(endpoint, opts...) _, _, creds := c.dialTarget(endpoint)
if creds != nil {
opts = append(opts, grpc.WithTransportCredentials(*creds))
} else {
opts = append(opts, grpc.WithInsecure())
}
return opts
}
// Dial connects to a single endpoint using the client's config.
func (c *Client) Dial(endpoint string) (*grpc.ClientConn, error) {
return c.dial(endpoint)
}
func (c *Client) dial(endpoint string, dopts ...grpc.DialOption) (*grpc.ClientConn, error) {
opts := c.dialSetupOpts(endpoint, dopts...)
host := getHost(endpoint)
if c.Username != "" && c.Password != "" {
// use dial options without dopts to avoid reusing the client balancer
auth, err := newAuthenticator(host, c.dialSetupOpts(endpoint))
if err != nil {
return nil, err
}
defer auth.close()
resp, err := auth.authenticate(c.ctx, c.Username, c.Password)
if err != nil {
return nil, err
}
opts = append(opts, grpc.WithPerRPCCredentials(authTokenCredential{token: resp.Token}))
}
conn, err := grpc.Dial(host, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return conn, nil return conn, nil
} }
// WithRequireLeader requires client requests to only succeed
// when the cluster has a leader.
func WithRequireLeader(ctx context.Context) context.Context {
md := metadata.Pairs(rpctypes.MetadataRequireLeaderKey, rpctypes.MetadataHasLeader)
return metadata.NewContext(ctx, md)
}
func newClient(cfg *Config) (*Client, error) { func newClient(cfg *Config) (*Client, error) {
if cfg == nil { if cfg == nil {
cfg = &Config{RetryDialer: dialEndpointList} cfg = &Config{}
} }
var creds *credentials.TransportAuthenticator var creds *credentials.TransportCredentials
if cfg.TLS != nil { if cfg.TLS != nil {
c := credentials.NewTLS(cfg.TLS) c := credentials.NewTLS(cfg.TLS)
creds = &c creds = &c
} }
// use a temporary skeleton client to bootstrap first connection // use a temporary skeleton client to bootstrap first connection
ctx, cancel := context.WithCancel(context.TODO()) ctx, cancel := context.WithCancel(context.TODO())
conn, err := cfg.RetryDialer(&Client{cfg: *cfg, creds: creds, ctx: ctx})
if err != nil {
return nil, err
}
client := &Client{ client := &Client{
conn: conn, conn: nil,
cfg: *cfg, cfg: *cfg,
creds: creds, creds: creds,
ctx: ctx, ctx: ctx,
cancel: cancel, cancel: cancel,
} }
if cfg.Username != "" && cfg.Password != "" {
client.Username = cfg.Username
client.Password = cfg.Password
}
b := newSimpleBalancer(cfg.Endpoints)
conn, err := client.dial(cfg.Endpoints[0], grpc.WithBalancer(b))
if err != nil {
return nil, err
}
client.conn = conn
client.Cluster = NewCluster(client) client.Cluster = NewCluster(client)
client.KV = NewKV(client) client.KV = NewKV(client)
client.Lease = NewLease(client) client.Lease = NewLease(client)
...@@ -184,60 +264,35 @@ func newClient(cfg *Config) (*Client, error) { ...@@ -184,60 +264,35 @@ func newClient(cfg *Config) (*Client, error) {
} }
// ActiveConnection returns the current in-use connection // ActiveConnection returns the current in-use connection
func (c *Client) ActiveConnection() *grpc.ClientConn { func (c *Client) ActiveConnection() *grpc.ClientConn { return c.conn }
c.mu.RLock()
defer c.mu.RUnlock()
return c.conn
}
// retryConnection establishes a new connection // isHaltErr returns true if the given error and context indicate no forward
func (c *Client) retryConnection(oldConn *grpc.ClientConn, err error) (*grpc.ClientConn, error) { // progress can be made, even after reconnecting.
c.mu.Lock() func isHaltErr(ctx context.Context, err error) bool {
defer c.mu.Unlock() if ctx != nil && ctx.Err() != nil {
if err != nil { return true
c.errors = append(c.errors, err)
}
if c.cancel == nil {
return nil, c.ctx.Err()
} }
if oldConn != c.conn { if err == nil {
// conn has already been updated return false
return c.conn, nil
} }
eErr := rpctypes.Error(err)
oldConn.Close() if _, ok := eErr.(rpctypes.EtcdError); ok {
if st, _ := oldConn.State(); st != grpc.Shutdown { return eErr != rpctypes.ErrStopped && eErr != rpctypes.ErrNoLeader
// wait for shutdown so grpc doesn't leak sleeping goroutines
oldConn.WaitForStateChange(c.ctx, st)
} }
// treat etcdserver errors not recognized by the client as halting
conn, dialErr := c.cfg.RetryDialer(c) return strings.Contains(err.Error(), grpc.ErrClientConnClosing.Error()) ||
if dialErr != nil { strings.Contains(err.Error(), "etcdserver:")
c.errors = append(c.errors, dialErr)
return nil, dialErr
}
c.conn = conn
return c.conn, nil
} }
// dialEndpointList attempts to connect to each endpoint in order until a func toErr(ctx context.Context, err error) error {
// connection is established. if err == nil {
func dialEndpointList(c *Client) (*grpc.ClientConn, error) { return nil
var err error
for _, ep := range c.Endpoints() {
conn, curErr := c.Dial(ep)
if curErr != nil {
err = curErr
} else {
return conn, nil
}
} }
return nil, err err = rpctypes.Error(err)
} if ctx.Err() != nil && strings.Contains(err.Error(), "context") {
err = ctx.Err()
// isHalted returns true if the given error and context indicate no forward } else if strings.Contains(err.Error(), grpc.ErrClientConnClosing.Error()) {
// progress can be made, even after reconnecting. err = grpc.ErrClientConnClosing
func isHalted(ctx context.Context, err error) bool { }
isRPCError := strings.HasPrefix(grpc.ErrorDesc(err), "etcdserver: ") return err
return isRPCError || ctx.Err() != nil
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment