vmware-archive / cfops

This is simply an automation that is based on the supported way to back up Pivotal Cloud Foundry
http://www.cfops.io
Apache License 2.0
35 stars 24 forks source link

Elastic Runtime Backup fails #36

Closed huberchrigu closed 8 years ago

huberchrigu commented 8 years ago

Hi

We used cfops for backing up Elastic Runtime 1.5, but since we upgraded to 1.6 it fails. The ops manager backup still works fine.

Example: ./cfops backup --omu ubuntu --omp xxx -d backup --tl 'opsmanager,er' --omh 192.168.5.1 --du admin --dp xxx invalid director credentials

Only the tile 'opsmanager' works. Above command fails obviously after ops manager was backed up completely.

We use the Elastic Runtime version 1.6.4 with Ops Manager 1.6.1 (vSphere), and cfops version v1.1.5.

Best regards, Christoph

huberchrigu commented 8 years ago

It looks like the installation.json format changed. So the bosh director's IP is just empty, because it could not be retrieved from json.

huberchrigu commented 8 years ago

No, not the format has changed, just bosh's "product name". In elasticruntime.go, Product: "microbosh" needs to be replaced by Product: "p-bosh"

Then the IP can be read again. I will check whether this resolves all issues and how easy a switch can be implemented dependent on the version. Maybe it's better to add a configuration for this switch, as I do not know exactly when this changed. Maybe it changed in a minor upgrade?

huberchrigu commented 8 years ago

If you want my fix, you can merge https://github.com/huberchrigu/cfops/tree/feature/cf-1.6. I could not change the log level, so I used fmt.Printf to warn when a product's metadata cannot be parsed to ensure that the failure can be seen quicker in the future.

xchapter7x commented 8 years ago

Please try this pre-release build with the env var ER_VERSION=1.6 set. https://github.com/pivotalservices/cfops/releases/tag/v1.1.18

I will remove the pre-release flag once I pull can pull in some more 1.6 data from live systems to provide a more complete test suite.

huberchrigu commented 8 years ago

This works fine. Thanks!