1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Merge pull request #501 from lockstone/master

Fix for Aurora Server Provisioning.
This commit is contained in:
Wesley Beary 2019-02-06 13:51:37 -06:00 committed by GitHub
commit eed2abeaad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View file

@ -23,7 +23,15 @@ module Fog
attr_accessor :storage_encrypted #not in the response
def ready?
state == "available" || state == 'active'
# [2019.01] I don't think this is going to work, at least not with Aurora
# clusters. In my testing, the state reported by Fog for an Aurora cluster
# is "active" as soon as the cluster is retrievable from AWS, and the
# value doesn't change after that. Contrast that with the AWS Console UI,
# which reports the cluster as "Creating" while it's being created. I don't
# know where Fog is getting the state value from, but I don't think it's
# correct, at least not for the purpose of knowing if the Cluster is ready
# to have individual instances added to it.
state == 'available' || state == 'active'
end
def snapshots

View file

@ -118,14 +118,14 @@ module Fog
else
requires :engine
if engine == 'aurora'
if engine.start_with?('aurora')
requires :cluster_id
self.flavor_id ||= 'db.r3.large'
self.flavor_id ||= 'db.r4.large'
else
requires :master_username
requires :password
requires :allocated_storage
self.flavor_id ||= 'db.m1.small'
self.flavor_id ||= 'db.m4.large'
end
data = service.create_db_instance(id, attributes_to_params)