Description of problem: When an app DNS record fails to be created/deleted for some reason, there is no useful output. Only an error 'error adding app record GEARUUID-domain.example.com`. This does not give any information on why the nsupdate command that the broker uses to create DNS entries failed. Version-Release number of selected component (if applicable): 2.1 How reproducible: Always Steps to Reproduce: 1. Temporarily take down the DNS server for an OpenShift instance 2. Attempt to create a gear 3. Actual results: 2014-03-22 18:07:58.290 [ERROR] Reference ID: 20101eec951f6f326a628e8aa3dfd1db - error adding app record 5i7z05icq-comp.prd-platform.ficoanalyticcloud.com Expected results: 2014-03-22 18:07:58.290 [ERROR] Reference ID: 20101eec951f6f326a628e8aa3dfd1db - error adding app record 5i7z05icq-comp.prd-platform.ficoanalyticcloud.com - nsupdate output: example error output Additional info: Current code: ======================= def register_application(app_name, namespace, public_hostname) # create an A record for the application in the domain fqdn = "#{app_name}-#{namespace}.#{@domain_suffix}" cmd = add_cmd(fqdn, public_hostname) <--- nsupdate command is created through add_cmd method and assigned to `cmd` success = system cmd <--- `cmd` is run if not success <--- if `cmd` returns false, raise error raise DNSException.new("error adding app record #{fqdn}") <---- here is the error end end ======================= Using `system` to run a command doesn't return the output, but just true or false, depending on the exit code of the command. It would be useful to use the backticks instead so that output from nsupdate is returned. Then, we can return the output in the error reported.
https://github.com/openshift/origin-server/pull/5408
For some reason, when the PR merged, no note was made here, and the state wasn't changed. It should be QEed just to be sure.