Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Elemer Nagy
athena
Commits
10dd2ae9
Commit
10dd2ae9
authored
7 years ago
by
Oleg Zenin
Committed by
Emil Obreshkov
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
RPM to EOS copy: 5 retries for mkdir and cp before counting failure as an error
Former-commit-id:
7178fb14
parent
388d3e1b
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Build/AtlasBuildScripts/copy_rpm_eos.sh
+18
-2
18 additions, 2 deletions
Build/AtlasBuildScripts/copy_rpm_eos.sh
with
18 additions
and
2 deletions
Build/AtlasBuildScripts/copy_rpm_eos.sh
+
18
−
2
View file @
10dd2ae9
...
@@ -65,9 +65,25 @@ echo "====================================================="
...
@@ -65,9 +65,25 @@ echo "====================================================="
DESTDIR
=
${
DESTDIR
}
/
${
BRANCH
}
/
${
ARCH
}
/
${
DDAY
}
DESTDIR
=
${
DESTDIR
}
/
${
BRANCH
}
/
${
ARCH
}
/
${
DDAY
}
_retry_
()
{
local
cmd
=
"
$*
"
dt
=
16
retr
=
0
while
!
$cmd
;
do
if
test
$retr
-ge
6
;
then
echo
"ERROR: 6 retries of
$cmd
FAILED ... "
>
&2
return
1
fi
echo
"WARNING:
$cmd
failed, waiting
$dt
sec ..."
sleep
${
dt
}
s
dt
=
`
expr
$dt
+
$dt
`
retr
=
`
expr
$retr
+ 1
`
done
return
0
}
if
[
!
-d
${
DESTDIR
}
]
;
then
if
[
!
-d
${
DESTDIR
}
]
;
then
echo
"mkdir -p
${
DESTDIR
}
"
echo
"mkdir -p
${
DESTDIR
}
"
mkdir
-p
${
DESTDIR
}
_retry_
mkdir
-p
${
DESTDIR
}
if
[
!
-d
${
DESTDIR
}
]
;
then
((
ERROR_COUNT++
))
;
fi
#avoid false positive eos error if the directory was actually created
if
[
!
-d
${
DESTDIR
}
]
;
then
((
ERROR_COUNT++
))
;
fi
#avoid false positive eos error if the directory was actually created
fi
fi
...
@@ -79,7 +95,7 @@ if [ "${#arr_rpm[@]}" -le 0 ]; then
...
@@ -79,7 +95,7 @@ if [ "${#arr_rpm[@]}" -le 0 ]; then
for
ele
in
"
${
arr_rpm
[@]
}
"
for
ele
in
"
${
arr_rpm
[@]
}
"
do
do
echo
"Info: copying
$ele
to
${
DESTDIR
}
"
echo
"Info: copying
$ele
to
${
DESTDIR
}
"
cp
-a
$ele
${
DESTDIR
}
||
((
ERROR_COUNT++
))
_retry_
cp
-a
$ele
${
DESTDIR
}
||
((
ERROR_COUNT++
))
done
done
fi
fi
echo
"====================================================="
echo
"====================================================="
...
...
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