Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
custom-metrics-generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cloud
custom-metrics-generator
Commits
5b5bc77b
Commit
5b5bc77b
authored
3 years ago
by
František Řezníček
Browse files
Options
Downloads
Patches
Plain Diff
fix: gpumon GPU_DEVICES_UNRECOGNIZED detection crash
parent
f039320f
No related branches found
No related tags found
No related merge requests found
Pipeline
#161351
passed
3 years ago
Stage: build-image
Stage: release-image
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
src/metric-generators/gpumon.sh
+2
-2
2 additions, 2 deletions
src/metric-generators/gpumon.sh
with
6 additions
and
2 deletions
CHANGELOG.md
+
4
−
0
View file @
5b5bc77b
...
...
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.2.4] - 2022-06-07
### Added
-
gpumon: GPU_DEVICES_UNRECOGNIZED detection reworked without grep, with gawk, avoiding crash
## [1.2.3] - 2022-06-07
### Added
-
gpumon: publish at least a metric help (metric-generator-exec requirement)
...
...
This diff is collapsed.
Click to expand it.
src/metric-generators/gpumon.sh
+
2
−
2
View file @
5b5bc77b
...
...
@@ -47,8 +47,8 @@ function find_gpu_passthough_vm_manifest () {
# gather all GPU cards (assure device model name is detected)
STAGE_NAME
=
"GPU cards successfully detected"
GPU_DEVICES
=
"
$(
get_gpu_devices
)
"
GPU_DEVICES_UNRECOGNIZED
=
"
$(
echo
"
${
GPU_DEVICES
}
"
|
gawk
'BEGIN{FPAT = "(\"[^\"]+\")"}{print $3}'
|
\
sort
-u
|
tr
-d
'"'
|
grep
-Ev
'.+[ \t]\[.+\]
'
)
"
GPU_DEVICES_UNRECOGNIZED
=
"
$(
echo
"
${
GPU_DEVICES
}
"
|
\
gawk
'BEGIN{FPAT = "(\"[^\"]+\")"}{if (!($3 ~ /.+[ \t]\[.+\]/)) {print $3}}
'
)
"
if
[
-n
"
${
GPU_DEVICES_UNRECOGNIZED
}
"
]
;
then
# reload GPU devices and resolve proper device names with internet PCI id database
GPU_DEVICES
=
"
$(
get_gpu_devices
-q
)
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment