Bug 1061400 - deployment causes post to /broker/analytics
Summary: deployment causes post to /broker/analytics
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1054965
TreeView+ depends on / blocked
 
Reported: 2014-02-04 18:51 UTC by Brenton Leanhardt
Modified: 2015-05-14 23:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1054965
Environment:
Last Closed: 2014-03-12 03:06:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brenton Leanhardt 2014-02-04 18:51:48 UTC
+++ This bug was initially created as a clone of Bug #1054965 +++

Description of problem:
When an app deployment occurs from a git push, it's recorded to the broker at /broker/analytics. This isn't apparently deployed with OSE, or at least not with default config. It returns a 500 error (probably because there's no route) which could mislead those looking at logs or packet traces. No other bad effect (not even a stack trace to fill production.log).


How reproducible:
Every time.

Steps to Reproduce:
1. Do an app deployment
2. Look in /var/log/httpd/access_log on the broker

Actual results:
/broker/analytics request with 500 status

Expected results:
No such request, or 2xx status

--- Additional comment from RHEL Product and Program Management on 2014-01-17 15:48:08 EST ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 2 Jhon Honce 2014-02-04 21:49:20 UTC
Added REPORT_BUILD_ANALYTICS to node.conf. Default setting is true.

Comment 3 Luke Meyer 2014-02-04 21:54:13 UTC
Can the default be false? I can't imagine this being useful outside Online. It seems like there should be no need to even be aware of it in Origin/Enterprise.

Comment 4 openshift-github-bot 2014-02-05 05:20:17 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/c02133325e877abcaff316e8e3bf07534583f113
Bug 1061400 - Add REPORT_BROKER_ANALYTICS

* Add element and fix tests

Comment 6 Jhon Honce 2014-02-07 15:55:18 UTC
Visually verified code change in devenv_4343

application_container.rb:
      #
      # Send a fire-and-forget request to the broker to report build analytics.
      #
      def report_build_analytics
        return unless @config.get_bool('REPORT_BUILD_ANALYTICS', true)

Comment 7 Meng Bo 2014-02-08 10:30:06 UTC
Hi Brenton,

After enable the analytics in broker-dev.conf on my devenv, I can not get the report in /var/log/httpd/access_log.
How to enable the analytics log for git push? Any other configures needed?

Thanks

Comment 8 Brenton Leanhardt 2014-02-10 19:08:33 UTC
Hi Bo,

In an Online devenev I suspect the error doesn't show up in /var/log/httpd/access_log.  Try /var/log/openshift/broker/development.log.  Enable analytics in broker-dev.conf and enable reporting in node.conf.  Make sure to restart the relevant services whenever you touch those configs.

Then disable analytics in broker-dev.conf.  The error might show up in access_log at that point (depending on how logging is configured) but it should show up in development.log.

At that point set REPORT_BUILD_ANALYTICS to false in node.conf and the error you previously saw should go away.  That's the effect we want.  Ideally this would be set to false for Origin/OSE by default.

A helpful oneliner to run in the background while running these tests:
tail -f /var/log/openshift/broker/development.log | grep analytics &

Comment 9 Meng Bo 2014-02-11 02:49:16 UTC
Checked on devenv_4357,
The /var/log/httpd/access_log do not have log all the time.

But when I set the REPORT_BUILD_ANALYTICS to false in node.conf, the POST action of the analytics info will not show in development.log any more during pushing change to app. That means, the report build is disabled.

Move bug to verified.


Note You need to log in before you can comment on or make changes to this bug.