Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit 9a6d796

Browse files
authored
Ignore expelled instance in cartridge_get_disabled_instances (#414)
Closes #412 Before the patch, if an expelled instance wasn't ignored in `cartridge_get_disabled_instances`. So, check for `All instances in cluster has different topology configs` didn't work correctly. Now, it possible to use the role, when an expelled instance has different config.
1 parent 1daac26 commit 9a6d796

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ README.md to use the newest tag with new release
1818
### Fixed
1919

2020
- Remove old app configurations before uploading a new one
21-
- Allow to downgrade RPMs and DEBs
21+
- Allow downgrading RPM and DEB packages
22+
- Ignore disabled instances when counting disabled instances
2223

2324
## [1.12.0] - 2022-03-03
2425

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ cartridge_cached_fact_names_by_target:
332332
count_disabled_instances:
333333
- instance_info
334334
- disabled
335+
- expelled
335336
facts_for_machines:
336337
- expelled
337338
- disabled

library/cartridge_get_disabled_instances.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def count_cluster_disabled_instances(module_hostvars, play_hosts, ignore_split_b
3838
lambda name: all([
3939
get_disabled_instances_from_instance_config(module_hostvars[name]) is not None,
4040
get_topology_checksum_from_instance_config(module_hostvars[name]) is not None,
41+
not helpers.is_expelled(module_hostvars[name]),
4142
]),
4243
play_hosts,
4344
))

unit/test_get_cached_facts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def test_get_cached_facts(self):
6969
},
7070
'count_disabled_instances': {
7171
'instance_1': {
72+
'expelled': True,
7273
'instance_info': {
7374
'disabled_instances': [],
7475
},

0 commit comments

Comments
 (0)