发布日期: 2024-09-16
版本号: v1.14.4

Dapr 1.14.4版本主要修复了两个问题。首先,解决了从v1.14.0至v1.14.2升级到v1.14.3时因存储卷默认大小变更导致的升级失败问题,该问题因Kubernetes限制修改存储请求参数引发,现恢复为原1Gi配置,用户需手动调整扩容需参考文档步骤。其次,修复了Kubernetes高可用模式下placement服务主节点切换后daprd无法重连的问题,原因为失效连接未被清除,现通过移除冗余检查确保连接重建。两个修复均提升了自动化升级的稳定性和服务可靠性。

更新内容 (中文)

Dapr 1.14.4

本次更新包含以下错误修复:

修复无需人工干预即可从 Dapr v1.14.x 升级至 v1.14.3 的问题

问题

当从 Dapr v1.14.0v1.14.1v1.14.2 版本升级至 v1.14.3 时,升级会失败并显示以下错误:

Error: UPGRADE FAILED: cannot patch \"dapr-scheduler-server\" with kind StatefulSet: StatefulSet.apps \"dapr-scheduler-server\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

用户需要手动删除 Scheduler StatefulSet 后,使用新存储大小重新执行升级操作。此操作要求 StorageClass 支持卷容量扩展。

影响

用户无法在不进行人工干预的情况下升级至 v1.14.3 版本,导致自动化升级流程中断。

根本原因

Dapr v1.14.3 版本中将 dapr-scheduler-server StatefulSet 的持久卷请求大小默认值从 1Gi 修改为 16Gi。Kubernetes 禁止更新该请求字段,从而触发上述错误。

解决方案

该字段已恢复为原先的 1Gi 请求大小。需要扩展卷容量的用户需按照文档说明执行手动操作。

修复 Kubernetes 环境中 daprd 无法连接 placement 服务的问题

问题

在 Kubernetes 高可用模式下运行时,当 Placement 服务发生故障并重新选举 leader 后,daprd 无法连接至 Placement 服务。

影响

Dapr 边车(sidecar)无法连接 Placement 服务,导致无法接收 Actor 分布表信息。

根本原因

与故障 Placement leader 的连接虽已正常关闭,但未置空导致连接被错误复用。

解决方案

已移除多余的校验逻辑。

更新内容 (原始)

Dapr 1.14.4

This update includes bug fixes:

Fixes being able to upgrade Dapr v1.14.x to v1.14.3 without manual intervention

Problem

When upgrading from Dapr versions v1.14.0, v1.14.1, or v1.14.2 to v1.14.3, the upgrade would fail with the following error.

Error: UPGRADE FAILED: cannot patch "dapr-scheduler-server" with kind StatefulSet: StatefulSet.apps "dapr-scheduler-server" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

The workaround for the user is to Delete the Scheduler StatefulSet before re-running the upgrade with the new storage size. The StorageClass must support volume expansion for this to work.

Impact

Users were unable to upgrade Dapr to v1.14.3 without manual intervention, breaking automated upgrades.

Root cause

In Dapr v1.14.3, the dapr-scheduler-server StatefulSet changed the default persistent volume request size from 1Gi to 16Gi. Kubernetes prevents updating this request field, resulting in this the above error.

Solution

This field has been reverted to the previous 1Gi request size. Users who wish to increase the volume size must follow the manual steps described in the documentation.

Fixes daprd not being able to connect to placement on k8s

Problem

When running dapr in high availability mode on Kubernetes, daprd would not be able to connect to the placement service after failure and re-election of a Placement leader.

Impact

The dapr sidecar would not be able to connect to the placement service, and would not be able to receive the actor placement tables.

Root cause

The connection to the failed placement leader was being properly closed, but not set to nil, so it was being reused.

Solution

The additional check was removed.

下载链接