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
e35d63f1
Commit
e35d63f1
authored
12 years ago
by
Sebastien Ponce
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug #95576: "entertapepool" doesn't check vmgr
parent
918d5f0d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hsmtools/entermigrationroute
+1
-1
1 addition, 1 deletion
hsmtools/entermigrationroute
hsmtools/entertapepool
+10
-1
10 additions, 1 deletion
hsmtools/entertapepool
hsmtools/entertapepool.man
+8
-0
8 additions, 0 deletions
hsmtools/entertapepool.man
with
19 additions
and
2 deletions
hsmtools/entermigrationroute
+
1
−
1
View file @
e35d63f1
...
...
@@ -124,7 +124,7 @@ try:
stcur
.
execute
(
'
SELECT * FROM MigrationRouting WHERE fileclass=:fcid
'
,
fcid
=
fileClassId
)
rows
=
stcur
.
fetchall
()
if
len
(
rows
)
>
0
:
print
'
Migration route(s) already exist for FileClass %s. Please remove
them
first
'
%
fileclassname
print
'
Migration route(s) already exist for FileClass %s. Please remove first
'
%
fileclassname
print
'
Giving up
'
sys
.
exit
(
1
)
# check validity of copyNbs and tapePoolNames
...
...
This diff is collapsed.
Click to expand it.
hsmtools/entertapepool
+
10
−
1
View file @
e35d63f1
...
...
@@ -125,13 +125,22 @@ try:
# connect to stager
stconn
=
castor_tools
.
connectToStager
()
stcur
=
stconn
.
cursor
()
# check that the tape pool does exist
# check that the tape pool does
not
exist
in the stager
stcur
.
execute
(
'
SELECT id FROM TapePool WHERE name=:name
'
,
name
=
tapePoolName
)
rows
=
stcur
.
fetchall
()
if
len
(
rows
)
!=
0
:
print
'
TapePool %s already exists in the stager DB
'
%
tapePoolName
print
'
You may want to use modifytapepool
'
sys
.
exit
(
1
)
# check that the tapepool exists in the vmgr
stconnvmgr
=
castor_tools
.
connectToVmgr
()
stcurvmgr
=
stconnvmgr
.
cursor
()
stcurvmgr
.
execute
(
'
SELECT * FROM VMGR_TAPE_POOL WHERE name=:name
'
,
name
=
tapePoolName
)
rows
=
stcurvmgr
.
fetchall
()
if
len
(
rows
)
==
0
:
print
'
Tape pool %s does not exist in VMGR
'
%
tapePoolName
print
'
Giving up
'
sys
.
exit
(
1
)
# get info on user running this command
lasteditor
=
pwd
.
getpwuid
(
os
.
getuid
())[
0
]
# insert new tapepool
...
...
This diff is collapsed.
Click to expand it.
hsmtools/entertapepool.man
+
8
−
0
View file @
e35d63f1
...
...
@@ -79,6 +79,14 @@ inserted tape pool testtapepool successfully
newtapepool 0 100GiB 1000 12h 7 sponcec3 30-Aug-2011 16:32:15
testtapepool 2 23MiB 1000 12h23mn 8 sopncec3 30-Aug-2011 16:42:32
# entertapepool testtapepool
TapePool testtapepool already exists in the stager DB
You may want to use modifytapepool
# entertapepool nonexistingtapepool
Tape pool nonexistingtapepool does not exist in VMGR
Giving up
.SH NOTES
This command requires database client access to the stager catalog and nameserver DBs.
Configuration for the database accesses is taken from castor.conf.
...
...
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