-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default PodManagementPolicy for StatefulSet is set to OrderedReadyPodManagement, which means it only creates new pods when the previous one is ready. However, to start the pods the Swift ring file ConfigMap is needed, and this in turn is only created once all requested pods are started and their PVCs are bound (because it needs information on the PVCs to be used). If the instance is scaled by more than 1 (which is the case also for starting with 3 replicas), it failed. This is a regression to previous behaviour, introduced by changes to the ring setup. Previously the ring rebalance did not wait until all PVCs where bound, but estimated their size and updated the rings afterwards with the correct size. This required ring rebalances and data movements even for new deployments. Therefore changing the policy to ParallelPodManagement, wich starts the number of requested pods immediately. This does only affect scaling, not updates. The kuttl tests has been updated to avoid regressions in the future.
- Loading branch information
Showing
5 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/kuttl/tests/basic-deploy/02-assert-scaleup-swift.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: swift-storage-0 | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: swift-storage-1 | ||
status: | ||
phase: Running | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: swift-storage-2 | ||
status: | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: | | ||
oc patch -n swift-kuttl-tests swift/swift --type='json' -p='[{"op": "replace", "path": "/spec/swiftStorage/replicas", "value":3}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.