Skip to content

Commit

Permalink
feat: add new abort and drop causes to API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 555409746
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 10, 2023
1 parent ecf3eb1 commit 76abecc
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 12 deletions.
86 changes: 80 additions & 6 deletions google/cloud/networkmanagement/v1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,30 @@ message AbortInfo {

// Aborted because the test scenario is not supported.
UNSUPPORTED = 15;

// Aborted because the source and destination resources have no common IP
// version.
MISMATCHED_IP_VERSION = 16;

// Aborted because the connection between the control plane and the node of
// the source cluster is initiated by the node and managed by the
// Konnectivity proxy.
GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17;

// Aborted because expected resource configuration was missing.
RESOURCE_CONFIG_NOT_FOUND = 18;

// Aborted because a PSC endpoint selection for the Google-managed service
// is ambiguous (several PSC endpoints satisfy test input).
GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19;

// Aborted because tests with a PSC-based Cloud SQL instance as a source are
// not supported.
SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20;

// Aborted because tests with a forwarding rule as a source are not
// supported.
SOURCE_FORWARDING_RULE_UNSUPPORTED = 21;
}

// Causes that the analysis is aborted.
Expand Down Expand Up @@ -865,6 +889,10 @@ message DropInfo {
// Forwarding rule's protocol and ports do not match the packet header.
FORWARDING_RULE_MISMATCH = 11;

// Packet could be dropped because it was sent from a different region
// to a regional forwarding without global access.
FORWARDING_RULE_REGION_MISMATCH = 25;

// Forwarding rule does not have backends configured.
FORWARDING_RULE_NO_INSTANCES = 12;

Expand All @@ -878,6 +906,12 @@ message DropInfo {
// running state.
INSTANCE_NOT_RUNNING = 14;

// Packet sent from or to a GKE cluster that is not in running state.
GKE_CLUSTER_NOT_RUNNING = 27;

// Packet sent from or to a Cloud SQL instance that is not in running state.
CLOUD_SQL_INSTANCE_NOT_RUNNING = 28;

// The type of traffic is blocked and the user cannot configure a firewall
// rule to enable it. See [Always blocked
// traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
Expand Down Expand Up @@ -906,11 +940,44 @@ message DropInfo {
// network and the Google Managed Services Network.
GOOGLE_MANAGED_SERVICE_NO_PEERING = 20;

// Packet was dropped because the Google-managed service uses Private
// Service Connect (PSC), but the PSC endpoint is not found in the project.
GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38;

// Packet was dropped because the GKE cluster uses Private Service Connect
// (PSC), but the PSC endpoint is not found in the project.
GKE_PSC_ENDPOINT_MISSING = 36;

// Packet was dropped because the Cloud SQL instance has neither a private
// nor a public IP address.
CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21;

// Packet could be dropped because the Cloud function is not in an active
// Packet was dropped because a GKE cluster private endpoint is
// unreachable from a region different from the cluster's region.
GKE_CONTROL_PLANE_REGION_MISMATCH = 30;

// Packet sent from a public GKE cluster control plane to a private
// IP address.
PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31;

// Packet was dropped because there is no route from a GKE cluster
// control plane to a destination network.
GKE_CONTROL_PLANE_NO_ROUTE = 32;

// Packet sent from a Cloud SQL instance to an external IP address is not
// allowed. The Cloud SQL instance is not configured to send packets to
// external IP addresses.
CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33;

// Packet sent from a Cloud SQL instance with only a public IP address to a
// private IP address.
PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34;

// Packet was dropped because there is no route from a Cloud SQL
// instance to a destination network.
CLOUD_SQL_INSTANCE_NO_ROUTE = 35;

// Packet could be dropped because the Cloud Function is not in an active
// status.
CLOUD_FUNCTION_NOT_ACTIVE = 22;

Expand All @@ -921,12 +988,19 @@ message DropInfo {
// state.
VPC_CONNECTOR_NOT_RUNNING = 24;

// Packet could be dropped because it was sent from a different region
// to a regional forwarding without global access.
FORWARDING_RULE_REGION_MISMATCH = 25;

// Privte Service Connect (PSC) connection is not in accepted state.
// The Private Service Connect endpoint is in a project that is not approved
// to connect to the service.
PSC_CONNECTION_NOT_ACCEPTED = 26;

// Packet sent from a Cloud Run revision that is not ready.
CLOUD_RUN_REVISION_NOT_READY = 29;

// Packet was dropped inside Private Service Connect service producer.
DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37;

// Packet sent to a load balancer, which requires a proxy-only subnet and
// the subnet is not found.
LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39;
}

// Cause that the packet is dropped.
Expand Down
86 changes: 80 additions & 6 deletions google/cloud/networkmanagement/v1beta1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,30 @@ message AbortInfo {

// Aborted because the test scenario is not supported.
UNSUPPORTED = 15;

// Aborted because the source and destination resources have no common IP
// version.
MISMATCHED_IP_VERSION = 16;

// Aborted because the connection between the control plane and the node of
// the source cluster is initiated by the node and managed by the
// Konnectivity proxy.
GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17;

// Aborted because expected resource configuration was missing.
RESOURCE_CONFIG_NOT_FOUND = 18;

// Aborted because a PSC endpoint selection for the Google-managed service
// is ambiguous (several PSC endpoints satisfy test input).
GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19;

// Aborted because tests with a PSC-based Cloud SQL instance as a source are
// not supported.
SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20;

// Aborted because tests with a forwarding rule as a source are not
// supported.
SOURCE_FORWARDING_RULE_UNSUPPORTED = 21;
}

// Causes that the analysis is aborted.
Expand Down Expand Up @@ -865,6 +889,10 @@ message DropInfo {
// Forwarding rule's protocol and ports do not match the packet header.
FORWARDING_RULE_MISMATCH = 11;

// Packet could be dropped because it was sent from a different region
// to a regional forwarding without global access.
FORWARDING_RULE_REGION_MISMATCH = 25;

// Forwarding rule does not have backends configured.
FORWARDING_RULE_NO_INSTANCES = 12;

Expand All @@ -878,6 +906,12 @@ message DropInfo {
// running state.
INSTANCE_NOT_RUNNING = 14;

// Packet sent from or to a GKE cluster that is not in running state.
GKE_CLUSTER_NOT_RUNNING = 27;

// Packet sent from or to a Cloud SQL instance that is not in running state.
CLOUD_SQL_INSTANCE_NOT_RUNNING = 28;

// The type of traffic is blocked and the user cannot configure a firewall
// rule to enable it. See [Always blocked
// traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
Expand Down Expand Up @@ -906,11 +940,44 @@ message DropInfo {
// network and the Google Managed Services Network.
GOOGLE_MANAGED_SERVICE_NO_PEERING = 20;

// Packet was dropped because the Google-managed service uses Private
// Service Connect (PSC), but the PSC endpoint is not found in the project.
GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38;

// Packet was dropped because the GKE cluster uses Private Service Connect
// (PSC), but the PSC endpoint is not found in the project.
GKE_PSC_ENDPOINT_MISSING = 36;

// Packet was dropped because the Cloud SQL instance has neither a private
// nor a public IP address.
CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21;

// Packet could be dropped because the Cloud function is not in an active
// Packet was dropped because a GKE cluster private endpoint is
// unreachable from a region different from the cluster's region.
GKE_CONTROL_PLANE_REGION_MISMATCH = 30;

// Packet sent from a public GKE cluster control plane to a private
// IP address.
PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31;

// Packet was dropped because there is no route from a GKE cluster
// control plane to a destination network.
GKE_CONTROL_PLANE_NO_ROUTE = 32;

// Packet sent from a Cloud SQL instance to an external IP address is not
// allowed. The Cloud SQL instance is not configured to send packets to
// external IP addresses.
CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33;

// Packet sent from a Cloud SQL instance with only a public IP address to a
// private IP address.
PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34;

// Packet was dropped because there is no route from a Cloud SQL
// instance to a destination network.
CLOUD_SQL_INSTANCE_NO_ROUTE = 35;

// Packet could be dropped because the Cloud Function is not in an active
// status.
CLOUD_FUNCTION_NOT_ACTIVE = 22;

Expand All @@ -921,12 +988,19 @@ message DropInfo {
// state.
VPC_CONNECTOR_NOT_RUNNING = 24;

// Packet could be dropped because it was sent from a different region
// to a regional forwarding without global access.
FORWARDING_RULE_REGION_MISMATCH = 25;

// Privte Service Connect (PSC) connection is not in accepted state.
// The Private Service Connect endpoint is in a project that is not approved
// to connect to the service.
PSC_CONNECTION_NOT_ACCEPTED = 26;

// Packet sent from a Cloud Run revision that is not ready.
CLOUD_RUN_REVISION_NOT_READY = 29;

// Packet was dropped inside Private Service Connect service producer.
DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37;

// Packet sent to a load balancer, which requires a proxy-only subnet and
// the subnet is not found.
LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39;
}

// Cause that the packet is dropped.
Expand Down

0 comments on commit 76abecc

Please sign in to comment.