Skip to content

Commit

Permalink
Merge pull request #90 from form3tech-oss/sergii-add-more-retries-to-…
Browse files Browse the repository at this point in the history
…hv-recovery

Split recovery into phases to use parallel steps better
  • Loading branch information
sshutovskyi-f3 committed Sep 17, 2024
2 parents 37ad69b + 7168c7b commit 29046a4
Show file tree
Hide file tree
Showing 10 changed files with 296 additions and 147 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
key: ${{ inputs.images-cache-key }}

- name: Upload saved images
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.images-artifact-name }}
path: ./output/saved-images
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
key: ${{ inputs.e2e-binary-cache-key }}

- name: Upload e2e binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.e2e-binary-name }}
path: ./e2e-test/image/e2e/bin
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
echo "chart-name=$chart_name" >> $GITHUB_OUTPUT
- name: Upload chart
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.chart-artifact-name }}
path: ${{ steps.build-chart.outputs.chart-path }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ jobs:
steps:
- name: Download saved images
id: download-images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-targets.outputs.images-artifact-name }}
path: ./output/${{ needs.build-targets.outputs.images-artifact-name }}

- name: Download chart
id: download-chart
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-targets.outputs.chart-artifact-name }}
path: ./output/${{ needs.build-targets.outputs.chart-artifact-name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
uses: actions/checkout@v2

- name: download saved images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ inputs.images-artifact-name }}
path: ./output/saved-images

- name: download e2e binary
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ inputs.e2e-binary-name }}
path: ./output/e2e-binary
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Download saved images
id: download-images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ inputs.images-artifact-name }}
path: ./output/${{ inputs.images-artifact-name }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Post run - upload kubernetes cluster info dump
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: integration-test-kubernetes-cluster-info-dump
path: cluster-info-dump
Expand Down
13 changes: 13 additions & 0 deletions api/v1alpha1/cloudstackhostchaos_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ type CloudStackHostChaosSpec struct {
// CloudStackHostChaosStatus represents the status of a CloudStackChaos.
type CloudStackHostChaosStatus struct {
ChaosStatus `json:",inline"`

// Instances keeps track of the affected hosts and vms
// +optional
Instances map[string]CloudStackHostAffected `json:"affectedHosts,omitempty"`
}

type CloudStackHostAffected struct {
Name string `json:"name,omitempty"`
VMs []string `json:"vms,omitempty"`
}

type CloudStackHostChaosSelector struct {
Expand Down Expand Up @@ -116,3 +125,7 @@ func (selector *CloudStackHostChaosSelector) Id() string {
func (obj *CloudStackHostChaos) GetSelectorSpecs() map[string]interface{} {
return map[string]interface{}{".": &obj.Spec.Selector}
}

func (obj *CloudStackHostChaos) GetCustomStatus() interface{} {
return &obj.Status.Instances
}
27 changes: 27 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/crd/bases/chaos-mesh.org_cloudstackhostchaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ spec:
status:
description: CloudStackHostChaosStatus represents the status of a CloudStackChaos.
properties:
affectedHosts:
additionalProperties:
properties:
name:
type: string
vms:
items:
type: string
type: array
type: object
description: Instances keeps track of the affected hosts and vms
type: object
conditions:
description: Conditions represents the current global condition of
the chaos
Expand Down
Loading

0 comments on commit 29046a4

Please sign in to comment.