Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
dCache
cta
Commits
0699e8ee
Commit
0699e8ee
authored
7 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Added directory for EOS workflow scripts
parent
6824973c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
eos_wfe_scripts/README
+10
-0
10 additions, 0 deletions
eos_wfe_scripts/README
eos_wfe_scripts/create_tape_drop_disk_replicas
+26
-0
26 additions, 0 deletions
eos_wfe_scripts/create_tape_drop_disk_replicas
with
36 additions
and
0 deletions
eos_wfe_scripts/README
0 → 100644
+
10
−
0
View file @
0699e8ee
This directory contains scripts to be executed by the EOS workflow engine.
These scripts should be installed in the foillowing directory on the EOS
mgm node:
/var/eos/wfe/bash/
For example the following script is executed when a tape server triggers
an archived.default workflow event:
/var/eos/wfe/bash/create_tape_drop_disk_replicas
This diff is collapsed.
Click to expand it.
eos_wfe_scripts/create_tape_drop_disk_replicas
0 → 100755
+
26
−
0
View file @
0699e8ee
#!/bin/bash
if
test
$#
-ne
3
;
then
echo
"Wrong number of command-line arguments"
echo
"Usage: create_tape_drop_disk_replicas wf_tag file_path tape_fs_id"
exit
-1
fi
WF_TAG
=
"
$1
"
FILE_PATH
=
"
$2
"
TAPE_FS_ID
=
"
$3
"
LOG_FILE
=
"/var/log/eos/wfe/
${
WF_TAG
}
.log"
echo
`
date
+%s
`
`
date
`
"
$0
Creating tape replica with fsid
${
TAPE_FS_ID
}
for
${
FILE_PATH
}
"
>>
${
LOG_FILE
}
if
!
eos
-r
0 0 file tag
"
${
FILE_PATH
}
"
+
${
TAPE_FS_ID
}
;
then
echo
`
date
+%s
`
`
date
`
" Failed to create tape replica with fsid
${
TAPE_FS_ID
}
for
${
FILE_PATH
}
"
>>
${
LOG_FILE
}
exit
1
fi
for
DISK_FSID
in
`
eos file info
"
${
FILE_PATH
}
"
-m
|
sed
s/
\
/
'\n'
/g |
grep
fsid |
sed
s/fsid
=
// |
grep
-v
${
TAPE_FS_ID
}
`
;
do
echo
`
date
+%s
`
`
date
`
"
$0
Deleting disk replica with fsid
${
DISK_FSID
}
for
${
FILE_PATH
}
"
>>
${
LOG_FILE
}
if
!
eos
-r
0 0 file drop
"
${
FILE_PATH
}
"
${
DISK_FSID
}
;
then
echo
`
date
+%s
`
`
date
`
"
$0
Failed to delete disk replica with fsid
${
DISK_FSID
}
for
${
FILE_PATH
}
"
>>
${
LOG_FILE
}
exit
1
fi
done
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