Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

incorrect NODE_INDEX and AZ_INDEX in log-cache #1307

Open
ShuangMen opened this issue Sep 9, 2020 · 2 comments
Open

incorrect NODE_INDEX and AZ_INDEX in log-cache #1307

ShuangMen opened this issue Sep 9, 2020 · 2 comments
Assignees
Labels
Status: Validation Need to brainstorm before starting Type: Bug Something isn't working

Comments

@ShuangMen
Copy link
Contributor

ShuangMen commented Sep 9, 2020

Environment
cf-operator: 5.2.0
kubecf: v2.2.3

deploy kubecf with multi_az="false" and log-cache instance =3,

Issue
After deployment, The issue is that in all 3 log-cache pod, container log-cache environment show the "AZ_INDEX: 1" and "NODE_INDEX: 0".

below is an example when describes one of the log-cache pod log-cache-2.

Name:         log-cache-2
Namespace:    kubecf
...
Labels:       controller-revision-hash=log-cache-5696ddc959
              quarks.cloudfoundry.org/az-index=0
              quarks.cloudfoundry.org/deployment-name=kubecf
              quarks.cloudfoundry.org/instance-group-name=log-cache
              quarks.cloudfoundry.org/pod-ordinal=2
              quarks.cloudfoundry.org/quarks-statefulset-name=log-cache
              statefulset.kubernetes.io/pod-name=log-cache-2
...
    Environment:
      ADDR:                    :8080
      AZ_INDEX:                1
      CA_PATH:                 /var/vcap/jobs/log-cache/config/certs/ca.crt
      CERT_PATH:               /var/vcap/jobs/log-cache/config/certs/log_cache.crt
      KEY_PATH:                /var/vcap/jobs/log-cache/config/certs/log_cache.key
      MAX_PER_SOURCE:          100000
      MEMORY_LIMIT_PERCENT:    50
      METRICS_CA_FILE_PATH:    /var/vcap/jobs/log-cache/config/certs/metrics_ca.crt
      METRICS_CERT_FILE_PATH:  /var/vcap/jobs/log-cache/config/certs/metrics.crt
      METRICS_KEY_FILE_PATH:   /var/vcap/jobs/log-cache/config/certs/metrics.key
      METRICS_PORT:            6060
      NODE_ADDRS:              log-cache-0:8080,log-cache-1:8080,log-cache-2:8080
      NODE_INDEX:              0
...

The issue is that in all 3 log-cache pod, container log-cache environment show the "AZ_INDEX: 1" and "NODE_INDEX: 0".
This is not match quarks.cloudfoundry.org/az-index=0 and quarks.cloudfoundry.org/pod-ordinal=2 in the example.

@ShuangMen
Copy link
Contributor Author

ShuangMen commented Sep 9, 2020

similar issue reported in cf-operator git cloudfoundry-incubator/quarks-operator#1106 when multi_az=true.

@fargozhu fargozhu added Type: Bug Something isn't working Status: Validation Need to brainstorm before starting labels Sep 9, 2020
@mook-as
Copy link
Contributor

mook-as commented Sep 9, 2020

This looks related to #1291 — I haven't checked if that PR fixes things, but it doesn't sound like it does. But at least the changes there will help point at what we would need to fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Validation Need to brainstorm before starting Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants