因爲在清除資源時,未考慮到租戶service,將其一併刪除,因而有了下面的填坑之旅數據庫
1,須要找到刪除的services—id,查看keytone的log,3d
grep -r "DELETE" | grep tenantscode
獲取刪除的idblog
2,新建一個services項目 keystone tenant-create --name services --enabled trueip
3,進入數據庫,修改services的id爲原來的id資源
4,在assignment表中添加關係get
INSERT INTO keystone
.assignment
(type
, actor_id
, target_id
, role_id
, inherited
) VALUES ('UserProject', '261a870492b740a49d771a5010a968e5', '01cf795e4cde4bac8f668f8327eea79e', 'e1f00943df0143fb9c031c314278958f', '0');it
其中:ast
actor_id爲服務的userid,能夠查看user表service
target_id爲projectid,此處爲servicesid
role_id爲admin的roleid