Dormeto

Docs

Eligibility

What can be a workload on AWS and Google Cloud, and why Dormeto refuses one. On Google Cloud, dormeto gcp workloads onboard --dry-run asks the router, without the manager.

11 min read

Ineligible candidates

A candidate's reason says why Dormeto cannot nap it (Discovery).

The onboarding's preview can still refuse one shown eligible.

Amazon Web ServicesAWS

  • Only Application Load Balancers are read. A candidate shows the first reason that applies.
  • Kubernetes targets have their own reasons: the pods' owner, KEDA at zero, an unreadable cluster (Access).
MessageCauseFix
redirect action
fixed response
authentication only
The rule forwards to no target group.Accept it: such a rule has no backend.
weighted forward to several target groupsThe rule shares its traffic between target groups.Forward the rule to one target group.
target group also in a weighted forwardAnother rule shares its traffic with this target group.Forward that rule to one target group.
Lambda target group
load balancer target group
Its targets are Lambda functions, or another load balancer.Accept it: Dormeto naps instances, services and pods.
listener default action (not supported yet)A listener's default action forwards to the target group.Forward to the target group from a listener rule.
target group used by several load balancersA nap would stop the other load balancers' backends too.Give each load balancer its own target group.
more than 10 rulesMore than 10 rules forward to the target group.Keep at most 10 rules on the target group.
no backend: no registered target, Auto Scaling group or ECS serviceThe target group is empty.Register its targets, then run discovery again.
IP targets without an ECS serviceIP targets no ECS service registered, and no pods of a cluster.Accept it: Dormeto naps no bare IP address.
the Auto Scaling group <name> holds nodes of EKS cluster <cluster>: never napped (its pods are Kubernetes workloads)An Auto Scaling group of a cluster's nodes.Onboard the pods' own target group instead.
targets <ids> are nodes of EKS cluster <cluster> (a NodePort Service or a TargetGroupBinding in instance mode): not traced to their pods yet, never napped as instancesInstance targets that are a cluster's nodes.Register the pods as IP targets instead.

Google Cloud

  • A refusal is in the router's own words (What refuses a workload).
  • A candidate is Ineligible when it fails one of the manager's rules:
    • Its load balancer is of a kind the router serves.
    • Its backend service is in one URL map only.
    • Its backends are instance groups or zonal groups of VMs.
    • GKE owns none of its maps.
    • Its map has no error response policy of yours.
    • No route goes under /_dormeto/.
  • A GKE backend is listed as k8s, and refused with its own reason.
MessageCauseFix
a GKE workload is onboarded with dormeto gcp workloads onboard, after dormeto gcp workloads access grantA GKE backend: discovery reads no cluster (GKE pods).Grant the Kubernetes access, then onboard with the CLI.

What the check does Google Cloud only

  1. Run the onboarding as a dry run, naming the URL map and its backend service (workloads):
    dormeto gcp workloads onboard --project my-project --region europe-west1 \
      --url-map web-map --backend-service web --dry-run
  2. Read its answer: eligible, or every reason that refuses the workload.
  • The router reads them and their backends with its roles, writing nothing.
  • A dry run stops there; else the onboarding follows at once (Workloads).
  • The manager's onboarding preview asks the same check: the router has the last word.
  • Each nap checks the backends again (Workloads).

Eligible or refused

  • Eligible: the CLI names what the onboarding would tag dormeto=managed: VMs, managed groups, Cloud SQL instances. For pods, the namespace and Service whose access it would apply.
  • Refused: every reason, one per line, then Nothing was changed. Exit 1.
  • Warned: a line starting with ! refuses nothing, the request logs' warning included (workloads).
  • Onboarded: dormeto gcp workloads list and dormeto gcp workloads show read them (workloads).
Backend service web is not eligible:
  - backend service web has no health check: a wake waits for a healthy instance, add one
  - VM web-admin has a local SSD: a stop would lose its data, take it out of the backend service
Nothing was changed.
MessageCauseFix
! Cloud SQL instance <name> has read replicas (<replicas>): Google stops only the primary, its replicas keep running, and billing, while the workload sleeps.Read replicas of a companion.Remove the replicas you don't need.
! Cluster <cluster> is a Standard cluster: scaling pods saves money only on Autopilot, or with the node autoscaler freeing a node; its fixed nodes are paid all the same.A Standard GKE cluster.Use Autopilot, or the node autoscaler.

What can be a workload Google Cloud only

  • A load balancer: an Application Load Balancer, its kind read from Google or given with --load-balancer. Its kinds: global (EXTERNAL_MANAGED), regional (EXTERNAL_MANAGED), classic (EXTERNAL), internal or cross-region-internal (INTERNAL_MANAGED, Internal load balancers).
  • On the Standard network tier: a classic one counts too, as Google accepts it for the swap.
  • Its URL map: used by one target proxy, which forwarding rules send to.
  • A backend service: one the map routes to, with a health check, that no other map names.
  • Its backends: unmanaged instance groups, zonal or regional managed groups, and zonal network endpoint groups of VMs (GCE_VM_IP_PORT).
  • Or pods: a Deployment or a StatefulSet behind standalone network endpoint groups, with --gke-cluster. The Service's annotation cloud.google.com/neg makes those groups.
  • Companions: primary Cloud SQL instances of the project, napped with the application, with --database.

Pods and Cloud SQL need the router's optional access. What each flag sets: Workloads.

Internal load balancers

  • internal: a regional map whose forwarding rules are INTERNAL_MANAGED, in the router's region.
  • cross-region-internal: a global map whose rules are INTERNAL_MANAGED, which any router can onboard.
  • INTERNAL_SELF_MANAGED (Cloud Service Mesh) stays refused.
  • A nap swaps the map's references, waiting 30 s on internal and 150 s on cross-region-internal (Workloads).
  • Nothing is added to your network: the waker admits both internal kinds.
  • Visitors' addresses are private, so are an IP list's ranges. A project's regional serverless network endpoint groups share 5,000 queries a second.
  • A cross-region-internal load balancer's waker is in one region; its waiting page has no favicon.

What refuses a workload Google Cloud only

Each line names its resource first.

The load balancer and its URL map

MessageCauseFix
URL map <map> exists globally and in region <region>That name in both scopes.Name its kind with --load-balancer.
URL map <map> not found: name a global URL map of this projectNo such map in its scope.Name another, or its kind.
regional load balancers are onboarded on the router of their regionA regional map of another region.Use that region's router.
URL map <map> is used by no target proxyNo load balancer uses the map.Attach it to an Application Load Balancer.
give each load balancer its own URL mapTwo load balancers share the map.Give each its own map.
no forwarding rule sends to the target proxy of URL map <map>No forwarding rule.Add a forwarding rule.
only Application Load Balancers are supportedA network load balancer, or Cloud Service Mesh's (INTERNAL_SELF_MANAGED).Use an Application Load Balancer (What can be a workload).
finish its migration, then onboard againRules of two kinds, mid-migration.Finish the migration.
belongs to <a kind> load balancer, not <a kind> one: onboard it with --load-balancer <kind>A wrong --load-balancer.Give the map's own kind.
its wake includes the URL map's changeBehind a swap, too short a --wake-timeout-seconds.Raise it past its kind's floor (Workloads).
is named in URL map <map> only by its default, which a host rule * hidesA host rule * hides it.Route to it in a path matcher.
the URL map has its own error response policyThe map's own policy for the service.Remove the map's own policy.
the URL map has its own /_dormeto/ routeThe map routes /_dormeto/ itself.Remove that route.
the /_dormeto/ route needs itA route rule holds Dormeto's priority.Give it another priority.
has tests naming backend service <service>: a swap would fail themBehind a swap: the map's tests name it.Remove those map tests.
mirrors requests to backend service <service> at <path>: a swap would leave the mirrorBehind a swap: the map mirrors to it.Remove the mirror.
has weights naming backend service <service> beside another service at <path>: a swap would change their sharesBehind a swap: weights split its traffic.Remove the weights.

The backend service

MessageCauseFix
backend service <service> is already workload <id>Another workload has it.Offboard that workload first.
a global backend service of this projectNone of that name in its scope.Name a service in that scope.
backend service <service> has the scheme <scheme>Its scheme isn't its load balancer's.Use its load balancer's scheme.
backend service <service> is not named in URL map <map>The map doesn't route to it.Add a route to the service.
that load balancer would lose its backends during a napAnother map routes to it too.Give each load balancer its own service.
has no health check: a wake waits for a healthy instance, add oneNo health check.Add a health check.
has no backend: add an instance group, then onboard againNo backend.Add an instance group.
backend service <name> exists and is not the waker of <id>Your service has the waker's name.Rename it, or choose another --id.

VMs, groups and network endpoint groups

MessageCauseFix
VM <name> belongs to workload <id>Another workload has it.Offboard that workload first.
Dormeto records a workload's VMs by name; rename oneTwo VMs of one name.Rename one VM.
has no VM: add one, then onboard againAn empty instance group.Add a VM.
has a stateful configuration: a nap might not keep itA stateful managed group.Remove the group from the service.
has the target shape EVEN with instance redistribution onA regional managed group Google keeps even across zones.Set its redistribution type to NONE.
has a GPU: GPU VMs are not supportedA VM, or a fallback type, with a GPU.Remove the VM from the service, or name another fallback type.
fallback machine types are for VMs of unmanaged instance groups: a managed group's machine type is its template's--fallback-type with a managed group.Onboard without --fallback-type.
fallback machine type <type> does not exist in zone <zone>A fallback type the VM's zone lacks.Name a type of that zone.
a machine type of another series can be set only between first and second generation seriesSeries not both first or second generation.Name a type of the VM's series.
has a local SSD: a stop would lose its dataA VM with a local SSD.Remove the VM from the service.
is a member of managed group <group>, which would repair it once stoppedA managed group's VM, in a network endpoint group.Onboard the managed group instead.
only GCE_VM_IP_PORT is supported, take it out of the backend serviceA network endpoint group not of VMs.Remove the group from the service.
was made by GKE, its endpoints are pods: it needs --gke-clusterPods, without --gke-cluster.Onboard with --gke-cluster.
has no endpoint: add a VM to it, then onboard againAn empty network endpoint group.Add a VM to the group.
only endpoints naming a VM are supportedAn endpoint given by its IP address alone.Name its VM instead.
names the VM <vm>, which does not exist: remove the endpoint, then onboard againAn endpoint names a deleted VM.Remove the endpoint.
only zonal network endpoint groups of VMs and instance groups are supportedA serverless, Private Service Connect or internet network endpoint group.Remove that backend from the service.

Cloud SQL

MessageCauseFix
is a read replica: Google cannot stop one, name its primary or noneA read replica.Name its primary.
Cloud SQL instance <name> not found: name an instance of this projectNo instance of that name.Name an instance of the project.
it does not exist, or the router was installed without --with cloud-sqlThe router can't read the instance.Install the access cloud-sql.

GKE pods

MessageCauseFix
belongs to a load balancer GKE owns (a Gateway or an Ingress)GKE writes such a map back.Use a standalone network endpoint group on your load balancer.
fallback machine types are for VMs of unmanaged instance groups: the pods of a GKE cluster have no machine type of their own--fallback-type with --gke-cluster.Onboard without --fallback-type.
not found: name a cluster of this project as <location>/<name>No GKE cluster of that name.Name the cluster <location>/<name>.
it does not exist, or the router was installed without --with gkeThe router can't read the cluster.Install the access gke.
has no DNS endpoint open to traffic from outside its networkThe router needs it to reach the cluster.Turn on its DNS endpoint.
each backend is a zonal network endpoint group of pods, with nothing else next to themOther backends beside the pods.Remove the other backends.
was not made by GKE, its endpoints are VMsA network endpoint group of VMs.Onboard without --gke-cluster.
a wrong guess would scale someone else's podsThe group names no namespace and Service.Use GKE's group for the Service.
a workload is one ServiceGroups of several Services.Give each Service its own backend service.
a workload is one cluster'sGroups of several clusters.Keep one cluster per backend service.

At the onboarding itself:

MessageCauseFix
its owner cannot be told (scale it up, then onboard again)No pod behind the Service; from the CLI.Scale its owner up first.
Dormeto naps Deployments and StatefulSetsPods of a DaemonSet or other owner; from the CLI.Onboard a Deployment or a StatefulSet.
dormeto gcp workloads access grant applies themThe router lacks its namespace rights.Run dormeto gcp workloads access grant.
that are not pods of <owner>: nothing is scaledEndpoints that aren't the owner's pods.Remove those endpoints from the groups.
to zero itself (minReplicaCount: 0): set it to 1 or more for Dormeto to nap itA KEDA ScaledObject has minReplicaCount at 0, or unset.Set it to 1 or more.

GKE's maps go by these names: k8s2-, k8s-um-, gkegw1-, gkemcg1-, or mci- and six letters or digits. Or their descriptions hold k8sResource or kubernetes.io/ingress-name.