Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

创建计费规则的问题 #1353

Open
1 task done
liu-shaobo opened this issue Jul 11, 2024 · 2 comments
Open
1 task done

创建计费规则的问题 #1353

liu-shaobo opened this issue Jul 11, 2024 · 2 comments

Comments

@liu-shaobo
Copy link

liu-shaobo commented Jul 11, 2024

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

发生了什么 | What happened

创建config/priceItems.yml文件后,看文档写到 需要在数据库正在运行、docker-compose.yml配置编写完成的条件下,运行以下命令快速在数据库中创建费用项信息:
docker compose run mis-server createPriceItems
这里的docker-compose.yml有点不明白,是整个scow的docker-compose.yml文件吗?
按照正常理解,已经有了priceItems.yml文件,应当重启mis的db容器或scow容器应当就可以创建计费规则了。

@ddadaal
Copy link
Member

ddadaal commented Jul 19, 2024

您好,感谢提问。

文档这里应该为./cli compose run mis-server createPriceItems。文档中的命令为scow-cli发布之前编写的,当时仍然在直接使用docker工具。

之后将会更新文档,非常感谢。

@liu-shaobo
Copy link
Author

liu-shaobo commented Sep 10, 2024

设置这个priceItems.yml文件,运行./cli compose run mis-server createPriceItems后,感觉没有起作用,用户空间的集群和分区信息的价格并没有改变,租户管理的作业价格表也没有变化,提交一个作业测试后,价格还是初始化时的价格;

  • priceItems.yml文件
default:
  hpc001:
    C96T2:
      normal:
        id: HPC01
        price: '1.00'
        amount: 'cpusAlloc'
nscc:
  hpc001:
    C96T2:
      normal:
        id: HPC02
        price: '2.00'
        amount: 'cpusAlloc'
  • 创建费用项
root@node196:/usr/local/scow-1.5.2# ./cli compose run mis-server createPriceItems
INFO: Loaded plugins: []
[+] Creating 1/0
 ✔ Container scow-152-log-1  Running                                                                                                                             0.0s

> @scow/mis-server@1.5.2 serve
> node build/index.js

{"level":30,"time":"2024-09-10T00:51:07.324Z","pid":17,"hostname":"f85eaec4f075","msg":"Hook is not configured."}
{"level":30,"time":"2024-09-10T00:51:07.611Z","pid":17,"hostname":"f85eaec4f075","version":{"tag":"v1.5.2","commit":"665f5316212c99f7d461736134c1744e1b38084b"},"msg":"@scow/mis-server: "}
{"level":30,"time":"2024-09-10T00:51:07.611Z","pid":17,"hostname":"f85eaec4f075","config":{"HOST":"0.0.0.0","PORT":5000,"LOG_LEVEL":"info","LOG_PRETTY":false,"SSH_PRIVATE_KEY_PATH":"/root/.ssh/id_rsa","SSH_PUBLIC_KEY_PATH":"/root/.ssh/id_rsa.pub","AUTH_URL":"","DB_PASSWORD":"must!chang3this"},"msg":"Loaded env config"}
{"level":30,"time":"2024-09-10T00:51:07.879Z","pid":17,"hostname":"f85eaec4f075","msg":"Checking if root can login to hpc001 by login node node196"}
{"level":30,"time":"2024-09-10T00:51:07.942Z","pid":17,"hostname":"f85eaec4f075","msg":"Root can login to hpc001 by login node node196"}
{"level":30,"time":"2024-09-10T00:51:07.966Z","pid":17,"hostname":"f85eaec4f075","plugin":"price","msg":"Default Price Map: {\"hpc001.C96T2.normal\":{\"id\":1,\"itemId\":\"1\",\"path\":[\"hpc001\",\"C96T2\",\"normal\"],\"description\":\"\",\"price\":\"0.1\",\"amount\":\"cpusAlloc\",\"createTime\":\"2024-09-07T07:30:46.283Z\"}}"}
{"level":30,"time":"2024-09-10T00:51:07.966Z","pid":17,"hostname":"f85eaec4f075","plugin":"price","msg":"Tenant specific prices {}"}
{"level":30,"time":"2024-09-10T00:51:08.042Z","pid":17,"hostname":"f85eaec4f075","plugin":"price","msg":"Executing on hpc001 success"}
{"level":30,"time":"2024-09-10T00:51:08.042Z","pid":17,"hostname":"f85eaec4f075","plugin":"price","msg":"Platform price items are complete. "}
{"level":30,"time":"2024-09-10T00:51:08.061Z","pid":17,"hostname":"f85eaec4f075","plugin":"fetch","msg":"Fetch info started."}
{"level":30,"time":"2024-09-10T00:51:08.112Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"misConfig.periodicSyncStatus?.cron: 0 4 * * *"}
{"level":30,"time":"2024-09-10T00:51:08.113Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Sync block status started."}
{"level":30,"time":"2024-09-10T00:51:08.114Z","pid":17,"hostname":"f85eaec4f075","plugin":"cache","msg":"Cache clear scheduled task started."}
{"level":30,"time":"2024-09-10T00:51:08.130Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated block status in slurm of the following accounts: []"}
{"level":30,"time":"2024-09-10T00:51:08.130Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated block status failed in slurm of the following accounts: []"}
{"level":30,"time":"2024-09-10T00:51:08.130Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated block status in slurm of the following user account: []"}
{"level":30,"time":"2024-09-10T00:51:08.130Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated block status failed in slurm of the following user account: []"}
{"level":30,"time":"2024-09-10T00:51:08.156Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Executing on hpc001 success"}
{"level":30,"time":"2024-09-10T00:51:08.173Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Executing on hpc001 success"}
{"level":30,"time":"2024-09-10T00:51:08.173Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated unblock status in slurm of the following accounts: [\"root\",\"nscc\"]"}
{"level":30,"time":"2024-09-10T00:51:08.173Z","pid":17,"hostname":"f85eaec4f075","plugin":"syncBlockStatus","msg":"Updated unblock status failed in slurm of the following accounts: []"}
{"level":30,"time":"2024-09-10T00:51:08.195Z","pid":17,"hostname":"f85eaec4f075","msg":"Listening at 5000"}
(node:17) DeprecationWarning: Calling start() is no longer necessary. It can be safely omitted.
(Use `node --trace-deprecation ...` to show where the warning was created)

运行环境 | Environment

- OS: ubuntu 20.04
- Scheduler: 23.11.0
- Docker: 24.0.9
- Docker-compose: v2.24.1
- SCOW cli: 1.5.2
- SCOW: 1.5.2
- Adapter: 1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants