alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.17k stars 12.82k forks source link

使用2.0.3的时候非临时节点和临时节点的疑问 #7659

Closed dengyongqiang closed 1 year ago

dengyongqiang commented 2 years ago

Describe the bug 当我在使用2.0.3版本时,当我将一个非临时节点设置为持久节点后,在控制台中看到此时节点状态依然是临时状态。但节点实际表现和持久节点一致,节点永久生效。 此外,无法在控制台删除这个服务了。

在1.4.2版本中,同样的场景,会出现同一个服务两个服务实例。此时服务可以在控制台手动删除

When I was using version 2.0.3, when I set a ephemeral node as a non-ephemeral node, I saw in the console that the node state was still ephemeral. However, the actual behaviour of such node is the same as that of the non-ephemeral node. In addition, the service cannot be deleted in the console.

In version 1.4.2, two service instances of the same service appear in the same scenario. At this point, the service can be manually deleted in the console.

Expected behavior 服务生效后的状态和配置文件保持一致。

The status of the service is consistent with the code configuration file after it takes effect.

Acutally behavior A clear and concise description of what you actually to happen.

How to Reproduce Steps to reproduce the behavior:

  1. 修改项目的yml文件配置信息spring.cloud.nacos.discovery.ephemeral: true

  2. 使项目生效注册对应服务。观察nocos控制台,此时临时实例状态为true

  3. 修改项目的yml文件配置信息spring.cloud.nacos.discovery.ephemeral: false

  4. 使项目重启,观察nocos控制台,此时临时实例状态依然为true

  5. Modify the yml file configuration information of the project spring.cloud.nacos.discovery.ephemeral: true.

  6. Make the project effective to register the corresponding service. Observe the nocos console, and the temporary instance status is true.

  7. Modify the yml file configuration information of the project spring.cloud.nacos.discovery.ephemeral: false.

  8. Restart the project and observe the nocos console. The temporary instance status is still true.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

hujun-w-2 commented 2 years ago

如果期望服务实例生效后的状态和配置文件保持一致,则在修改实例ephemeral属性之前,先在控制台删除该节点,然后再进行注册。

stale[bot] commented 2 years ago

Thanks for your feedback and contribution. But the issue/pull request has not had recent activity more than 180 days. This issue/pull request will be closed if no further activity occurs 7 days later. We may solve this issue in new version. So can you upgrade to newest version and retry? If there are still issues or want to contribute again. Please create new issue or pull request again.