Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to edit IstioConfig #4371

Closed
hhovsepy opened this issue Sep 20, 2021 · 8 comments · Fixed by kiali/kiali-ui#2242
Closed

Unable to edit IstioConfig #4371

hhovsepy opened this issue Sep 20, 2021 · 8 comments · Fixed by kiali/kiali-ui#2242
Assignees
Labels
backlog Triaged Issue added to backlog bug Something isn't working

Comments

@hhovsepy
Copy link
Contributor

hhovsepy commented Sep 20, 2021

Happens on master. A regression.

Open any ServiceEntry page via YAML editor, try to change and save. Error happens.

"Could not update IstioConfig details. Invalid JSON Patch"
Screenshot from 2021-09-20 15-24-12

No other logs in Kiali pod.
Screenshot from 2021-09-20 15-24-31

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: edition-cnn-com
  namespace: alpha
spec:
  hosts:
    - edition.cnn.com
  ports:
    - number: 80
      name: http-port
      protocol: HTTP
      targetPort: 443
    - number: 443
      name: https-port
      protocol: HTTPS
  resolution: DNS
"{\"kind\":\"ServiceEntry\",\"apiVersion\":\"networking.istio.io/v1alpha3\",\"metadata\":{\"name\":\"edition-cnn-com\",\"namespace\":\"bookinfo\",\"uid\":\"c858364b-189c-48e6-a11e-3afce81e5fc0\",\"resourceVersion\":\"162629\",\"generation\":5,\"creationTimestamp\":\"2021-09-20T12:15:33Z\",\"annotations\":{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"networking.istio.io/v1alpha3\\\",\\\"kind\\\":\\\"ServiceEntry\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"edition-cnn-com\\\",\\\"namespace\\\":\\\"bookinfo\\\"},\\\"spec\\\":{\\\"hosts\\\":[\\\"edition.cnn.com\\\"],\\\"ports\\\":[{\\\"name\\\":\\\"http-port\\\",\\\"number\\\":80,\\\"protocol\\\":\\\"HTTP\\\",\\\"targetPort\\\":443},{\\\"name\\\":\\\"https-port\\\",\\\"number\\\":443,\\\"protocol\\\":\\\"HTTPS\\\"}],\\\"resolution\\\":\\\"DNS\\\"}}\\n\"},\"managedFields\":[{\"manager\":\"kubectl-client-side-apply\",\"operation\":\"Update\",\"apiVersion\":\"networking.istio.io/v1alpha3\",\"time\":\"2021-09-20T12:15:33Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:metadata\":{\"f:annotations\":{\".\":{},\"f:kubectl.kubernetes.io/last-applied-configuration\":{}}},\"f:spec\":{\".\":{},\"f:ports\":{},\"f:resolution\":{}}}},{\"manager\":\"Go-http-client\",\"operation\":\"Update\",\"apiVersion\":\"networking.istio.io/v1alpha3\",\"time\":\"2021-09-20T13:06:00Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:spec\":{\"f:hosts\":{}}}}]},\"spec\":{\"hosts\":[\"edition2.cnn.com\"],\"addresses\":null,\"ports\":[{\"name\":\"http-port\",\"number\":80,\"protocol\":\"HTTP\",\"targetPort\":443},{\"name\":\"https-port\",\"number\":443,\"protocol\":\"HTTPS\"}],\"location\":null,\"resolution\":\"DNS\",\"endpoints\":null,\"workloadSelector\":null,\"exportTo\":null,\"subjectAltNames\":null}}"
@hhovsepy hhovsepy added the bug Something isn't working label Sep 20, 2021
@lucasponce
Copy link
Contributor

I couldn't reproduce in master.
Did you change some fields at same time ?
I wonder if you reproduce always the bug.

@hhovsepy
Copy link
Contributor Author

Just changing the hostname, a simple edit.

@pbajjuri20
Copy link
Contributor

pbajjuri20 commented Sep 20, 2021

I have also try to change the Hostname against Master In serviceEntry, It is through an error.

ServiceEntry_error

@lucasponce lucasponce self-assigned this Sep 20, 2021
@lucasponce
Copy link
Contributor

@pbajjuri20 @hhovsepy which version of OpenShift are you using ?
I'm going to take it.

@pbajjuri20
Copy link
Contributor

I have tested on OCP version: 4.8.5

@lucasponce
Copy link
Contributor

Ok, it fails other Istio resources as well.
I have a suspect about where the problem is, I'll put it in the sprint.

@lucasponce lucasponce changed the title Unable to edit ServiceEntry Unable to edit IstioConfig in OpenShift platform Sep 20, 2021
@lucasponce lucasponce changed the title Unable to edit IstioConfig in OpenShift platform Unable to edit IstioConfig Sep 21, 2021
@lucasponce
Copy link
Contributor

Now with latest master I can reproduce the problem in minikube, so I guess bug is consistent.

@lucasponce
Copy link
Contributor

Ouch, it was the axios library !

There is a PR that should solve the problem:
kiali/kiali-ui#2242

I had a random behaviour on this as when I changed from the branch in the UI project I was not updating the libs and then sometimes I could reproduce the problem and sometimes not.

But cleaning the node_modules and checking master with the PR will show that the PATCH query was failing.

If you can give a try to confirm, we can merge the patch as it's affecting to a couple of areas and better to consolidate.

@lucasponce lucasponce added the backlog Triaged Issue added to backlog label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Triaged Issue added to backlog bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants