GoogleCloudPlatform / terraform-google-backup-dr

Deploy Backup and DR appliances
https://registry.terraform.io/modules/GoogleCloudPlatform/backup-dr/google
Apache License 2.0
5 stars 5 forks source link

Should actifio_register ever return #13

Open dv01d opened 4 months ago

dv01d commented 4 months ago

Been trying to get this installed, and now that I have the actifio_session created, I can't get actifio_register data section to read at all. It just eventually times out after an hour. Here is the output, but essentially I cannot even do an apply as this happens in the plan phase of a terraform run:

╷
│ Error: Error making request
│ 
│   with module.appliances["backup-recovery-appliance-db01"].data.http.actifio_register[0],
│   on ../../modules/backup-dr/main.tf line 277, in data "http" "actifio_register":
│  277: data "http" "actifio_register" {
│ 
│ Error making request: POST https://bmc-changed-to-protect-the-innocent-dot-us-central1.backupdr.googleusercontent.com/actifio/cluster/register giving up after 21 attempt(s)
dv01d commented 4 months ago

Well, looks like it just takes a long while to return:

module.appliances["backup-recovery-appliance-db01"].data.http.actifio_register[0]: Still reading... [17h17m3s elapsed]
module.appliances["backup-recovery-appliance-db01"].data.http.actifio_register[0]: Still reading... [17h17m13s elapsed]
module.appliances["backup-recovery-appliance-db01"].data.http.actifio_register[0]: Read complete after 17h17m20s
dv01d commented 4 months ago

Hmm, well it wouldn't apply, likely due to the access token expiring for actifio_session:

│ Error: Error making request
│ 
│   with module.appliances["backup-recovery-appliance-db01"].data.http.actifio_session[0],
│   on ../../modules/backup-dr/main.tf line 259, in data "http" "actifio_session":
│  259: data "http" "actifio_session" {
│ 
│ Error making request: POST https://bmc-changed-to-protect-the-innocent-dot-us-central1.backupdr.googleusercontent.com/actifio/session giving up after 1 attempt(s)
dv01d commented 4 months ago

I dug through the API. and looks like the register endpoint is nonexistant. I was able to change this to just the cluster and get this created. Would you like a PR?

data "http" "actifio_register" {
  count  = var.ba_registration ? 1 : 0
  url    = "${var.management_server_endpoint}/cluster"
dv01d commented 4 months ago

N/m that didn't work to register, but only allows the TF code to succeed. Looks like that API just doesn't exist: https://cloud.google.com/static/backup-disaster-recovery/docs/api/ManagementConsoleAPISpec.pdf Would love to understand when this is released and should work.

yeskaydee commented 2 months ago

Hi @dv01d , I have been trying this with the custom subnet and was getting the same error.

But it worked fine for default subnet.. my guess is that it is something related to if the new appliance being created is able to read the bmc url, which i think is restricted using some firewall rules.

Update: Copied all the default firewall rules to custom vpc network it worked. specifically default-allow-internal firewall

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days