Commit e76f8752 authored by Eric Cano's avatar Eric Cano
Browse files

Moved svcclass to a per-host variable.

Removed too generic setup of service class by variable
Vixed forgotten DB connection.
parent 578bccff
......@@ -156,10 +156,10 @@ sub read_config ( $ )
chomp $local_host;
$environment{hostname} = $local_host;
my @per_host_vars = ( 'username', 'checkout_location', 'file_size', 'file_number', 'castor_directory',
'migration_timeout', 'poll_interval', 'tapepool');
'migration_timeout', 'poll_interval', 'tapepool', 'svcclass');
my @global_vars = ( 'dbDir' , 'tstDir', 'adminList', 'originalDbSchema',
'originalDropSchema', 'castor_single_subdirectory',
'castor_dual_subdirectory', 'svcclass' );
'castor_dual_subdirectory' );
for my $i ( @per_host_vars ) {
$environment{$i}=getConfParam('TAPETEST', $i.'_'.$local_host, $config_file );
}
......@@ -1298,6 +1298,7 @@ sub reinstall_stager_db()
$dbh->disconnect();
die ("Found leftovers in the stager's DB. Stopping here.");
}
$dbh->disconnect();
my $dbUser = &getOrastagerconfigParam("user");
my $dbPasswd = &getOrastagerconfigParam("passwd");
......@@ -1348,7 +1349,7 @@ sub reinstall_stager_db()
`nslistclass | grep NAME | awk '{print \$2}' | xargs -i enterFileClass --Name {} --GetFromCns`;
`enterSvcClass --Name default --DiskPools default --DefaultFileSize 10485760 --FailJobsWhenNoSpace yes --NbDrives 1 --TapePool stager_dev03 --MigratorPolicy defaultMigrationPolicy --StreamPolicy streamPolicyAlwaysReturning1`;
`enterSvcClass --Name $environment{svcclass} --DiskPools extra --DefaultFileSize 10485760 --FailJobsWhenNoSpace yes`;
`enterSvcClass --Name dev --DiskPools extra --DefaultFileSize 10485760 --FailJobsWhenNoSpace yes`;
`enterSvcClass --Name diskonly --DiskPools extra --ForcedFileClass temp --DefaultFileSize 10485760 --Disk1Behavior yes --FailJobsWhenNoSpace yes`;
`moveDiskServer default $diskServers[0]`;
......@@ -1360,9 +1361,9 @@ sub reinstall_stager_db()
my $tapePool = get_environment('tapepool');
`modifySvcClass --Name $environment{svcclass} --AddTapePool $tapePool --MigratorPolicy defaultMigrationPolicy --StreamPolicy streamPolicyAlwaysReturning1`;
# Set the number of drives on the default and $environment{svcclass} service-classes to desired number for each
# Set the number of drives on the default and dev service-classes to desired number for each
`modifySvcClass --Name default --NbDrives 1`;
`modifySvcClass --Name $environment{svcclass} --NbDrives 2`;
`modifySvcClass --Name dev --NbDrives 2`;
}
......
......@@ -9,6 +9,7 @@ TAPETEST castor_directory_lxcastordev03 /castor/cern.ch/dev/c/canoc3/
TAPETEST migration_timeout_lxcastordev03 600
TAPETEST poll_interval_lxcastordev03 5
TAPETEST tapepool_lxcastordev03 stager_dev03_2
TAPETEST svcclass_lxcastordev03 dev
TAPETEST username_lxcastordev04 murrayc3
TAPETEST checkout_location_lxcastordev04 /afs/cern.ch/user/m/murrayc3/castor/checkout/v2_1_9_7_gateway
......@@ -18,6 +19,7 @@ TAPETEST castor_directory_lxcastordev04 /castor/cern.ch/dev/m/murrayc3/
TAPETEST migration_timeout_lxcastordev04 600
TAPETEST poll_interval_lxcastordev04 5
TAPETEST tapepool_lxcastordev04 stager_dev04
TAPETEST svcclass_lxcastordev04 default
# General parameters
......@@ -28,4 +30,3 @@ TAPETEST originalDbSchema stager_oracle_create.sql
TAPETEST originalDropSchema drop_oracle_schema.sql
TAPETEST castor_single_subdirectory migrate_and_recall_10_single_tape_copy_files
TAPETEST castor_dual_subdirectory migrate_and_recall_10_dual_tape_copy_files
TAPETEST svcclass default
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment