cf-drain-cli icon indicating copy to clipboard operation
cf-drain-cli copied to clipboard

Space drain create attempts to read my application manifest

Open adborden opened this issue 3 years ago • 2 comments

I'm running cf drain-space from my logstack repo which contains a manifest.yml and vars.yml to supply attributes. When the drains plugin tries to push the space drain application, it reads my manifest but then fails to parse it because the vars.yml isn't specified.

$ cf drain-space --drain-name ${app_name}-space-drain ${logstash_url}
Downloading latest space drain from github...
Done downloading space drain from github.
Error reading manifest file:
Invalid value for 'memory': ((logstash_memory))M
Byte quantity must be an integer with a unit of measurement like M, MB, G, or GB
strconv.Atoi: parsing "((logstash_instances))": invalid syntax
'routes' should be a list

strconv.Atoi: parsing "((kibana_instances))": invalid syntax
'routes' should be a list

As a work-around, I'm cd'ing to a temp directory before calling cf drain-space.

This brings up another question (and I can open a new issue for it), should I be providing a manifest for the space drain application? Should it be running with more than one instance since it represents a production service?

adborden avatar Mar 11 '21 00:03 adborden

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Mar 11 '21 00:03 cf-gitbot

Contrary view: I like being able to specify a manifest.yml for the space_drain app. I use this to:

  • set the memory to 64MB (it doesn't need more)
  • set the name through the manifest, using a vars.yaml file
  • set no-route: true
    • I use this to avoid the route-name collisions in #27; no external traffic is expected.

However, it is very confusing if it picks up an existing manifest.yml.

I would like to see explicit flags added:

  • --manifest <file> - specify a manifest file to use
  • --vars-file <file> - specify a vars file to use with the manifest

I'd also like to see the defaults set to 64M and no-route: true so that use of a manifest.yml is only necessary when you want to do additional customization!

mogul avatar Jan 13 '22 04:01 mogul