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

Double istio rev in configmap name #6669

Closed
laptubi opened this issue Oct 2, 2023 · 13 comments · Fixed by #6675
Closed

Double istio rev in configmap name #6669

laptubi opened this issue Oct 2, 2023 · 13 comments · Fixed by #6675
Assignees
Labels
backlog Triaged Issue added to backlog backport completed Issue PRs have been backported backport needed Issue PRs require backport to versions specified in comments bug Something isn't working

Comments

@laptubi
Copy link

laptubi commented Oct 2, 2023

Hello.

istio installed via helm

  values:
    revision: "1-18-0"

kiali

  values:
    allowAdHocKialiImage: true
    resources:
      limits:
        cpu: 1
    cr:
      create: true
      namespace: istio-system
      spec:
        istio_namespace: istio-system
        external_services:
          istio:
            config_map_name: "istio-1-18-0"
            istiod_deployment_name: "istiod-1-18-0"
            istio_sidecar_injector_config_map_name: "istio-sidecar-injector-1-18-0"

i receive this error from kiali log.

ERR Error getting mesh config: configmap "istio-1-18-0-1-18-0" not found

i do not understand why rev is doubled in configmap name?

@laptubi laptubi added the bug Something isn't working label Oct 2, 2023
@jmazzitelli
Copy link
Collaborator

What version of Kiali did you install?

What does your Kiali server pods logs say - any other errors or stack traces?

@laptubi
Copy link
Author

laptubi commented Oct 2, 2023

1.73 version
no other errors in pod logs

@jmazzitelli
Copy link
Collaborator

jmazzitelli commented Oct 2, 2023

I found the problem. For some reason, this code appends the version: https://github.com/kiali/kiali/blob/v1.74.1/business/mesh.go#L158-L161

configMapName := in.conf.ExternalServices.Istio.ConfigMapName
if revLabel := istiod.Labels[IstioRevisionLabel]; revLabel != "default" && revLabel != "" {
	configMapName = configMapName + "-" + revLabel
}

But no where else in the code does it do this - anywhere else ExternalServices.Istio.ConfigMapName is used, it is used as-is and the istiod revision label is not appended to it.

We need to fix the Kiali code to be consistent. Right now, it is broken because it does things differently in different parts of the code.

@jmazzitelli
Copy link
Collaborator

@jshaughn jshaughn added the backlog Triaged Issue added to backlog label Oct 3, 2023
@nrfox
Copy link
Contributor

nrfox commented Oct 3, 2023

Looks like this also goes against the documentation for how to handle revisions in Kiali so it should be fixed. Also need an e2e test added for this.

@nrfox nrfox self-assigned this Oct 3, 2023
@jmazzitelli
Copy link
Collaborator

@leandroberetta knows about all this stuff - he did all that work on the canary stuff. Perhaps he can chime in with his thoughts.

@jmazzitelli
Copy link
Collaborator

BTW: I wrote a github issue a few months ago that is related - we need a common function to get the configmap name - precisely because of this canary/version information that might be in the name.

#6042

@aleksandermiszkiewicz
Copy link

aleksandermiszkiewicz commented Oct 25, 2023

@jmazzitelli @nrfox when the bug fix will be implemented ? Also would like to understand what issue it causes on the Kiali side (if any) ?

@jmazzitelli
Copy link
Collaborator

when the bug fix will be implemented ?

Follow this PR - #6675 and if it gets merged by end of week, it will be in this sprint's 1.76 release to be published Monday.

@nrfox
Copy link
Contributor

nrfox commented Oct 26, 2023

Also would like to understand what issue it causes on the Kiali side (if any) ?

@aleksandermiszkiewicz from what I can tell, the only thing that was affected by this issue was validations for Gateways. If you were using PILOT_SCOPE_GATEWAY_TO_NAMESPACE = true, then you might have gotten a false negative (validation passed when it should've failed) if your Gateway selected a workload outside of the Gateway's namespace.

@aleksandermiszkiewicz
Copy link

@jmazzitelli @nrfox thank you guys for answers.

nrfox added a commit to nrfox/kiali that referenced this issue Oct 27, 2023
This reverts the callers of IstioConfigMapName back to using `cfg.external_services.istio.config_map_name` directly. It now logs failures in GetMesh to auto-detect the configmap instead of returning an error. Nothing is currently using that configuration so an error shouldn't be returned there. Related to: kiali#6669.
nrfox added a commit to nrfox/kiali that referenced this issue Oct 27, 2023
This reverts the callers of IstioConfigMapName back to using `cfg.external_services.istio.config_map_name` directly. It now logs failures in GetMesh to auto-detect the configmap instead of returning an error. Nothing is currently using that configuration so an error shouldn't be returned there. Related to: kiali#6669.
@jmazzitelli jmazzitelli added the backport needed Issue PRs require backport to versions specified in comments label Dec 15, 2023
@jmazzitelli
Copy link
Collaborator

jmazzitelli commented Dec 15, 2023

the fix needs to go into the 1.73 branch. backport PR: #6973

@jmazzitelli
Copy link
Collaborator

backport merged

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 backport completed Issue PRs have been backported backport needed Issue PRs require backport to versions specified in comments bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

5 participants