From 30747bd4b7ff6b3d17ae4ed87829d5fe98f90cdb Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Tue, 27 Sep 2016 13:05:30 -0500 Subject: [PATCH 1/2] Update requirements to accommodate already-running CE service --- osgtest/tests/test_19_condorce.py | 9 ++++++--- osgtest/tests/test_41_jobs.py | 3 ++- osgtest/tests/test_55_condorce.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/osgtest/tests/test_19_condorce.py b/osgtest/tests/test_19_condorce.py index 1bf11064..d6be8f51 100644 --- a/osgtest/tests/test_19_condorce.py +++ b/osgtest/tests/test_19_condorce.py @@ -94,12 +94,15 @@ def test_05_start_condorce(self): core.state['condor-ce.schedd-ready'] = False core.skip_ok_unless_installed('condor', 'htcondor-ce', 'htcondor-ce-client') - self.skip_ok_if(service.is_running('condor-ce'), 'already running') - service.start('condor-ce') - collector_log, _, _ = core.check_system(('condor_ce_config_val', 'COLLECTOR_LOG'), 'Failed to query for Condor CE CollectorLog path') core.config['condor-ce.collectorlog'] = collector_log.strip().strip() + + if service.is_running('condor-ce'): + core.state['condor-ce.schedd-ready'] = True + self.skip_ok('already running') + service.start('condor-ce') + try: stat = os.stat(core.config['condor-ce.collectorlog']) except OSError: diff --git a/osgtest/tests/test_41_jobs.py b/osgtest/tests/test_41_jobs.py index 0eb6eb99..9dd06a81 100644 --- a/osgtest/tests/test_41_jobs.py +++ b/osgtest/tests/test_41_jobs.py @@ -8,6 +8,7 @@ import tempfile import osgtest.library.core as core +import osgtest.library.service as service import osgtest.library.osgunittest as osgunittest class TestRunJobs(osgunittest.OSGTestCase): @@ -99,7 +100,7 @@ def test_04_condor_run_pbs(self): def test_05_condor_ce_run_condor(self): core.skip_ok_unless_installed('htcondor-ce', 'htcondor-ce-client', 'htcondor-ce-condor', 'condor') - self.skip_bad_unless(core.state['condor-ce.started-service'], 'ce not started') + self.skip_bad_unless(service.is_running('condor-ce'), 'ce not running') self.skip_bad_unless(core.state['jobs.env-set'], 'job environment not set') command = ('condor_ce_run', '-r', '%s:9619' % core.get_hostname(), '/bin/env') diff --git a/osgtest/tests/test_55_condorce.py b/osgtest/tests/test_55_condorce.py index c18f2291..fc70deec 100644 --- a/osgtest/tests/test_55_condorce.py +++ b/osgtest/tests/test_55_condorce.py @@ -13,7 +13,7 @@ class TestCondorCE(osgunittest.OSGTestCase): def general_requirements(self): core.skip_ok_unless_installed('condor', 'htcondor-ce', 'htcondor-ce-client') - self.skip_bad_unless(core.state['condor-ce.started-service'], 'ce not running') + self.skip_bad_unless(service.is_running('condor-ce'), 'ce not running') def test_01_status(self): self.general_requirements() From 1daa6648aea7f507e0deb1086b5c76f891d1fb8f Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Wed, 28 Sep 2016 13:00:40 -0500 Subject: [PATCH 2/2] Restart the CE if it's already running to acccommodate bad packaging in htcondor-ce-2.0.8-2 --- osgtest/tests/test_19_condorce.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osgtest/tests/test_19_condorce.py b/osgtest/tests/test_19_condorce.py index d6be8f51..63e9ce13 100644 --- a/osgtest/tests/test_19_condorce.py +++ b/osgtest/tests/test_19_condorce.py @@ -99,6 +99,17 @@ def test_05_start_condorce(self): core.config['condor-ce.collectorlog'] = collector_log.strip().strip() if service.is_running('condor-ce'): + # Required to accept changes to the mapfile, which caused + # issues in the nightly due to bad htcondor-ce-2.0.8-2 + # packaging remove after OSG 3.3.17. We don't use service.stop() + # because it only stops services that we've started + if core.el_release() < 7: + command = ('service', 'condor-ce', 'stop') + else: + command = ('systemctl', 'stop', 'condor-ce') + core.check_system(command, 'Stop condor-ce service') + service.start('condor-ce') + core.state['condor-ce.schedd-ready'] = True self.skip_ok('already running') service.start('condor-ce')