vmware-tanzu / community-edition

VMware Tanzu Community Edition is no longer an actively maintained project. Code is available for historical purposes only.
https://tanzucommunityedition.io/
Apache License 2.0
1.34k stars 308 forks source link

local-path-storage e2e test is failing #4171

Closed aman556 closed 2 years ago

aman556 commented 2 years ago

Possible reason behind the error

Files with -values.yaml got ignored

Bug Report

Local-path-storage e2e test is failing with the below logs.

make e2e-test
CGO_ENABLED=0 go run github.com/onsi/ginkgo/ginkgo -v e2e
Running Suite: local-path-storage Package E2E Test Suite
========================================================
Random Seed: 1650889612
Will run 1 of 1 specs

STEP: installing local-path-storage package
+ tanzu package available list -o json
[
  {
    "display-name": "App-Toolkit package for TCE",
    "latest-version": "0.1.0",
    "name": "app-toolkit.community.tanzu.vmware.com",
    "short-description": "Kubernetes-native toolkit to support application lifecycle"
  },
  {
    "display-name": "Cartographer",
    "latest-version": "0.3.0",
    "name": "cartographer.community.tanzu.vmware.com",
    "short-description": "Kubernetes native Supply Chain Choreographer."
  },
  {
    "display-name": "cert-injection-webhook",
    "latest-version": "0.1.1",
    "name": "cert-injection-webhook.community.tanzu.vmware.com",
    "short-description": "The Cert Injection Webhook injects CA certificates and proxy environment variables into pods"
  },
  {
    "display-name": "cert-manager",
    "latest-version": "1.8.0",
    "name": "cert-manager.community.tanzu.vmware.com",
    "short-description": "Certificate management"
  },
  {
    "display-name": "contour",
    "latest-version": "1.20.1",
    "name": "contour.community.tanzu.vmware.com",
    "short-description": "An ingress controller"
  },
  {
    "display-name": "external-dns",
    "latest-version": "0.10.0",
    "name": "external-dns.community.tanzu.vmware.com",
    "short-description": "This package provides DNS synchronization functionality."
  },
  {
    "display-name": "fluent-bit",
    "latest-version": "1.7.5",
    "name": "fluent-bit.community.tanzu.vmware.com",
    "short-description": "Fluent Bit is a fast Log Processor and Forwarder"
  },
  {
    "display-name": "Flux Source Controller",
    "latest-version": "0.21.2",
    "name": "fluxcd-source-controller.community.tanzu.vmware.com",
    "short-description": "The source-controller is a Kubernetes operator, specialised in artifacts acquisition from external sources such as Git, Helm repositories and S3 buckets."
  },
  {
    "display-name": "gatekeeper",
    "latest-version": "3.7.1",
    "name": "gatekeeper.community.tanzu.vmware.com",
    "short-description": "policy management"
  },
  {
    "display-name": "grafana",
    "latest-version": "7.5.11",
    "name": "grafana.community.tanzu.vmware.com",
    "short-description": "Visualization and analytics software"
  },
  {
    "display-name": "harbor",
    "latest-version": "2.4.2",
    "name": "harbor.community.tanzu.vmware.com",
    "short-description": "OCI Registry"
  },
  {
    "display-name": "knative-serving",
    "latest-version": "1.0.0",
    "name": "knative-serving.community.tanzu.vmware.com",
    "short-description": "Knative Serving builds on Kubernetes to support deploying and serving of applications and functions as serverless containers"
  },
  {
    "display-name": "kpack dependencies",
    "latest-version": "0.0.9",
    "name": "kpack-dependencies.community.tanzu.vmware.com",
    "short-description": "Dependencies in the form of Buildpacks and Stacks for the kpack package"
  },
  {
    "display-name": "kpack",
    "latest-version": "0.5.2",
    "name": "kpack.community.tanzu.vmware.com",
    "short-description": "kpack builds application source code into OCI compliant images using Cloud Native Buildpacks"
  },
  {
    "display-name": "Flux Kustomize Controller",
    "latest-version": "0.21.1",
    "name": "kustomize-controller.fluxcd.community.tanzu.vmware.com",
    "short-description": "Kustomize controller is one of the components in GitOps toolkit."
  },
  {
    "display-name": "local-path-storage",
    "latest-version": "0.0.22",
    "name": "local-path-storage.community.tanzu.vmware.com",
    "short-description": "This package provides local path node storage and primarily supports RWO AccessMode."
  },
  {
    "display-name": "multus-cni",
    "latest-version": "3.8.0",
    "name": "multus-cni.community.tanzu.vmware.com",
    "short-description": "This package provides the ability for enabling attaching multiple network interfaces to pods in Kubernetes"
  },
  {
    "display-name": "prometheus",
    "latest-version": "2.27.0-1",
    "name": "prometheus.community.tanzu.vmware.com",
    "short-description": "A time series database for your metrics"
  },
  {
    "display-name": "velero",
    "latest-version": "1.8.0",
    "name": "velero.community.tanzu.vmware.com",
    "short-description": "Disaster recovery capabilities"
  },
  {
    "display-name": "whereabouts",
    "latest-version": "0.5.1",
    "name": "whereabouts.community.tanzu.vmware.com",
    "short-description": "A CNI IPAM plugin that assigns IP addresses cluster-wide"
  }
]
+ tanzu package available list local-path-storage.community.tanzu.vmware.com -o json
[
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.19"
  },
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.20"
  },
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.22"
  }
]
+ tanzu package install local-path-storage --poll-interval 10s --poll-timeout 20m --namespace default --package-name local-path-storage.community.tanzu.vmware.com --version 0.0.22 --values-file fixtures/local-path-storage-values.yaml
Error: failed to read from data values file 'fixtures/local-path-storage-values.yaml': open fixtures/local-path-storage-values.yaml: no such file or directory
Error: exit status 1

Failure [3.556 seconds]
[BeforeSuite] BeforeSuite 
/Users/amansha/go/src/github.com/vmware-tanzu/community-edition/addons/packages/local-path-storage/0.0.22/test/e2e/local_path_storage_suite_test.go:47

  Unexpected error:
      <*errors.errorString | 0xc000312020>: {
          s: "Error: failed to read from data values file 'fixtures/local-path-storage-values.yaml': open fixtures/local-path-storage-values.yaml: no such file or directory\nError: exit status 1\n\nexit status: 1",
      }
      Error: failed to read from data values file 'fixtures/local-path-storage-values.yaml': open fixtures/local-path-storage-values.yaml: no such file or directory
      Error: exit status 1

      exit status: 1
  occurred

  /Users/amansha/go/src/github.com/vmware-tanzu/community-edition/addons/packages/local-path-storage/0.0.22/test/e2e/local_path_storage_suite_test.go:117
------------------------------
STEP: cleaning up local-path-storage package
+ tanzu package installed delete local-path-storage --poll-interval 10s --poll-timeout 20m --namespace default --yes

STEP: validating the local-path-storage package install no longer exists
+ kubectl -n default get packageinstall local-path-storage
Error from server (NotFound): packageinstalls.packaging.carvel.dev "local-path-storage" not found

Ran 1 of 0 Specs in 5.841 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 0 Skipped
--- FAIL: Test (5.84s)
FAIL

Ginkgo ran 1 suite in 7.488676471s
Test Suite Failed
exit status 1
make: *** [e2e-test] Error 1

Expected Behavior

Test should be GREEN.

Steps to Reproduce the Bug

cd addons/packages/local-path-storage/0.0.22/test && make e2e-test

Screenshots or additional information and context

Environment Details

Diagnostics and log bundle

joshrosso commented 2 years ago

@aman556 could you retest based on https://github.com/vmware-tanzu/community-edition/pull/4178 and close this issue if it is resolved?

aman556 commented 2 years ago

It worked @joshrosso and @seemiller. Thanks!

aman556 commented 2 years ago

Passing Logs

make e2e-test                                                              
CGO_ENABLED=0 go run github.com/onsi/ginkgo/ginkgo -v e2e
Running Suite: local-path-storage Package E2E Test Suite
========================================================
Random Seed: 1650944974
Will run 1 of 1 specs

STEP: installing local-path-storage package
+ tanzu package available list -o json
[
  {
    "display-name": "App-Toolkit package for TCE",
    "latest-version": "0.1.0",
    "name": "app-toolkit.community.tanzu.vmware.com",
    "short-description": "Kubernetes-native toolkit to support application lifecycle"
  },
  {
    "display-name": "Cartographer",
    "latest-version": "0.3.0",
    "name": "cartographer.community.tanzu.vmware.com",
    "short-description": "Kubernetes native Supply Chain Choreographer."
  },
  {
    "display-name": "cert-injection-webhook",
    "latest-version": "0.1.1",
    "name": "cert-injection-webhook.community.tanzu.vmware.com",
    "short-description": "The Cert Injection Webhook injects CA certificates and proxy environment variables into pods"
  },
  {
    "display-name": "cert-manager",
    "latest-version": "1.8.0",
    "name": "cert-manager.community.tanzu.vmware.com",
    "short-description": "Certificate management"
  },
  {
    "display-name": "contour",
    "latest-version": "1.20.1",
    "name": "contour.community.tanzu.vmware.com",
    "short-description": "An ingress controller"
  },
  {
    "display-name": "external-dns",
    "latest-version": "0.10.0",
    "name": "external-dns.community.tanzu.vmware.com",
    "short-description": "This package provides DNS synchronization functionality."
  },
  {
    "display-name": "fluent-bit",
    "latest-version": "1.7.5",
    "name": "fluent-bit.community.tanzu.vmware.com",
    "short-description": "Fluent Bit is a fast Log Processor and Forwarder"
  },
  {
    "display-name": "Flux Source Controller",
    "latest-version": "0.21.2",
    "name": "fluxcd-source-controller.community.tanzu.vmware.com",
    "short-description": "The source-controller is a Kubernetes operator, specialised in artifacts acquisition from external sources such as Git, Helm repositories and S3 buckets."
  },
  {
    "display-name": "gatekeeper",
    "latest-version": "3.7.1",
    "name": "gatekeeper.community.tanzu.vmware.com",
    "short-description": "policy management"
  },
  {
    "display-name": "grafana",
    "latest-version": "7.5.11",
    "name": "grafana.community.tanzu.vmware.com",
    "short-description": "Visualization and analytics software"
  },
  {
    "display-name": "harbor",
    "latest-version": "2.4.2",
    "name": "harbor.community.tanzu.vmware.com",
    "short-description": "OCI Registry"
  },
  {
    "display-name": "knative-serving",
    "latest-version": "1.0.0",
    "name": "knative-serving.community.tanzu.vmware.com",
    "short-description": "Knative Serving builds on Kubernetes to support deploying and serving of applications and functions as serverless containers"
  },
  {
    "display-name": "kpack dependencies",
    "latest-version": "0.0.9",
    "name": "kpack-dependencies.community.tanzu.vmware.com",
    "short-description": "Dependencies in the form of Buildpacks and Stacks for the kpack package"
  },
  {
    "display-name": "kpack",
    "latest-version": "0.5.2",
    "name": "kpack.community.tanzu.vmware.com",
    "short-description": "kpack builds application source code into OCI compliant images using Cloud Native Buildpacks"
  },
  {
    "display-name": "Flux Kustomize Controller",
    "latest-version": "0.21.1",
    "name": "kustomize-controller.fluxcd.community.tanzu.vmware.com",
    "short-description": "Kustomize controller is one of the components in GitOps toolkit."
  },
  {
    "display-name": "local-path-storage",
    "latest-version": "0.0.22",
    "name": "local-path-storage.community.tanzu.vmware.com",
    "short-description": "This package provides local path node storage and primarily supports RWO AccessMode."
  },
  {
    "display-name": "multus-cni",
    "latest-version": "3.8.0",
    "name": "multus-cni.community.tanzu.vmware.com",
    "short-description": "This package provides the ability for enabling attaching multiple network interfaces to pods in Kubernetes"
  },
  {
    "display-name": "prometheus",
    "latest-version": "2.27.0-1",
    "name": "prometheus.community.tanzu.vmware.com",
    "short-description": "A time series database for your metrics"
  },
  {
    "display-name": "velero",
    "latest-version": "1.8.0",
    "name": "velero.community.tanzu.vmware.com",
    "short-description": "Disaster recovery capabilities"
  },
  {
    "display-name": "whereabouts",
    "latest-version": "0.5.1",
    "name": "whereabouts.community.tanzu.vmware.com",
    "short-description": "A CNI IPAM plugin that assigns IP addresses cluster-wide"
  }
]
+ tanzu package available list local-path-storage.community.tanzu.vmware.com -o json
[
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.19"
  },
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.20"
  },
  {
    "name": "local-path-storage.community.tanzu.vmware.com",
    "released-at": "2021-09-15 05:30:00 +0530 IST",
    "version": "0.0.22"
  }
]
+ tanzu package install local-path-storage --poll-interval 10s --poll-timeout 20m --namespace default --package-name local-path-storage.community.tanzu.vmware.com --version 0.0.22 --values-file fixtures/values.yaml

STEP: validating local-path-storage package is reconciled
+ kubectl -n default get packageinstalls local-path-storage -o jsonpath={.status.conditions[?(@.type == 'ReconcileSucceeded')].status}
True
local-path-storage Package E2E Test 
  works
  /Users/amansha/go/src/github.com/vmware-tanzu/community-edition/addons/packages/local-path-storage/0.0.22/test/e2e/local_path_storage_test.go:28
+ kubectl get StorageClass local-path
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  21s

•STEP: cleaning up local-path-storage package
+ tanzu package installed delete local-path-storage --poll-interval 10s --poll-timeout 20m --namespace default --yes

STEP: validating the local-path-storage package install no longer exists
+ kubectl -n default get packageinstall local-path-storage
Error from server (NotFound): packageinstalls.packaging.carvel.dev "local-path-storage" not found

Ran 1 of 1 Specs in 73.790 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 1m15.14354159s
Test Suite Passed