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

Dev/licenses #312

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Dev/licenses #312

wants to merge 5 commits into from

Conversation

huerni
Copy link
Collaborator

@huerni huerni commented Aug 14, 2024

huerni added a commit that referenced this pull request Aug 16, 2024
feat: parse licenses config

feat: queryLicenses

feat: licenses malloc and free

refactor

feat: Add licenses configuration to the config template file

refactor

feat: Use the cqueue -L parameter to query task information for specified licenses.

fix: No error is reported when the task requests non-existent licenses.

merge master

feat: display 'licenses' for the pending queue reason.

fix: ctld restarts without allocating licenses.

merge master

refactor
@huerni
Copy link
Collaborator Author

huerni commented Aug 19, 2024

merge有问题,改用rebase

@huerni huerni force-pushed the dev/licenses branch 2 times, most recently from b5a1b64 to 15cd2e0 Compare August 20, 2024 02:21
src/Utilities/PublicHeader/String.cpp Outdated Show resolved Hide resolved
@@ -245,7 +247,8 @@ message TaskInfo {
string username = 15;
string qos = 16;
ResourceView res_view = 17;

string licenses = 18;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里怎么不用map<string, uint32> licenses_count?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像是这里只在前端展示用,然后直接后端转成string了

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是用map好一点

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/CraneCtld/CtldPublicDefs.h Outdated Show resolved Hide resolved
src/CraneCtld/CtldPublicDefs.h Outdated Show resolved Hide resolved
src/CraneCtld/LicensesManager.h Outdated Show resolved Hide resolved
src/Utilities/PublicHeader/include/crane/String.h Outdated Show resolved Hide resolved
huerni and others added 2 commits October 31, 2024 13:50
fix: setfields

fix: The task that exceeds the total number of licenses should generate an error.
@L-Xiafeng L-Xiafeng linked an issue Oct 31, 2024 that may be closed by this pull request
@L-Xiafeng L-Xiafeng added the enhancement New feature or request label Nov 6, 2024
@@ -245,7 +247,8 @@ message TaskInfo {
string username = 15;
string qos = 16;
ResourceView res_view = 17;

string licenses = 18;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是用map好一点


namespace Ctld {

using unorderedLicensesMap = absl::flat_hash_map<LicenseId, License>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以用AtomicMap,就不用锁了

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

Successfully merging this pull request may close these issues.

添加license管理功能
2 participants