排查 Cassandra 凭证变换问题

您正在查看 ApigeeApigee Hybrid 文档。
此主题没有等效的 Apigee Edge 文档。

症状

在 Apigee Hybrid 中进行多区域 Cassandra 凭证轮换期间,在第一个区域轮换后,后续区域中的轮换会失败,并且系统会在密钥轮换 Pod 日志中记录错误。

错误消息

您会在日志中看到以下内容:

failed to run secret rotation: failed to create new users: failed to create new users

已知问题 397693324 的解决方法

诊断

SecretRotation 资源表示 Status 字段中存在失败:

Status:
  Message:  initiated automated rollback
  State:    error

密钥轮换作业 Pod 日志包含以下错误:

failed to run secret rotation: failed to create new users: failed to create new users

create-new-users-job Pod 日志包含以下错误:

Error creating clients with updated password: gocql: unable to create session: unable to discover protocol version: Provided username cassandra and/or password are incorrect

解决方法

执行以下步骤。

  1. 对于除第一个区域之外的所有区域,在 Secret 中将默认 Cassandra 用户 (cassandra) 密码更新为的轮换值。

    apiVersion: v1
        kind: Secret
        metadata:
          name: OLD_SECRET_NAME   # oldSecretRef
          namespace: APIGEE_NAMESPACE
        type: Opaque
        data:
          default.password: NEW_DEFAULT_PASSWORD   #base64-encoded string
          admin.user: OLD_ADMIN_USERNAME   #base64-encoded string
          admin.password: OLD_ADMIN_PASSWORD   #base64-encoded string
          dml.user: OLD_DML_USERNAME   #base64-encoded string
          dml.password: OLD_DML_PASSWORD   #base64-encoded string
          ddl.user: OLD_DDL_USERNAME   #base64-encoded string
          ddl.password: OLD_DDL_PASSWORD   #base64-encoded string
          jmx.user: OLD_JMX_USERNAME   #base64-encoded string
          jmx.password: OLD_JMX_PASSWORD   #base64-encoded string
          jolokia.user: OLD_JOLOKIA_USERNAME   #base64-encoded string
          jolokia.password: OLD_JOLOKIA_PASSWORD   #base64-encoded string
          
  2. 应用更新后的 Secret

    kubectl apply -f OLD_SECRET_FILE
  3. 继续执行正常的轮换流程,现在该流程应该会成功。

必须收集的诊断信息

如果按照上述说明操作后问题仍然存在,请收集以下诊断信息,然后与 Google Cloud Customer Care 联系:

  • 除了系统可能会要求您提供的常规数据之外,请从所有密钥轮换 Pod 中收集日志。