Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30577

System Build submission fails with error Name has already been taken when subscribed to Build Entered shellhook

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.16.1
    • Hooks and Webhooks
    • Important
    • Yes

      Description of problem:

      A satellite 6.16.1 can perform host builds just fine. But when we create a shell hook and subscribe it to the "Build Entered" event, that does not allow creating and submitting a host for the build will result in a "Name has already been taken" error but the host entry would be created ( perhaps partially ). 

       

      How reproducible:

      100%

       

      Is this issue a regression from an earlier version:

      Yes ( it works fine on 6.15.z and before )

       

      Steps to Reproduce:

      1. Install a satellite 6.16.1 and configure it for system build ( DHCP \ DNS \ TFTP \ kickstart \ HG \ CV \ LCE \ Subnet \ Domain \ Activation Key )

      2. Try to submit a fake system build using a fake mac address and see if the build submission works as expected or not. 

      3. Enable shellhook feature via installer

      4. Setup a basic shellhook script, template and webhook and subscribe it to Build Entered event. 

      5. Repeat step 2 with a different name , mac and IP while monitoring proxy.log and production.log 

      6. Simply disable the Webhook and repeated Step 5 with a new IP and mac and name.

       

      Actual behavior:

      • Host entry created in backend but it also shows "Failed to save: Name has already been taken"
      • I get to see "ForemanWebhooks::EventSubscriber: build_entered.event.foreman event received" but nothing else after that in production.log or proxy.log
      • If i click on Cancel on the form, Then i get to see the host entry is created but perhaps partially. 
      • Step 6 would be successful. 

       

      Expected behavior:
      Everything should work as it did on Satellite 6.15 or before. 

       

      Business Impact / Additional info:

      Unable to build hosts.

      Unable to use shellhooks or webhooks for further automation. 

              ofedoren@redhat.com Oleh Fedorenko
              rhn-support-saydas Sayan Das
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: