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

Karaf 4 startup script fails on Openshift

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.0
    • fuse-7.0
    • FIS-Karaf
    • None
    • % %
    • Fuse 7.0 Sprint 21

      Here's an excerpt from the Karaf 4 /deployments/karaf/bin/karaf script:

          OURPWD=${PWD}
          cd "$(dirname "${1}")" || exit 2
          LINK=$(readlink "$(basename "${1}")")
          while [ "${LINK}" ]; do
      	    echo "link: ${LINK}" >&2
              cd "$(dirname "${LINK}")" || exit 2
              LINK=$(readlink "$(basename "${1}")")
          done
          REALPATH="${PWD}/$(basename "${1}")"
          cd "${OURPWD}" || exit 2
          echo "${REALPATH}" 
      

      It saves the initial directory path in OURPWD and attempts to cd back to it later on. On Openshift this starts as /home/jboss. But since we'll be running under an arbitrary UID, the cd switch back to /home/jboss fails:

      Executing /deployments/karaf/bin/karaf server ...
      /deployments/karaf/bin/karaf: line 31: cd: /home/jboss: Permission denied
      /deployments/karaf/bin/karaf: line 55: ./inc: Permission denied 
      

              Unassigned Unassigned
              jnethert@redhat.com James Netherton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: