openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

mode initdb should not drop the subjects database

Open lehoanganh opened this issue 10 years ago • 6 comments

  1. remove initdb mode
  2. move create immortal db stuff to common initdb.yml that gets included by both cloudant and couch roles
  3. initdb.yml does this:
  4. check if subjects db exists
  5. if yes, do nothing
  6. if no, create it. add initial keys

This way there is no way ever that a user can accidentally drop subjects db by means of our playbooks. If the user really wants to drop the subjects db, they have to manually log into cloudant and manually drop it there. No automatic way exists anymore.

FYI: @domdom82 @rabbah @sjfink @jeremiaswerner

lehoanganh avatar Jun 07 '16 07:06 lehoanganh

@lehoanganh thanks, I like it... now we are clean in the deployment playbooks and have no database wipe or initdb included, everything must be done explicitly.

jeremiaswerner avatar Jun 07 '16 07:06 jeremiaswerner

Database for entities continues to be wiped implicitly by the deployment process, right?

markusthoemmes avatar Jun 07 '16 07:06 markusthoemmes

yes, that's correct. wipe.yml is called in jenkins and UCD flows directly. In UCD we additionally introduce a process flag doWipe=true/false for deployTest.

jeremiaswerner avatar Jun 07 '16 07:06 jeremiaswerner

So we have to delete the subjects database manually, while we have processes for the entities database, which is equally precious? That seems inconsistent to me.

markusthoemmes avatar Jun 07 '16 08:06 markusthoemmes

whisk db can be wiped or not wiped, depends on which purpose

ci deployment: yes, fresh installation, wipe dev development: yes and no, one can choose before each installation

subjects db is important, so it should not be dropped and recreated once it's already there cause it is potentially shared between multiple users

lehoanganh avatar Jun 07 '16 08:06 lehoanganh

As a result of a more thorough discussion of the problem, we agreed to continue on the path layed out above.

Concerns included:

  • Why would we tell the developer to delete subjects db manually, but deliver a process to delete the equally important entities database?
  • This induces inconsistencies in the handling of those two databases.

Important to note is, that the subjects database can be shared in many environments, which raises the importance of not deleting it, even if the entities database is removed frequently.

markusthoemmes avatar Jun 07 '16 08:06 markusthoemmes