sealuzh / cloud-stove

The Cloud Stove Backend
https://api.thestove.io
Apache License 2.0
4 stars 0 forks source link

Re-run provider updaters to obtain new instances #160

Closed joe4dev closed 7 years ago

joe4dev commented 7 years ago

Amazon added the following instance types (see https://aws.amazon.com/ec2/instance-types/p2/): m4.16xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge

Depends on: PR #158

⚠️ Do not run any provider updater until #158 is merged because this would invalidate all recommendations !!!

inz commented 7 years ago

Doesn't the AmazonUpdater create/update resources using #find_or_create_with?

On Monday, October 10, 2016, Joel Scheuner notifications@github.com wrote:

Amazon added the following instance types (see https://aws.amazon.com/ec2/ instance-types/p2/): m4.16xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge

Depends on: PR #158 https://github.com/inz/cloud-stove/pull/158

⚠️ Do not run any provider updater until #158 https://github.com/inz/cloud-stove/pull/158 is merged because this would invalidate all recommendations !!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/inz/cloud-stove/issues/160, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAXndAeQze0hc6ZsiHmPdIducf8nekGks5qyhLqgaJpZM4KSa87 .

joe4dev commented 7 years ago

You're right 👍 (I tested it) I had issues earlier on with this but now all the provider updaters are migrated to use #find_or_create_by and as the resources do not get deleted anymore it should be fine.

Using the resource_code now identifies resources based on their inherent characteristics instead of their database id (host independent). This allows to remove legacy instances from the database by flushing and re-creating all resources. Otherwise, legacy instances would reside in the db forever or have to be removed manually.

joe4dev commented 7 years ago

Updated providers on staging and noticed that we already have 15 legacy instances (comparing Resource.count to pristine database locally :grimacing:

joe4dev commented 7 years ago

Successfully deployed latest version and updated providers in production 😀

NOTE: Leaving the legacy instances untouched because we currently have no safe way to delete resources without potentially breaking existing recommendations.