Skip to content

Remove the UI's deregister button #2541

Closed
@slackpad

Description

@slackpad

Deregistering from the catalog is almost never what you want to do, so this button causes a lot of user confusion. We should just remove it.

Activity

added this to the 0.7.2 milestone on Nov 29, 2016
added a commit that references this issue on Nov 30, 2016
added a commit that references this issue on Dec 1, 2016

Merge pull request #2551 from hashicorp/jbs-2541

slackpad

slackpad commented on Dec 1, 2016

@slackpad
ContributorAuthor

Fixed by #2541.

ashald

ashald commented on Dec 2, 2016

@ashald
Contributor

👍

alexrun

alexrun commented on Apr 17, 2017

@alexrun

@slackpad What happen if my service were not able to deregister itself before shutting down? I have seen this scenario many times on my development consul server, where it keeps lots of failing instances that are never going to disappear.

I suggest Leaving the button for commodity and not having to make the manual call to the /v1/catalog/deregister API and probably improving the confirmation message for those cases where the user gets confused.

slackpad

slackpad commented on Apr 17, 2017

@slackpad
ContributorAuthor

@alexrun we added deregister_critical_service_after (see https://www.consul.io/docs/agent/checks.html) to address that use case in an automated way:

In Consul 0.7 and later, checks that are associated with a service may also contain an optional deregister_critical_service_after field, which is a timeout in the same Go time format as interval and ttl. If a check is in the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. The minimum timeout is 1 minute, and the process that reaps critical services runs every 30 seconds, so it may take slightly longer than the configured timeout to trigger the deregistration. This should generally be configured with a timeout that's much, much longer than any expected recoverable outage for the given service.

alexrun

alexrun commented on Apr 17, 2017

@alexrun

Perfect. I will try to enable this feature...

added a commit that references this issue on May 4, 2018
NarimanAB

NarimanAB commented on Feb 25, 2021

@NarimanAB

@johncowen quite a strange solution and reasoning: "Deregistering from the catalog is almost never what you want to do"
If you think the feature can be misused just protect it with ACL.

now if I want to delete a service (as it is shown here - https://www.consul.io/commands/services/deregister#)
I need call consul services deregister for each service instance. If I have 10 of them then 10 calls must be made, very user friendly!

johncowen

johncowen commented on Feb 25, 2021

@johncowen
Contributor

Hi @NarimanAB

Thanks for dropping by!

Deregistering from the catalog is almost never what you want to do

Generally if you are deregistering services you should deregister from the agent. If you deregister from the catalog, in all likelihood the service will just be added back to the catalog by the agent via anti-entropy. So its not so much that you could just protect a button/API call via ACLs, more that it is can be confusing for a user who thinks they are deregistering a service only to see it appear again as its added back via anti-entropy.

The command you reference above removes the service instance from the agent, not the catalog, which is the important point here. From the UIs standpoint right now it mostly can only perform actions on the agent that it is running on, so the UI would only be able to deregister one of the ten service instances (if you have ten separate nodes/agents).

Overall we have spoken as a team about giving one instance of the UI the ability to perform actions on other agents, but adding that ability is not trivial.

Does that help to give context to the decision here?

NarimanAB

NarimanAB commented on Feb 26, 2021

@NarimanAB

@johncowen Thanks for the reply. If UI button was capable to deregister only one instance, I totally agree that was misleading. I thought I could deregister the whole service from UI. It was not clear for me that I saw info from all agents/nodes (list of service instances) but could do actions only on the node I connected to.

UI the ability to perform actions on other agents could be a great feature to implement...

Alexcei88

Alexcei88 commented on Sep 20, 2021

@Alexcei88

I think it was a very useful button in the UI interface. Why removing was best solution instead of fixing any confusions.

Ox0400

Ox0400 commented on Nov 12, 2021

@Ox0400

have plan revert? we need this.

allanian

allanian commented on Dec 17, 2021

@allanian

can we get a option for drop all failed services with curl maybe?

Caceresenzo

Caceresenzo commented on Aug 24, 2022

@Caceresenzo

I know this issue is old, but since they do not seems to add the button back.

I made a small Tampermonkey script that add the missing button to deregister any service.
https://github.com/crunchdao/app/blob/master/consul/scripts/unregister-button.js

The button will be visible on the health-checks tab.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ashald@johncowen@slackpad@Alexcei88@alexrun

        Issue actions

          Remove the UI's deregister button · Issue #2541 · hashicorp/consul