Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Open Source Software
Zipr Toolchain
Commits
3fced135
Commit
3fced135
authored
6 years ago
by
Matthew McGill
Browse files
Options
Downloads
Patches
Plain Diff
thanos integration
Former-commit-id: 1bb613c9fd782df42ad8202f82afb75b921f94c8
parent
dd932837
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/ps_analyze.sh
+30
-18
30 additions, 18 deletions
tools/ps_analyze.sh
with
30 additions
and
18 deletions
tools/ps_analyze.sh
+
30
−
18
View file @
3fced135
...
@@ -543,24 +543,36 @@ perform_step()
...
@@ -543,24 +543,36 @@ perform_step()
echo
-n
Performing step
"
$step
"
[
dependencies
=
$mandatory
]
...
echo
-n
Performing step
"
$step
"
[
dependencies
=
$mandatory
]
...
starttime
=
`
$PS_DATE
`
starttime
=
`
$PS_DATE
`
# If verbose is on, tee to a file
# First, check if using Transform_Step plugin architecture
if
[
!
-z
"
$DEBUG_STEPS
"
]
;
then
echo
"
$command
"
|grep
"lib
$step
\.
so "
>
/dev/null
$command
grep_res
=
$?
command_exit
=
$?
if
[
$grep_res
-eq
0
]
;
then
elif
[
!
-z
"
$VERBOSE
"
]
;
then
if
[[
"
$(
stop_if_error
$step
)
"
!=
"0"
]]
;
then
$command
2>&1 |
tee
$logfile
echo
"EXECUTE_STEP CRITICAL
$command
"
>
$input_pipe
command_exit
=
${
PIPESTATUS
[0]
}
# this funkiness gets the exit code of $command, not tee
else
else
echo
"EXECUTE_STEP OPTIONAL
$command
"
>
$input_pipe
echo
"
$command
"
|grep
"lib
$step
\.
so "
>
/dev/null
fi
grep_res
=
$?
if
[
$grep_res
-eq
0
]
;
then
read
-r
thanos_res <
$output_pipe
if
[[
"
$(
stop_if_error
$step
)
"
!=
"0"
]]
;
then
echo
"EXECUTE_STEP CRITICAL
$command
"
>
$input_pipe
if
[
"
$thanos_res
"
=
"ERR_INVALID_CMD"
]
;
then
else
echo
Internal Transform_Step plugin architecture error.
echo
"EXECUTE_STEP OPTIONAL
$command
"
>
$input_pipe
echo
Exiting ps_analyze early.
fi
exit
-1
read
-r
thanos_res <
$output_pipe
elif
[
"
$thanos_res
"
=
"STEP_UNSUPPORTED"
]
;
then
echo
"Response was
$thanos_res
"
command_exit
=
127
# command not found
else
command_exit
=
$thanos_res
fi
else
# Otherwise, do things the old way (step is its own process)
# If verbose is on, tee to a file
if
[
!
-z
"
$DEBUG_STEPS
"
]
;
then
$command
command_exit
=
$?
elif
[
!
-z
"
$VERBOSE
"
]
;
then
$command
2>&1 |
tee
$logfile
command_exit
=
${
PIPESTATUS
[0]
}
# this funkiness gets the exit code of $command, not tee
else
else
$command
>
$logfile
2>&1
$command
>
$logfile
2>&1
command_exit
=
$?
command_exit
=
$?
...
...
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