BBR backup-cleanup command fails with "No API endpoint set"
search cancel

BBR backup-cleanup command fails with "No API endpoint set"

book

Article ID: 297432

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

When attempting to run the bbr backup-cleanup command, it fails with the following:
 
[bbr] 2023/07/28 09:09:40 INFO - Finished running post-backup-unlock scripts.
1 error occurred:
error 1:
1 error occurred:
error 1:
Error attempting to run post-backup-unlock for job lock-unlock-pcf-autoscaling on backup_restore/96b7783e-eb2d-4558-8837-01920e6e956d: No API endpoint set. Use 'cf login' or 'cf api' to target an endpoint.
No API endpoint set. Use 'cf login' or 'cf api' to target an endpoint.



Resolution

This is an issue introduced in the following versions of TAS:
  • 2.11.42
  • 2.13.24
  • 3.0.14
  • 4.0.5

This has been fixed in the following versions of TAS:
  • 2.11.43
  • 2.13.25
  • 3.0.15
  • 4.0.6

As a workaround, the script can be edited manually. To do this:
  1. bosh ssh to the backup_restore VM in the CF deployment
  2. vim /var/vcap/jobs/lock-unlock-pcf-autoscaling/bin/bbr/post-backup-unlock
  3. Replace the following lines of code:
Line 14:
if [ ! authenticated ]; then
Replace with:
if [ "$authenticated" != true ]; then
Line 40:
if [ ! targeted ]; then
Replace with:
if [ "$targeted" != true ]; then
Line 50:
 if [ ! app_found ]; then
Replace with:
 if [ "$app_found" != true ]; then