Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on https://portal.biganimal.com/api/docs/?beacon=true#tag/Clusters/operation/getCluster #5688

Closed
bryan-bar opened this issue May 25, 2024 · 2 comments

Comments

@bryan-bar
Copy link

Summary

https://portal.biganimal.com/api/v3/projects/{projectId}/clusters/{clusterId} api response does not match https://portal.biganimal.com/api/docs/?beacon=true#tag/Clusters/operation/getCluster documenation and needs to be updated.

Where did you see the problem?

getCluster now returns an array within data:

{
  "data": [
    {
      "clusterId": "p-bxn8z7s1ur",
      "clusterName": "mydb2-a3679447",
      "clusterArchitecture": {
        "clusterArchitectureId": "single",
        "clusterArchitectureName": "Single Node",
        "nodes": 1,
        "witnessNodes": 0
      },
      "privateNetworking": false,
      "peAllowedPrincipalIds": [],
      "serviceAccountIds": [],
      "backupRetentionPeriod": "1d",
      "beaconAgent": {
        "isEnabled": true,
        "schemaCollection": false
      },
      "cspAuth": false,
      "clusterType": "cluster",
      "phase": "Cluster creation request received",
      "replicas": 1,
      "createdAt": {
        "seconds": 1716618566,
        "nanos": 2329000
      },
      "extensions": [],
      "farawayReplicaIds": [],
      "allowedIpRanges": [
        {
          "cidrBlock": "10.0.0.0/24",
          "description": "default description"
        },
        {
          "cidrBlock": "127.0.0.1/32",
          "description": "localhost"
        },
        {
          "cidrBlock": "68.96.114.123/32",
          "description": "Service CIDR"
        }
      ],
      "pgConfig": [
        {
          "name": "tcp_keepalives_interval",
          "value": "30"
        },
        {
          "name": "bdr.raft_group_election_timeout",
          "value": "10s"
        },
        {
          "name": "shared_buffers",
          "value": "((0.25 * ram) > 80GB) ? 80GB : (0.25 * ram)"
        },
        {
          "name": "wal_sender_timeout",
          "value": "3600000"
        },
        {
          "name": "bdr.raft_global_election_timeout",
          "value": "20s"
        },
        {
          "name": "checkpoint_completion_target",
          "value": "0.9"
        },
        {
          "name": "wal_buffers",
          "value": "64MB"
        },
        {
          "name": "cpu_tuple_cost",
          "value": "0.03"
        },
        {
          "name": "effective_cache_size",
          "value": "0.75 * ram"
        },
        {
          "name": "tcp_keepalives_idle",
          "value": "120"
        },
        {
          "name": "wal_receiver_timeout",
          "value": "3600000"
        },
        {
          "name": "wal_compression",
          "value": "on"
        },
        {
          "name": "random_page_cost",
          "value": "1.25"
        },
        {
          "name": "maintenance_work_mem",
          "value": "(0.15 * (ram - shared_buffers) / autovacuum_max_workers) > 1GB ? 1GB : (0.15 * (ram - shared_buffers) / autovacuum_max_workers)"
        },
        {
          "name": "superuser_reserved_connections",
          "value": "10"
        },
        {
          "name": "bdr.writer_input_queue_size",
          "value": "32MB"
        },
        {
          "name": "work_mem",
          "value": "16000"
        },
        {
          "name": "autovacuum_max_workers",
          "value": "5"
        },
        {
          "name": "autovacuum_vacuum_cost_limit",
          "value": "3000"
        },
        {
          "name": "max_worker_processes",
          "value": "64"
        },
        {
          "name": "max_connections",
          "value": "300"
        },
        {
          "name": "checkpoint_timeout",
          "value": "15min"
        }
      ],
      "pgType": {
        "pgTypeId": "epas",
        "pgTypeName": "EDB Postgres Advanced Server"
      },
      "pgVersion": {
        "pgVersionId": "16",
        "pgVersionName": "16"
      },
      "pgIdentity": "",
      "provider": {
        "cloudProviderId": "bah:aws",
        "cloudProviderName": "AWS"
      },
      "readOnlyConnections": false,
      "region": {
        "regionId": "us-east-1",
        "regionName": "US East 1"
      },
      "instanceType": {
        "instanceTypeId": "aws:c5.large",
        "instanceTypeName": "c5.large",
        "category": "Compute Optimized",
        "cpu": 2,
        "ram": 4,
        "familyName": "AWS EC2 C5 Instances",
        "architecture": "amd64",
        "localDeviceStorageGb": 0
      },
      "storage": {
        "volumePropertiesId": "gp3",
        "volumePropertiesName": "gp3 (1 Gi - 16384 Gi, 3000 IOPS, 125 MiB/s tput)",
        "volumeTypeId": "gp3",
        "volumeTypeName": "General Purpose SSD (gp3)",
        "iops": "3000",
        "size": "32 Gi",
        "throughput": "125"
      },
      "connection": {
        "databaseName": "",
        "pgUri": "postgresql://@:/",
        "port": "",
        "readOnlyPgUri": "",
        "readOnlyPort": "",
        "readOnlyServiceName": "",
        "serviceName": "",
        "username": "",
        "readWritePgBouncer": {
          "serviceName": "",
          "databaseName": "",
          "port": "",
          "username": "",
          "pgUri": ""
        },
        "readOnlyPgBouncer": {
          "serviceName": "",
          "databaseName": "",
          "port": "",
          "username": "",
          "pgUri": ""
        }
      },
      "resizingPvc": [],
      "conditions": [],
      "evaluatedPgConfig": [
        {
          "name": "bdr.writer_input_queue_size",
          "value": "32768"
        },
        {
          "name": "bdr.raft_group_election_timeout",
          "value": "10000"
        },
        {
          "name": "wal_buffers",
          "value": "8192"
        },
        {
          "name": "wal_sender_timeout",
          "value": "3600000"
        },
        {
          "name": "maintenance_work_mem",
          "value": "94372"
        },
        {
          "name": "checkpoint_completion_target",
          "value": "0.9"
        },
        {
          "name": "work_mem",
          "value": "16000"
        },
        {
          "name": "effective_cache_size",
          "value": "393216"
        },
        {
          "name": "shared_buffers",
          "value": "131072"
        },
        {
          "name": "max_worker_processes",
          "value": "64"
        },
        {
          "name": "cpu_tuple_cost",
          "value": "0.03"
        },
        {
          "name": "wal_receiver_timeout",
          "value": "3600000"
        },
        {
          "name": "tcp_keepalives_interval",
          "value": "30"
        },
        {
          "name": "max_connections",
          "value": "300"
        },
        {
          "name": "autovacuum_max_workers",
          "value": "5"
        },
        {
          "name": "bdr.raft_global_election_timeout",
          "value": "20000"
        },
        {
          "name": "wal_compression",
          "value": "on"
        },
        {
          "name": "random_page_cost",
          "value": "1.25"
        },
        {
          "name": "checkpoint_timeout",
          "value": "900"
        },
        {
          "name": "tcp_keepalives_idle",
          "value": "120"
        },
        {
          "name": "autovacuum_vacuum_cost_limit",
          "value": "3000"
        },
        {
          "name": "superuser_reserved_connections",
          "value": "10"
        }
      ],
      "replicaSourceClusterId": "",
      "metricsUrl": "",
      "metricsServiceName": "",
      "logsUrl": "",
      "roleOrServiceAccountForLogs": "",
      "maintenanceInProgress": false,
      "maintenanceWindow": {
        "isEnabled": false,
        "startDay": 0,
        "startTime": "00:00"
      },
      "superuserAccess": false,
      "canAddFarawayReplica": true,
      "walStorage": {
        "volumePropertiesId": "gp3",
        "volumePropertiesName": "gp3 (1 Gi - 16384 Gi, 3000 IOPS, 125 MiB/s tput)",
        "volumeTypeId": "gp3",
        "volumeTypeName": "General Purpose SSD (gp3)",
        "iops": "3000",
        "size": "32 Gi",
        "throughput": "125"
      },
      "pgBouncer": {
        "isEnabled": false
      },
      "monitoringReady": false,
      "tags": [],
      "groups": [
        {
          "clusterName": "mydb2-a3679447",
          "clusterArchitecture": {
            "clusterArchitectureId": "single",
            "clusterArchitectureName": "Single Node",
            "nodes": 1,
            "witnessNodes": 0
          },
          "privateNetworking": false,
          "peAllowedPrincipalIds": [],
          "serviceAccountIds": [],
          "backupRetentionPeriod": "1d",
          "beaconAgent": {
            "isEnabled": true,
            "schemaCollection": false
          },
          "cspAuth": false,
          "clusterType": "cluster",
          "phase": "Cluster creation request received",
          "replicas": 1,
          "createdAt": {
            "seconds": 1716618566,
            "nanos": 2329000
          },
          "extensions": [],
          "farawayReplicaIds": [],
          "allowedIpRanges": [
            {
              "cidrBlock": "10.0.0.0/24",
              "description": "default description"
            },
            {
              "cidrBlock": "127.0.0.1/32",
              "description": "localhost"
            },
            {
              "cidrBlock": "68.96.114.123/32",
              "description": "Service CIDR"
            }
          ],
          "pgConfig": [
            {
              "name": "tcp_keepalives_interval",
              "value": "30"
            },
            {
              "name": "bdr.raft_group_election_timeout",
              "value": "10s"
            },
            {
              "name": "shared_buffers",
              "value": "((0.25 * ram) > 80GB) ? 80GB : (0.25 * ram)"
            },
            {
              "name": "wal_sender_timeout",
              "value": "3600000"
            },
            {
              "name": "bdr.raft_global_election_timeout",
              "value": "20s"
            },
            {
              "name": "checkpoint_completion_target",
              "value": "0.9"
            },
            {
              "name": "wal_buffers",
              "value": "64MB"
            },
            {
              "name": "cpu_tuple_cost",
              "value": "0.03"
            },
            {
              "name": "effective_cache_size",
              "value": "0.75 * ram"
            },
            {
              "name": "tcp_keepalives_idle",
              "value": "120"
            },
            {
              "name": "wal_receiver_timeout",
              "value": "3600000"
            },
            {
              "name": "wal_compression",
              "value": "on"
            },
            {
              "name": "random_page_cost",
              "value": "1.25"
            },
            {
              "name": "maintenance_work_mem",
              "value": "(0.15 * (ram - shared_buffers) / autovacuum_max_workers) > 1GB ? 1GB : (0.15 * (ram - shared_buffers) / autovacuum_max_workers)"
            },
            {
              "name": "superuser_reserved_connections",
              "value": "10"
            },
            {
              "name": "bdr.writer_input_queue_size",
              "value": "32MB"
            },
            {
              "name": "work_mem",
              "value": "16000"
            },
            {
              "name": "autovacuum_max_workers",
              "value": "5"
            },
            {
              "name": "autovacuum_vacuum_cost_limit",
              "value": "3000"
            },
            {
              "name": "max_worker_processes",
              "value": "64"
            },
            {
              "name": "max_connections",
              "value": "300"
            },
            {
              "name": "checkpoint_timeout",
              "value": "15min"
            }
          ],
          "pgType": {
            "pgTypeId": "epas",
            "pgTypeName": "EDB Postgres Advanced Server"
          },
          "pgVersion": {
            "pgVersionId": "16",
            "pgVersionName": "16"
          },
          "pgIdentity": "",
          "provider": {
            "cloudProviderId": "bah:aws",
            "cloudProviderName": "AWS"
          },
          "readOnlyConnections": false,
          "region": {
            "regionId": "us-east-1",
            "regionName": "US East 1"
          },
          "instanceType": {
            "instanceTypeId": "aws:c5.large",
            "instanceTypeName": "c5.large",
            "category": "Compute Optimized",
            "cpu": 2,
            "ram": 4,
            "familyName": "AWS EC2 C5 Instances",
            "architecture": "amd64",
            "localDeviceStorageGb": 0
          },
          "storage": {
            "volumePropertiesId": "gp3",
            "volumePropertiesName": "gp3 (1 Gi - 16384 Gi, 3000 IOPS, 125 MiB/s tput)",
            "volumeTypeId": "gp3",
            "volumeTypeName": "General Purpose SSD (gp3)",
            "iops": "3000",
            "size": "32 Gi",
            "throughput": "125"
          },
          "connection": {
            "databaseName": "",
            "pgUri": "postgresql://@:/",
            "port": "",
            "readOnlyPgUri": "",
            "readOnlyPort": "",
            "readOnlyServiceName": "",
            "serviceName": "",
            "username": "",
            "readWritePgBouncer": {
              "serviceName": "",
              "databaseName": "",
              "port": "",
              "username": "",
              "pgUri": ""
            },
            "readOnlyPgBouncer": {
              "serviceName": "",
              "databaseName": "",
              "port": "",
              "username": "",
              "pgUri": ""
            }
          },
          "resizingPvc": [],
          "conditions": [],
          "evaluatedPgConfig": [
            {
              "name": "bdr.writer_input_queue_size",
              "value": "32768"
            },
            {
              "name": "bdr.raft_group_election_timeout",
              "value": "10000"
            },
            {
              "name": "wal_buffers",
              "value": "8192"
            },
            {
              "name": "wal_sender_timeout",
              "value": "3600000"
            },
            {
              "name": "maintenance_work_mem",
              "value": "94372"
            },
            {
              "name": "checkpoint_completion_target",
              "value": "0.9"
            },
            {
              "name": "work_mem",
              "value": "16000"
            },
            {
              "name": "effective_cache_size",
              "value": "393216"
            },
            {
              "name": "shared_buffers",
              "value": "131072"
            },
            {
              "name": "max_worker_processes",
              "value": "64"
            },
            {
              "name": "cpu_tuple_cost",
              "value": "0.03"
            },
            {
              "name": "wal_receiver_timeout",
              "value": "3600000"
            },
            {
              "name": "tcp_keepalives_interval",
              "value": "30"
            },
            {
              "name": "max_connections",
              "value": "300"
            },
            {
              "name": "autovacuum_max_workers",
              "value": "5"
            },
            {
              "name": "bdr.raft_global_election_timeout",
              "value": "20000"
            },
            {
              "name": "wal_compression",
              "value": "on"
            },
            {
              "name": "random_page_cost",
              "value": "1.25"
            },
            {
              "name": "checkpoint_timeout",
              "value": "900"
            },
            {
              "name": "tcp_keepalives_idle",
              "value": "120"
            },
            {
              "name": "autovacuum_vacuum_cost_limit",
              "value": "3000"
            },
            {
              "name": "superuser_reserved_connections",
              "value": "10"
            }
          ],
          "replicaSourceClusterId": "",
          "metricsUrl": "",
          "metricsServiceName": "",
          "logsUrl": "",
          "roleOrServiceAccountForLogs": "",
          "maintenanceInProgress": false,
          "maintenanceWindow": {
            "isEnabled": false,
            "startDay": 0,
            "startTime": "00:00"
          },
          "superuserAccess": false,
          "canAddFarawayReplica": true,
          "walStorage": {
            "volumePropertiesId": "gp3",
            "volumePropertiesName": "gp3 (1 Gi - 16384 Gi, 3000 IOPS, 125 MiB/s tput)",
            "volumeTypeId": "gp3",
            "volumeTypeName": "General Purpose SSD (gp3)",
            "iops": "3000",
            "size": "32 Gi",
            "throughput": "125"
          },
          "pgBouncer": {
            "isEnabled": false
          },
          "monitoringReady": false,
          "groupId": "p-bxn8z7s1ur"
        }
      ]
    }
  ]
}

Expected behavior

I was previously able to use data.phase to check the status of a cluster since data was an object:

{
  "data": {
    "allowedIpRanges": [
      {
        "cidrBlock": "252.1.1.1/24",
        "description": "New York"
      },
      {
        "cidrBlock": "167.3.2.1/32",
        "description": "Boston"
      }
    ],
    "backupRetentionPeriod": "30d",
    "canAddFarawayReplica": true,
    "clusterArchitecture": {
      "clusterArchitectureId": "ha",
      "clusterArchitectureName": "High Availability",
      "nodes": 3
    },
    "clusterName": "My Cluster",
    "clusterType": "cluster",
    "conditions": [
      {
        "conditionStatus": "True",
        "reason": "DiskConfigured",
        "message": "Configured",
        "type": "DiskTuner"
      }
    ],
    "connection": {
      "databaseName": "postgres",
      "pgUri": "postgresql://[email protected]:5432/edb_admin",
      "port": "5432",
      "readOnlyPgUri": "postgresql://[email protected]:5432/edb_admin",
      "readOnlyPort": "5432",
      "readOnlyServiceName": "my-cluster-r",
      "serviceName": "my-cluster-rw",
      "username": "postgres"
    },
    "createdAt": {
      "nanos": 123,
      "seconds": 1651658876
    },
    "cspAuth": false,
    "farawayReplicaIds": [
      "p-cluster123",
      "p-cluster456"
    ],
    "instanceType": {
      "architecture": "amd64",
      "category": "General Purpose",
      "cpu": 16,
      "familyName": "Standard DSv3 Family vCPUs",
      "instanceTypeId": "azure:Standard_D16s_v3",
      "instanceTypeName": "D16s v3",
      "ram": 64
    },
    "lbPeProps": {
      "p-abcdkx0v8c-rw-internal-lb-es": {
        "props": {
          "loadBalancerServiceName": "p-abcdkx0v8c-rw-internal-lb",
          "privateDNSName": "p2.abcdmuzzzjl5qzkb.vc.enterprisedb.network",
          "serviceID": "vpce-svc-12346d1cdf56d2fe9",
          "serviceName": "com.amazonaws.vpce.eu-west-1.vpce-svc-12346d1cdf56d4321",
          "type": "READ_WRITE"
        }
      }
    },
    "logsUrl": "https://edblogsz5man8lp.blob.core.windows.net/biganimal-logs",
    "maintenanceInProgress": false,
    "maintenanceWindow": {
      "isEnabled": true,
      "startDay": 3,
      "startTime": "22:00"
    },
    "metricsServiceName": "com.amazonaws.vpce.eu-central-1.vpce-svc-000123c2a8c60f60f",
    "metricsUrl": "http://m-azurewestus3-12.9c8oayl9z2ob1kkp.enterprisedb.network:10902",
    "monitoringReady": false,
    "pgBouncer": {
      "isEnabled": true,
      "settings": [
        {
          "operation": "read-write",
          "name": "admin_users",
          "value": "test"
        }
      ]
    },
    "pgConfig": [
      {
        "name": "application_name",
        "value": "restore-test"
      },
      {
        "name": "array_nulls",
        "value": "off"
      }
    ],
    "pgIdentity": "aws-arn-cascsa-asccscasc-sccasc",
    "pgType": {
      "pgTypeId": "epas",
      "pgTypeName": "EDB Postgres Advanced Server"
    },
    "pgVersion": {
      "pgVersionId": "13",
      "pgVersionName": "13"
    },
    "phase": "Modification in progress",
    "privateNetworking": false,
    "provider": {
      "cloudProviderId": "azure",
      "cloudProviderName": "Azure",
      "connected": false
    },
    "readOnlyConnections": false,
    "region": {
      "regionId": "australiaeast",
      "regionName": "(Asia Pacific) Australia East"
    },
    "replicaSourceClusterId": "",
    "resizingPvc": [],
    "roleOrServiceAccountForLogs": "arn:aws:iam::123456789123:role/ba-ABCDE123456EFGHQ-apsoutheast1-1",
    "storage": {
      "iops": "120",
      "size": "4 Gi",
      "throughput": "25",
      "volumePropertiesId": "P1",
      "volumePropertiesName": "P1 (4 Gi, 120 Provisioned IOPS, 25 Provisioned MB/s)",
      "volumeTypeId": "azurepremiumstorage",
      "volumeTypeName": "Azure Premium Storage"
    },
    "superuserAccess": false,
    "walStorage": {
      "iops": "120",
      "size": "4 Gi",
      "throughput": "25",
      "volumePropertiesId": "P1",
      "volumePropertiesName": "P1 (4 Gi, 120 Provisioned IOPS, 25 Provisioned MB/s)",
      "volumeTypeId": "azurepremiumstorage",
      "volumeTypeName": "Azure Premium Storage"
    },
    "clusterId": "p-123",
    "farawayReplicas": [],
    "groups": [],
    "replicas": 1
  }
}

Screenshots

No response

Browser / Platform

No response

Additional notes

No response

@djw-m
Copy link
Contributor

djw-m commented May 29, 2024

As a workaround, data[0].phase will work. This request is being passed to the BigAnimal team who take care of the API documentation.

@bryan-bar
Copy link
Author

@djw-m thank you

@djw-m djw-m closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants