Skip to content

应用删除失败 #9

@zhouyq

Description

@zhouyq
Contributor

应用删除失败

报错信息:

2017-12-18 09:50:42 [ERROR] 5214c946-f242-4e7f-917b-ef5585674d92 [post] /app/ui/www/views/ajax/service_actions.py:350 {"url": "http://region.goodrain.me:8888/v2/tenants/gradmin/services/gr32af02?enterprise_id=309990b33628c17fca6da45fa0954c5a", "body": {"msg": "delete service error, Error 1062: Duplicate entry '26' for key 'PRIMARY'"}, "httpcode": 500, "method": "DELETE", "apitype": "Not specified"}
Traceback (most recent call last):
File "/app/ui/www/views/ajax/service_actions.py", line 347, in post
self.tenant.enterprise_id)
File "/app/ui/www/apiclient/regionapi.py", line 158, in delete_service
res, body = self._delete(url, self.default_headers, region=region)
File "/app/ui/www/apiclient/baseclient.py", line 123, in _delete
res, body = self._check_status(url, 'DELETE', response, content)
File "/app/ui/www/apiclient/baseclient.py", line 53, in _check_status
raise self.CallApiError(self.apitype, url, method, res, body)
CallApiError: {"url": "http://region.goodrain.me:8888/v2/tenants/gradmin/services/gr32af02?enterprise_id=309990b33628c17fca6da45fa0954c5a", "body": {"msg": "delete service error, Error 1062: Duplicate entry '26' for key 'PRIMARY'"}, "httpcode": 500, "method": "DELETE", "apitype": "Not specified"}

截图
image
image

Activity

Gemrails

Gemrails commented on Dec 18, 2017

@Gemrails
Contributor

在转存已删除的应用记录至 tenant_service_delete时,由于delete表中存在ID相同的记录导致无法插入删除数据引发错误。正常情况下两张表均不做truncate的情况下不会出现该问题,目前已在代码中做了兼容

added this to the v3.4.1 milestone on Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @zhouyq@ysicing@barnettZQG@Gemrails

      Issue actions

        应用删除失败 · Issue #9 · goodrain/rainbond