| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you 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. |
| |
| syntax = "proto2"; |
| |
| import "mesos/mesos.proto"; |
| |
| import "mesos/maintenance/maintenance.proto"; |
| |
| import "mesos/quota/quota.proto"; |
| |
| import "resource_provider/registry.proto"; |
| |
| package mesos.internal; |
| |
| /** |
| * A top level object that is managed by the Registrar and persisted in a |
| * replicated log. This object is recovered upon master startup and failover. |
| */ |
| message Registry { |
| // NOTE: This object defines wrappers around existing objects in case |
| // the Registry wishes to store more information about the wrapped objects |
| // in the future. |
| |
| message Master { |
| required MasterInfo info = 1; |
| } |
| |
| message Slave { |
| required SlaveInfo info = 1; |
| } |
| |
| message Slaves { |
| repeated Slave slaves = 1; |
| } |
| |
| message UnreachableSlave { |
| required SlaveID id = 1; |
| |
| // The time when the slave was marked unreachable by the master. |
| required TimeInfo timestamp = 2; |
| } |
| |
| message UnreachableSlaves { |
| repeated UnreachableSlave slaves = 1; |
| } |
| |
| message GoneSlave { |
| required SlaveID id = 1; |
| |
| // The time when the slave was marked gone by the master. |
| required TimeInfo timestamp = 2; |
| } |
| |
| message GoneSlaves { |
| repeated GoneSlave slaves = 1; |
| } |
| |
| message Machine { |
| required MachineInfo info = 1; |
| } |
| |
| message Machines { |
| repeated Machine machines = 1; |
| } |
| |
| message Quota { |
| required quota.QuotaInfo info = 1; |
| } |
| |
| message Weight { |
| required WeightInfo info = 1; |
| } |
| |
| // The minimum set of `MasterInfo::Capability` that the master reading |
| // this registry should be capable of. If the master is upgraded |
| // or downgraded and no longer satisfies these capabilities, the |
| // master is expected to exit upon recovery. |
| // |
| // We do not use `MasterInfo::Capability` in this field directly |
| // because the enumeration may be extended in later Mesos versions. |
| // If an earlier version is given an enum value from a later version, |
| // the protobuf parser will interpret this as an `UNKNOWN` capability, |
| // and we will be unable to provide remediation text to the operator. |
| message MinimumCapability { |
| required string capability = 1; |
| } |
| |
| // Most recent leading master. |
| optional Master master = 1; |
| |
| // All admitted (healthy) slaves. |
| optional Slaves slaves = 2; |
| |
| // Slaves that have failed health checks. They may or may not still |
| // be running. |
| // |
| // New entries are added to the end of this list; hence the first |
| // element of the list was added first (although if there is clock |
| // drift, it might not necessarily have the smallest timestamp). The |
| // size of this list is limited by the `registry_max_agent_age` and |
| // `registry_max_agent_count` flags. |
| optional UnreachableSlaves unreachable = 7; |
| |
| // Slaves that have been explicitly marked as failed (no longer running) |
| // by the operator. They may or may not still be running. |
| // |
| // New entries are added to the end of this list; hence the first |
| // element of the list was added first (although if there is clock |
| // drift, it might not necessarily have the smallest timestamp). |
| optional GoneSlaves gone = 8; |
| |
| // Holds a list of machines and some status information about each. |
| // See comments in `MachineInfo` for more information. |
| optional Machines machines = 3; |
| |
| // Describes a schedule for taking down specific machines for maintenance. |
| // The schedule is meant to give hints to frameworks about potential |
| // unavailability of resources. The `schedules` are related to the status |
| // information found in `machines`. |
| repeated maintenance.Schedule schedules = 4; |
| |
| // A list of recorded quotas in the cluster. It does not hold an actual |
| // assignment of resources, a newly elected master shall reconstruct it |
| // from the cluster. |
| repeated Quota quotas = 5; |
| |
| // A list of recorded weights in the cluster, a newly elected master shall |
| // reconstruct it from the registry. |
| repeated Weight weights = 6; |
| |
| // All known resource providers. |
| optional resource_provider.registry.Registry resource_provider_registry = 9; |
| |
| repeated MinimumCapability minimum_capabilities = 10; |
| } |