PKUHPC / SCOW

Super Computing On Web
https://www.pkuscow.com/
Mulan Permissive Software License, Version 2
180 stars 39 forks source link

fix(mis-server): 创建账户并判断为不封锁账户时,集群下没有实现对帐户的解封 #1295

Closed piccaSun closed 3 weeks ago

piccaSun commented 3 weeks ago

问题

当前scow及集群中创建账户的逻辑为

  1. 在scow中创建账户,且通过判断当前租户封锁阈值在数据库中写入集群中应为的封锁状态
  2. 在当前可用集群中创建账户,并写入账户与账户拥有者的关联
  3. 在当前可用集群中根据1中计算的封锁状态值实现在集群中的封锁或解封
  4. 2或3失败时对1中创建的数据进行回滚

当前只实现了3中的封锁并没有单独执行解封导致题目的问题

修复

补充上述3中,根据封锁阈值判断应为解封的情况,调用适配器接口在集群中实现对帐户的解封

租户默认封锁阈值为0时,应为在集群中封锁状态 image image

修改租户默认封锁阈值为负数时,应为在集群中解封状态 image image image

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: 0a1fec53a8ad80496acfd27a912d8ece4bcad088

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages | Name | Type | | ------------------- | ----- | | @scow/mis-server | Patch | | @scow/auth | Patch | | @scow/gateway | Patch | | @scow/mis-web | Patch | | @scow/portal-server | Patch | | @scow/portal-web | Patch | | @scow/cli | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR