Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3056

Business Central remains "Container Creating" if missing known_hosts file in the githooks configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.10.0.GA
    • 7.8.0.GA
    • Cloud
    • None
    • Release Notes
    • CR1
    • When using Githooks in Business Central, both known_hosts and id_rsa files must be provided. Otherwise, Business Central pod won't start.
    • Hide

      1. Create your post-commit script:

      cat post-commit
      #!/usr/bin/sh
      echo "running post-commit git hook"
      git clone git@github.com:Sgitario/kjar-examples.git
      

      2. Upload the post-commit file into Openshift:

      oc create configmap githook-post-commit --from-file=post-commit=post-commit
      

      3. Create the secrets:

      oc create secret generic githook-ssh-key-secret --from-file=id_rsa=/mypath/.ssh/id_rsa
      

      Note that the known_hosts mapping is missing!

      4. Business Central:

      apiVersion: app.kiegroup.org/v2
      kind: KieApp
      metadata:
        name: myapp
      spec:
        objects:
          console:
            gitHooks: 
              from:
                kind: ConfigMap
                name: githook-post-commit
              sshSecret: githook-ssh-key-secret
         //...
      

       

      Show
      1. Create your post-commit script: cat post-commit #!/usr/bin/sh echo "running post-commit git hook" git clone git@github.com:Sgitario/kjar-examples.git 2. Upload the post-commit file into Openshift: oc create configmap githook-post-commit --from-file=post-commit=post-commit 3. Create the secrets: oc create secret generic githook-ssh-key-secret --from-file=id_rsa=/mypath/.ssh/id_rsa Note that the known_hosts mapping is missing! 4. Business Central: apiVersion: app.kiegroup.org/v2 kind: KieApp metadata: name: myapp spec: objects: console: gitHooks: from: kind: ConfigMap name: githook-post-commit sshSecret: githook-ssh-key-secret //...  
    • 2020 Week 40-42 (from Sep 28), 2020 Week 43-45 (from Okt 19), 2020 Week 46-48 (from Nov 9)

      When the known_hosts file is missing from the githook secret, the Business Central pod remains stuck at "Container Creating" status and we can't easily see why (no errors or events).
      The expected behaviour would be to let users know why the pod can't start (via errors or events) or set the pod at Error because the known_hosts file is missing.

      This is working fine whether the known_host file is provided:

      oc create secret generic githook-ssh-key-secret --from-file=id_rsa=test_manual/.ssh/id_rsa --from-file=known_hosts=test_manual/.ssh/known_hosts 

        1. screen-shot.png
          60 kB
          Massimiliano Dessi

              mdessi-1 Massimiliano Dessi
              jcarvaja@redhat.com Jose Carvajal Hilario
              Jakub Schwan Jakub Schwan
              Jakub Schwan Jakub Schwan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: