Skip to content

bug: the upstream used in the plugin traffic-split can be deleted #5339

Description

@highfly22

Issue description

When deleting a upstream, the admin service doesn't check whether it is used in the traffic-split plugin.

Environment

  • apisix version docker image apache/apisix:2.10.0-alpine
  • OS (cmd: uname -a): Linux algorithm-gateway-prod-apisix-57dcf5569f-v9gdj 3.10.0-1160.15.2.el7.x86_64 change: added doc of how to load plugin. #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 Linux

Steps to reproduce

  1. create traffic-split route and assign a upstream to the route
  2. Delete the upstream

Actual result

The upstream had been removed.

Error log

Code 200

Expected result

Then admin service would reject the delete operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions