Closed nailushapotnuru closed 4 years ago
Can you check again by running tests using the following statement?
go test -v -tags=e2e ./test/e2e -brokerclass=MTChannelBasedBroker -channels=messaging.knative.dev/v1beta1:Channel,messaging.knative.dev/v1beta1:InMemoryChannel,messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel -sources=sources.knative.dev/v1alpha2:ApiServerSource,sources.knative.dev/v1alpha2:ContainerSource,sources.knative.dev/v1alpha2:PingSource
I think the missing brokerClass
flag leads to Broker
s not becoming ready.
@pierDipi , Thanks for looking into the issue.
Failures still persists even after passing the above flags. Here is the test output of above command.
Do you have installed the sugar-controller
? https://github.com/knative/eventing/releases/download/v0.16.1/eventing-sugar-controller.yaml
Yeah, you have.
Are you upgrading from 0.15.*
?
I followed these steps and tests are working:
kubectl apply -f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-core.yaml \
-f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-crds.yaml \
-f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-sugar-controller.yaml \
-f https://github.com/knative/eventing/releases/download/v0.16.1/in-memory-channel.yaml \
-f https://github.com/knative/eventing/releases/download/v0.16.1/mt-channel-broker.yaml
# <wait running>
go test -v -tags=e2e -timeout=30m ./test/e2e -brokerclass=MTChannelBasedBroker -channels=messaging.knative.dev/v1beta1:Channel,messaging.knative.dev/v1beta1:InMemoryChannel,messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel -sources=sources.knative.dev/v1alpha2:ApiServerSource,sources.knative.dev/v1alpha2:ContainerSource,sources.knative.dev/v1alpha2:PingSource
On k8s 1.17
, I don't have an OCP available to test them.
I have deployed knative-eventing on OCP from https://github.com/knative/eventing/tree/v0.16.1/config and built all the test-images from (https://github.com/knative/eventing/tree/v0.16.1/test/test_images) and then tried e2e testing.
Are you upgrading from 0.15.*?
I am working on v0.16.1 for power architecture.
Not really sure why the tests fails for you, but we have our own (OCP) CI setup, testing against 4.5 and 4.6
For instance:
Here is how those tests on CI got invoked: https://github.com/openshift/knative-eventing/blob/release-v0.16.0/openshift/e2e-common.sh#L134
(similar file exists for 0.17.2 branch)
@nailushapotnuru For another data point, have you tried running the tests with the latest version 0.17.2?
Did you install a broker. This one or another one? https://github.com/knative/eventing/tree/v0.16.1/config/brokers/mt-channel-broker
Oops, sorry, I see it there in the initial list of pods.Would it be possible to get the logs for the: mt-broker-controller-9968b99f4-zxj2c 1/1 Running 0 2d5h
Did you install a broker. This one or another one? https://github.com/knative/eventing/tree/v0.16.1/config/brokers/mt-channel-broker
Yes I have installed mt-channel-broker from the same one.
@nailushapotnuru For another data point, have you tried running the tests with the latest version 0.17.2?
No I haven't tried with 0.17.2 version, have only tried with 0.16.1. Do you want me to try with the latest one ?
Oops, sorry, I see it there in the initial list of pods.Would it be possible to get the logs for the: mt-broker-controller-9968b99f4-zxj2c 1/1 Running 0 2d5h
Please find the mt-broker-controller logs attached in the below txt file. mt-broker-controller.log
You can certainly try the .17.X releases to see if things have been fixed there. What happens if you just create a Broker like this: kubectl create -f - <<EOF apiVersion: eventing.knative.dev/v1 kind: Broker metadata: name: default namespace: reprobroker EOF
Does that become ready? If not, can you send the logs again?
Then if it does work, maybe just run a single test like: go test -v -tags=e2e -count=1 ./test/e2e -run ^TestDefaultBrokerWithManyTriggers$
@vaikas, Thanks for your response! Even with the latest eventing git version 0.17.2 e2e tests are failing for power architecture. Broker pods are not creating for me when I tried as above. Please find the mt-broker-controller logs attached and let me know your suggestions.
@nailushapotnuru hello,
have you tried applying these yamls:
@nailushapotnuru hello, have you tried applying these yamls:
https://raw.githubusercontent.com/openshift/knative-eventing/release-v0.17.2/openshift/release/knative-eventing-ci.yaml https://raw.githubusercontent.com/openshift/knative-eventing/release-v0.17.2/openshift/release/knative-eventing-mtbroker-ci.yaml
@matzew , Yes I have installed eventing using the above yaml as well, But still the e2e tests fails with the below error logs. eventingci.log
Can you create a broker like this:
kubectl create -f - <<EOF
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
name: brokertest
namespace: default
EOF
And then see what state it goes in. I'm trying to just simplify and see if anything works :)
Then dump it: kubectl get brokers brokertest -oyaml
After waiting a little bit to give it time to reconcile.
@vaikas , Here is the output of "kubectl get brokers brokertest -oyaml"
[root@nailuknative1 OCP45]# oc apply -f broker.yaml
broker.eventing.knative.dev/brokertest created
[root@nailuknative1 OCP45]# kubectl get brokers brokertest -oyaml
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
annotations:
eventing.knative.dev/broker.class: MTChannelBasedBroker
eventing.knative.dev/creator: kube:admin
eventing.knative.dev/lastModifier: kube:admin
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"eventing.knative.dev/v1","kind":"Broker","metadata":{"annotations":{},"name":"brokertest","namespace":"default"}}
creationTimestamp: "2020-09-22T05:52:51Z"
generation: 1
managedFields:
- apiVersion: eventing.knative.dev/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
manager: oc
operation: Update
time: "2020-09-22T05:52:51Z"
- apiVersion: eventing.knative.dev/v1
fieldsType: FieldsV1
fieldsV1:
f:status:
f:address:
f:url: {}
f:annotations:
.: {}
f:knative.dev/channelAPIVersion: {}
f:knative.dev/channelAddress: {}
f:knative.dev/channelKind: {}
f:knative.dev/channelName: {}
f:conditions: {}
f:observedGeneration: {}
manager: mtchannel_broker
operation: Update
time: "2020-09-22T05:52:52Z"
name: brokertest
namespace: default
resourceVersion: "23019232"
selfLink: /apis/eventing.knative.dev/v1/namespaces/default/brokers/brokertest
uid: 7b09e6de-3663-43e2-8b25-fac30613f287
spec:
config:
apiVersion: v1
kind: ConfigMap
name: config-br-default-channel
namespace: knative-eventing
status:
address:
url: http://broker-ingress.knative-eventing.svc.cluster.local/default/brokertest
annotations:
knative.dev/channelAPIVersion: messaging.knative.dev/v1
knative.dev/channelAddress: http://brokertest-kne-trigger-kn-channel.default.svc.cluster.local
knative.dev/channelKind: InMemoryChannel
knative.dev/channelName: brokertest-kne-trigger
conditions:
- lastTransitionTime: "2020-09-22T05:52:51Z"
status: "True"
type: Addressable
- lastTransitionTime: "2020-09-22T05:52:51Z"
status: "True"
type: FilterReady
- lastTransitionTime: "2020-09-22T05:52:51Z"
status: "True"
type: IngressReady
- lastTransitionTime: "2020-09-22T05:52:52Z"
status: "True"
type: Ready
- lastTransitionTime: "2020-09-22T05:52:52Z"
status: "True"
type: TriggerChannelReady
observedGeneration: 1
Please find the pod logs of mt-broker-controller: mt-broker-controller-589f57b6f6-m7m5s.log
Could some one help me with the test errors for testsuite: "TestPingSourceV1Alpha2", most of my test cases are failing with the same error.
tracker.go:152: Waiting for all KResources to become ready
event_info_store.go:238: Timeout waiting for at least 1 matches.
Error: FAIL MATCHING: saw 0/1 matching events.
Recent events:
0 events seen, last 0 events:
Match errors:
knative.dev/eventing/test/lib/recordevents.(*EventInfoStore).AssertAtLeast
/root/OCP45/0.16.1/eventing/test/lib/recordevents/event_info_store.go:238
knative.dev/eventing/test/lib/recordevents.(*EventInfoStore).AssertInRange
/root/OCP45/0.16.1/eventing/test/lib/recordevents/event_info_store.go:246
knative.dev/eventing/test/lib/recordevents.(*EventInfoStore).AssertExact
/root/OCP45/0.16.1/eventing/test/lib/recordevents/event_info_store.go:274
knative.dev/eventing/test/e2e.TestPingSourceV1Alpha2
/root/OCP45/0.16.1/eventing/test/e2e/source_ping_test.go:75
testing.tRunner
/usr/local/go/src/testing/testing.go:909
runtime.goexit
/usr/local/go/src/runtime/asm_ppc64x.s:884
Architecture: ppc64le OCP version: 4.5 knative-eventing: v0.16.1
[root@nailuknative1 ~]# oc get pods -n knative-eventing
NAME READY STATUS RESTARTS AGE
eventing-controller-bdb496b6d-mjm8t 1/1 Running 0 6d6h
eventing-webhook-558c787798-rv4td 1/1 Running 1 6d6h
imc-controller-fd87cb9cd-cbjrv 1/1 Running 0 6d6h
imc-dispatcher-76b74c6789-mp9sq 1/1 Running 0 6d6h
mt-broker-controller-5b5c785d87-hfttg 1/1 Running 0 6d6h
mt-broker-filter-7c6ddff4b6-hh6vt 1/1 Running 0 6d6h
mt-broker-ingress-564b8545db-7rjpj 1/1 Running 0 6d6h
pingsource-mt-adapter-6f5c79f96c-hbg6v 1/1 Running 0 6d5h
sugar-controller-687b4b47fb-pvk85 1/1 Running 0 6d6h
[root@nailuknative1 ~]#
Command executed:
go test -v -tags=e2e -count=1 ./test/e2e -run ^TestPingSourceV1Alpha2$ --dockerrepo image-registry.openshift-image-registry.svc:5000/local-images
Please find the test logs attached below: TestPingSourceV1Alpha2.log
Can you dump the pingsource-mt-adapter-6f5c79f96c-hbg6v logs?
Please find the ping source pod logs:
@nailushapotnuru thanks! Looks like a permission issue. Can you check this clusterrole exists in your cluster: https://github.com/knative/eventing/blob/v0.16.1/config/core/roles/pingsource-mt-adapter-clusterrole.yaml ?
how did you install knative ?
@lionelvillard , thanks for looking into the issue I have installed eventing using the below yamls:
kubectl apply -f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-core.yaml \ -f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-crds.yaml \ -f https://github.com/knative/eventing/releases/download/v0.16.1/eventing-sugar-controller.yaml \ -f https://github.com/knative/eventing/releases/download/v0.16.1/in-memory-channel.yaml \ -f https://github.com/knative/eventing/releases/download/v0.16.1/mt-channel-broker.yaml
@nailushapotnuru thanks! Looks like a permission issue. Can you check this clusterrole exists in your cluster: https://github.com/knative/eventing/blob/v0.16.1/config/core/roles/pingsource-mt-adapter-clusterrole.yaml ?
Now I have tried applying this yaml but failed with below error:
[root@nailuknative1 ~]# oc apply -f pingsource-mt-adapter-clusterrole.yaml
error: error parsing pingsource-mt-adapter-clusterrole.yaml: error converting YAML to JSON: yaml: line 128: mapping values are not allowed in this context
Please check knative-eventing-pingsource-mt-adapter
ClusterRole. You should see this:
apiGroups:
- sources.knative.dev
resources:
- pingsources
- pingsources/status
verbs:
- get
- list
- watch
- patch
Please find the ClusterRole below:
[root@nailuknative1 ~]# oc get ClusterRole | grep knative-eventing-pingsource-mt-adapter
knative-eventing-pingsource-mt-adapter 2020-09-24T06:52:03Z
[root@nailuknative1 ~]# oc describe ClusterRole knative-eventing-pingsource-mt-adapter
Name: knative-eventing-pingsource-mt-adapter
Labels: eventing.knative.dev/release=devel
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole","metadata":{"annotations":{},"labels":{"eventing.knative.dev/release":"d...
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
events [] [] [create patch]
leases.coordination.k8s.io [] [] [get list watch create update patch]
configmaps [] [] [get list watch]
[root@nailuknative1 ~]#
pingsource-mt-adapter-clusterrole.yaml
does not have 128 lines. What's its content?
Sorry I tried to download the file and apply it, It didn't download correctly. Now I am able to apply the yaml file.
[root@nailuknative1 roles]# oc apply -f pingsource-mt-adapter-clusterrole.yaml
clusterrole.rbac.authorization.k8s.io/knative-eventing-pingsource-mt-adapter configured
Most of my test cases are failing with below error: Architecture: PPC64LE Eventing: v0.16.1 Command executed:
go test -v -tags=e2e -timeout=0m ./test/e2e -brokerclass=MTChannelBasedBroker -channels=messaging.knative.dev/v1beta1:Channel,messaging.knative.dev/v1beta1:InMemoryChannel,messaging.knative.dev/v1:Channel,messaging.knative.dev/v1:InMemoryChannel -sources=sources.knative.dev/v1alpha2:ApiServerSource,sources.knative.dev/v1alpha2:ContainerSource,sources.knative.dev/v1alpha2:PingSource --dockerrepo image-registry.openshift-image-registry.svc:5000/local-images
Error Message:
event_info_store.go:238: Timeout waiting for at least 1 matches.
Error: FAIL MATCHING: unexpected error during find: error getting events error getting MinMax http get error: Get http://localhost:35493/minmax: dial tcp 127.0.0.1:35493: connect: connection refused
knative.dev/eventing/test/lib/recordevents.(*EventInfoStore).AssertAtLeast
/root/OCP45/0710/eventing/test/lib/recordevents/event_info_store.go:238
knative.dev/eventing/test/e2e/helpers.TestBrokerWithManyTriggers.func1
/root/OCP45/0710/eventing/test/e2e/helpers/broker_test_helper.go:324
testing.tRunner
/usr/local/go/src/testing/testing.go:909
runtime.goexit
/usr/local/go/src/runtime/asm_ppc64x.s:884
Could some one help me resolve this issue ?
This seems related to https://github.com/knative/eventing/issues/3570. We think that's fixed in https://github.com/knative/eventing/pull/4171.
@nailushapotnuru Could you test in your environment with the current master branch or a recent nightly release?
Instructions for installing a nightly release are in the pre-release docs at https://knative.dev/development/install/any-kubernetes-cluster/.
@nailushapotnuru after the release tomorrow upstream will be dropping support for 0.16 era releases, please try this out with a newer release (0.17+). If you're still hitting the issue please feel free to reopen!
TestName : e2e tests Repository : knative/eventing Tag: v0.16.1
Steps followed:
Deployed knative-eventing on OCP4.5
Built the test-images under eventing/test/test_images (https://github.com/knative/eventing/tree/v0.16.1/test/test_images)
Created image streams for these test-images and replaced under respective pod.yaml files of https://github.com/knative/eventing/tree/v0.16.1/test/test_images .
go test -v -tags=e2e -count=1 ./test/e2e --dockerrepo image-registry.openshift-image-registry.svc:5000/knative-eventing/
Please find the test output in the below attachment.
eventing_e2e_test_output.txt
Could someone help me with the above failures or any additional setup/procedure I need to follow for running e2e tests for eventing.