Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7011

Failures in Fabric GitDataStoreImpl.doPullInternal() may escape without getting logged or handled

    XMLWordPrintable

Details

    • % %

    Description

      There is the possibility that errors that happen as part of a containers git pull do not get handled nor logged.

      When a git level change is to be propagated to all containers, they all call GitDataStoreImpl.doPullInternal().

      This calls pullPushPolicy.doPull().
      Now in DefaultPullPushPolicy.doPull() it fairly early logs

      Performing a pull on remote URL: ..
      

      However there are code paths that can lead to returning from this method in error conditions but without the error being logged or handled.

      If there are any exceptions raised in method DefaultPullPushPolicy.doPull() after calling git.fetch()...call() these result in this code path getting called:

              } catch (Exception ex) {
                  return new AbstractPullPolicyResult(ex);
              }
      

      where the exception is not logged. It returns an AbstractPullPolicyResult instance carrying the exception.
      However the calling method GitDataStoreImpl.doPullInternal() has

          private PullPolicyResult doPullInternal(GitContext context, CredentialsProvider credentialsProvider, boolean allowVersionDelete) {
              PullPolicyResult pullResult = pullPushPolicy.doPull(context, credentialsProvider, allowVersionDelete);
              if (pullResult.getLastException() == null) {
      ...
              }
              return pullResult;
          }
      

      and in case of an exception, its simply ignored and not handled nor logged.
      This may leave the local git repo in an inconsistent state.

      Attachments

        Issue Links

          Activity

            People

              ggrzybek Grzegorz Grzybek
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: