Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26719

Intermittant exception generated using clearcase plugin & dynamic view when running mkview immediately after the rmview

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • clearcase-plugin
    • Jenkins 1.580.1, RHEL 5.7, Dynamic view, NetApp view storage, ClearCase 7.1.2.6

      Our jobs are setup to use dynamic views and the settings are to remove view and re-create a clean view every time the job runs.

      I am also using a static view tag name. So we use the view name over and over.

      So when the job runs, the clearcase plugin will remove the dynamic view using rmview followed immediately with a mkview. We intermittently see an exception on the mkview.

      [Draco_ML-MPH6] $ /usr/atria//bin/cleartool lsview mrfbldac_Draco_ML-MPH6

      • mrfbldac_Draco_ML-MPH6 /ccase_viewstg/mrfbldac/mrfbldac_Draco_ML-MPH6.vws

      [Draco_ML-MPH6] $ /usr/atria//bin/cleartool rmview -force -tag mrfbldac_Draco_ML-MPH6
      Removing references from VOB "/vobs/mrf_vob1" ...
      Removed references to view "/ccase_viewstg/mrfbldac/mrfbldac_Draco_ML-MPH6.vws" from VOB "/vobs/mrf_vob1".
      Removing references from VOB "/vobs/mrf_pvob" ...
      Removed references to view "/ccase_viewstg/mrfbldac/mrfbldac_Draco_ML-MPH6.vws" from VOB "/vobs/mrf_pvob".

      [Draco_ML-MPH6] $ /usr/atria//bin/cleartool mkview -stream Draco_ML_int@/vobs/mrf_pvob -tag mrfbldac_Draco_ML-MPH6 -stgloc -auto
      Selected Server Storage Location "inview02_viewstg".
      cleartool: Error: Failed to record hostname "inview02" in storage directory "/ccase_viewstg/mrfbldac/mrfbldac_Draco_ML-MPH6.vws". Check that root or the ClearCase administrators group has permission to write to this directory.
      cleartool: Error: Unable to create view "/ccase_viewstg/mrfbldac/mrfbldac_Draco_ML-MPH6.vws".

      FATAL: UCM ClearCase failed. exit code=1
      java.io.IOException: cleartool did not return the expected exit code. Command line="mkview -stream Draco_ML_int@/vobs/mrf_pvob -tag mrfbldac_Draco_ML-MPH6 -stgloc -auto", actual exit code=1
      at hudson.plugins.clearcase.HudsonClearToolLauncher.run(HudsonClearToolLauncher.java:152)
      at hudson.plugins.clearcase.ClearToolExec.mkview(ClearToolExec.java:562)
      at hudson.plugins.clearcase.action.UcmDynamicCheckoutAction.prepareView(UcmDynamicCheckoutAction.java:217)
      at hudson.plugins.clearcase.action.UcmDynamicCheckoutAction.checkout(UcmDynamicCheckoutAction.java:88)
      at hudson.plugins.clearcase.AbstractClearCaseScm.checkout(AbstractClearCaseScm.java:383)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1253)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
      at hudson.model.Run.execute(Run.java:1745)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      Started calculate disk usage of build
      Finished Calculation of disk usage of build in 0 seconds
      Started calculate disk usage of workspace
      Finished Calculation of disk usage of workspace in 0 seconds
      Finished: FAILURE

      This article seems to indicate that when removing a view an immediately re-creating it causes the error when using NFS shares. The article seems to indicate that a brief delay between the rmview/mkview will resolve the issue:

      https://sdecorner.wordpress.com/2013/05/06/clearcaseerror-when-re-creating-a-view-on-nfs-share/

          [JENKINS-26719] Intermittant exception generated using clearcase plugin & dynamic view when running mkview immediately after the rmview

          I see there was a configurable delay added after the "endview" command to resolve some issues. Can we also do the same right after the "rmview" command?
          Seems like it would be a simple one line change to add the same delay after "rmview". If someone could get me a version of the plugin with the change I can test it for them.

          j

          John Lengeling added a comment - I see there was a configurable delay added after the "endview" command to resolve some issues. Can we also do the same right after the "rmview" command? Seems like it would be a simple one line change to add the same delay after "rmview". If someone could get me a version of the plugin with the change I can test it for them. j

          Code changed in jenkins
          User: Vincent LATOMBE
          Path:
          src/main/java/hudson/plugins/clearcase/ClearToolExec.java
          src/main/resources/hudson/plugins/clearcase/ClearCaseInstallation/global.jelly
          src/main/resources/hudson/plugins/clearcase/ClearCaseInstallation/help-endViewDelay.html
          http://jenkins-ci.org/commit/clearcase-plugin/322ca3bf4f4ef69a0fcf75d534382ece152b2f51
          Log:
          JENKINS-26719 The delay for endview now applies as well for rmview
          commands.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent LATOMBE Path: src/main/java/hudson/plugins/clearcase/ClearToolExec.java src/main/resources/hudson/plugins/clearcase/ClearCaseInstallation/global.jelly src/main/resources/hudson/plugins/clearcase/ClearCaseInstallation/help-endViewDelay.html http://jenkins-ci.org/commit/clearcase-plugin/322ca3bf4f4ef69a0fcf75d534382ece152b2f51 Log: JENKINS-26719 The delay for endview now applies as well for rmview commands.

          Vincent Latombe added a comment - Hi John, can you give a try with https://jenkins.ci.cloudbees.com/job/plugins/job/clearcase-plugin/89/org.jenkins-ci.plugins$clearcase/artifact/org.jenkins-ci.plugins/clearcase/1.5.4-SNAPSHOT/clearcase-1.5.4-SNAPSHOT.hpi ? The existing delay should now apply to rmview commands.

          Code changed in jenkins
          User: Vincent LATOMBE
          Path:
          src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          src/main/java/hudson/plugins/clearcase/ClearToolDynamic.java
          src/main/java/hudson/plugins/clearcase/ClearToolExec.java
          src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java
          http://jenkins-ci.org/commit/clearcase-plugin/07259dba2c6e269b0f007cfafe195b46df1410f0
          Log:
          JENKINS-26719 Enable the delay for dynamic views as well.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent LATOMBE Path: src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java src/main/java/hudson/plugins/clearcase/ClearToolDynamic.java src/main/java/hudson/plugins/clearcase/ClearToolExec.java src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java http://jenkins-ci.org/commit/clearcase-plugin/07259dba2c6e269b0f007cfafe195b46df1410f0 Log: JENKINS-26719 Enable the delay for dynamic views as well.

          Released in 1.6

          Vincent Latombe added a comment - Released in 1.6

            vlatombe Vincent Latombe
            john_lengeling John Lengeling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: