Giter Site home page Giter Site logo

dummy-broker-deregistrar-boshrelease's Introduction

Dummy Broker Deregister errand

Sad scenario with Pivotal Ops Manager

This BOSH release was created to help unf@#$ Pivotal Ops Manager when it wants to delete a service-broker Tile that never successfully deployed in the first place.

The scenario is that you've deployed a Tile to your Pivotal Ops Manager for a service broker. Somewhere in the deployment it fails. You decide to delete the broker tile. But you forget to disable the "Deregister Broker" errand first. So, eventually the Delete change fails:

Errand `broker-deregistrar' did not complete

Unfortunately now you cannot edit the Tile and disable the errand - its in a "being deleted" mode.

Solution

So, here's a solution: upload this release - with its broker-deregistrar errand - and switch out the deployment manifest for one that uses this release instead and only this release. Then Ops Manager will run this release's errand and it will finish successfully. And then Ops Manager will remove the Tile. And you can move on.

Steps

SSH into your Ops Manager VM:

ssh ubuntu@<opsmgr-ip>

Change to the directory where deployment manifests are stored:

cd /var/tempest/workspaces/default/deployments

Find your unhappy deployment manifest, make a backup, and edit the sad-tile.yml manifest.

sudo cp sad-tile.yml sad-tile.yml.backup
sudo vi sad-tile.yml

Replace releases: with just this dummy release:

releases:
- name: dummy-broker-deregistrar
  version: latest

Remove all jobs: except the broker-deregistrar errand; and change its templates: to use the new release:

jobs:
- name: broker-deregistrar
  templates:
  - name: broker-deregistrar
    release: dummy-broker-deregistrar
  lifecycle: errand
  instances: 1
  resource_pool: broker-deregistrar
  networks:
  - name: default
    default:
    - dns
    - gateway

In the terminal, target the BOSH and upload the release:

bosh target BOSHIP
bosh create release
bosh upload release

Next target your edited manifest and run the errand once:

bosh deployment sad-tile.yml
bosh -n deploy
bosh run errand broker-deregistrar

Running the errand manually confirms that the errand now successfully exits and does nothing.

Now, return to Ops Manager and press "Apply changes" again:

Eventually the Applying Changes verbose output will happily show:

dummy-broker-deregistrar-boshrelease's People

Contributors

drnic avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.