Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8954

Wildcard domain ending in a number causes 3scale to fail to install correctly

XMLWordPrintable

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Hide
      • Install 3scale Operator
      • Create APIManager with `example.com2` wildcard domain
      • Observe error in system-app-1-hook-pre pod
        • (it will restart so you will need to get it previous logs or follow it)
      • Observe that system-app comes up but is missing all data
      Show
      Install 3scale Operator Create APIManager with `example.com2` wildcard domain Observe error in system-app-1-hook-pre pod (it will restart so you will need to get it previous logs or follow it) Observe that system-app comes up but is missing all data

      Current behaviour

      When installing 3scale, if you end the wildcard domain in a number (i.e. example.com2) it will fail to install correctly.

      The system-app-1-hook-pre will result in the following error:

      rake aborted!
      ActiveRecord::RecordNotSaved: Failed to save the new associated billing_strategy.
      

      There is no actual indication that the issue is the domain name though as can be seen in the attached logs

      The pre hook phase will then "complete" then system-app will be missing critical information. 

      Attached is the full log from the pre hook container.

      By enabling the `RAILS_LOG_LEVEL=debug` before installation the following error is logged:

      ActiveRecord::RecordInvalid: Validation failed: Support email should look like an email address, Finance support email should look like an email address
      

      Because the initContainer logs are not persisted, this is hard to catch. As mentioned in the steps to reproduce it's necessary to follow the pod logs while the pre hook phase is executing before it fails and the container is restarted and then the logs disappear (there is nothing we can do to change that).

      Expected behaviour

      If the pre hook phase doesn't complete successfully then it should exit with a failure and NOT continue to allow the application to be deployed into a broken state. However, this issue is primarily trying to address the allowed format for the WILDCARD_DOMAIN which currently does not allow numeric chars at the end.

      Is this on purpose? If so, do we want to allow it? amasferr Or just document it?

              Unassigned Unassigned
              rhn-support-spoole Shannon Poole
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: