Skip to content

Commit

Permalink
fix sanity test
Browse files Browse the repository at this point in the history
Signed-off-by: shubham <[email protected]>
  • Loading branch information
shubham14bajpai committed Jul 12, 2021
1 parent ef3577f commit 61035ae
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ jobs:

- name: Running tests
run: |
kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/master/k8s/openebs-operator.yaml
kubectl apply -f https://openebs.github.io/charts/hostpath-operator.yaml
kubectl apply -f deploy/hostpath-sc.yaml
kubectl apply -f deploy/operator.yaml
kubectl apply -f deploy/jiva-csi.yaml
./ci/ci.sh
Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func main() {
os.Exit(1)
}

duration := 5 * time.Second
duration := 30 * time.Second

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Expand Down
24 changes: 24 additions & 0 deletions deploy/hostpath-sc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#Sample storage classes for OpenEBS Local PV
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-hostpath
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
# hostpath type will create a PV by
# creating a sub-directory under the
# BASEPATH provided below.
- name: StorageType
value: "hostpath"
# Specify the location (directory) where
# where PV(volume) data will be saved.
# A sub-directory with pv-name will be
# created. When the volume is deleted,
# the PV sub-directory will be deleted.
#Default value is /var/openebs/local
- name: BasePath
value: "/var/openebs/local/"
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
4 changes: 2 additions & 2 deletions pkg/controllers/jivavolume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (r *JivaVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
// log err only, as controller must be in container creating state
// don't return err as it will dump stack trace unneccesary
logrus.Infof("failed to get controller pod ip for volume %s: %s", instance.Name, err.Error())
time.Sleep(5 * time.Second)
time.Sleep(1 * time.Second)
}
}

Expand Down Expand Up @@ -1233,7 +1233,7 @@ func (r *JivaVolumeReconciler) getAndUpdateVolumeStatus(cr *openebsiov1alpha1.Ji
err = r.updatePodIPMap(cr)
if err != nil {
logrus.Infof("failed to get controller pod ip for volume %s: %s", cr.Name, err.Error())
time.Sleep(5 * time.Second)
time.Sleep(1 * time.Second)
}
}

Expand Down

0 comments on commit 61035ae

Please sign in to comment.