Skip to content

Commit 5795157

Browse files
authored
Merge pull request #738 from globocom/fixing_bugs_add_instance
Fixing bugs to add new read only instances, waiting create dns and ad…
2 parents a2f10ab + 827b81c commit 5795157

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dbaas/drivers/replication_topologies/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def get_add_database_instances_first_steps(self):
240240
'workflow.steps.util.host_provider.AllocateIP',
241241
'workflow.steps.util.host_provider.CreateVirtualMachine',
242242
'workflow.steps.util.dns.CreateDNS',
243+
'workflow.steps.util.dns.CheckIsReady',
243244
'workflow.steps.util.vm.WaitingBeReady',
244245
'workflow.steps.util.vm.UpdateOSDescription',
245246
'workflow.steps.util.volume_provider.NewVolume',

dbaas/logical/services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def execute(self):
9595

9696
max_read_hosts = Configuration.get_by_name_as_int('max_read_hosts', 5)
9797
qtd_new_hosts = self.number_of_instances
98-
current_read_nodes = len(self.database.infra.instances.filter(read_only=True))
98+
current_read_nodes = len(self.database.infra.instances.filter(read_only=True, status=1))
9999
total_read_hosts = qtd_new_hosts + current_read_nodes
100100
if total_read_hosts > max_read_hosts:
101101
raise exceptions.ReadOnlyHostsLimit(

0 commit comments

Comments
 (0)