Repository: kubernetes
Issue: daemonset rolling update stuck
Labels: kind/bug,sig/apps,needs-triage

### What happened?

![image](https://github.com/user-attachments/assets/025f7c96-c30f-4db3-b461-873dda86f680)
![image](https://github.com/user-attachments/assets/b6782f9c-62de-4c1c-816f-3459e7eef1ca)

I found that daemonset was stuck during the rolling upgrade, and one pod was not updated.
Or the numberUnavailable calculation result of daemonset is incorrect.

In addition, when deleting abnormal pods, daemonset does not delete all pods at a time. Instead, it deletes one pod every several minutes. The log is as follows:
I1121 13:08:27.938981      10 daemon_controller.go:849] "Found failed daemon pod on node, will try to kill it" pod="nce-omp/hofsfusedeviceplugin-d9p2d" node="caasnode1"
I1121 13:08:27.939171      10 controller_utils.go:609] "Deleting pod" controller="hofsfusedeviceplugin" pod="nce-omp/hofsfusedeviceplugin-d9p2d"
I1121 13:08:27.939480      10 event.go:307] "Event occurred" object="nce-omp/hofsfusedeviceplugin" fieldPath="" kind="DaemonSet" apiVersion="apps/v1" type="Warning" reason="FailedDaemonPod" message="Found failed daemon pod nce-omp/hofsfusedeviceplugin-d9p2d on node caasnode1, will try to kill it"
I1121 13:08:27.953742      10 event.go:307] "Event occurred" object="nce-omp/hofsfusedeviceplugin" fieldPath="" kind="DaemonSet" apiVersion="apps/v1" type="Normal" reason="SuccessfulDelete" message="Deleted pod: hofsfusedeviceplugin-d9p2d"
I1121 13:23:27.940867      10 daemon_controller.go:849] "Found failed daemon pod on node, will try to kill it" pod="nce-omp/hofsfusedeviceplugin-85zzt" node="caasnode1"
I1121 13:23:27.941014      10 controller_utils.go:609] "Deleting pod" controller="hofsfusedeviceplugin" pod="nce-omp/hofsfusedeviceplugin-85zzt"
I1121 13:23:27.941335      10 event.go:307] "Event occurred" object="nce-omp/hofsfusedeviceplugin" fieldPath="" kind="DaemonSet" apiVersion="apps/v1" type="Warning" reason="FailedDaemonPod" message="Found failed daemon pod nce-omp/hofsfusedeviceplugin-85zzt on node caasnode1, will try to kill it"
I1121 13:23:27.953140      10 event.go:307] "Event occurred" object="nce-omp/hofsfusedeviceplugin" fieldPath="" kind="DaemonSet" apiVersion="apps/v1" type="Normal" reason="SuccessfulDelete" message="Deleted pod: hofsfusedeviceplugin-85zzt"

### What did you expect to happen?

The daemonset should roll the upgrade correctly.

### How can we reproduce it (as minimally and precisely as possible)?

N/A

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```
1.30
</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>