Bug 1065393 - Can not embed 10-gen cartridge to my application with mongodb with new settings.py file
Summary: Can not embed 10-gen cartridge to my application with mongodb with new settin...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
: 1071598 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-14 14:50 UTC by Jakub Hadvig
Modified: 2015-05-15 00:38 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-21 09:32:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
old settings.py file (4.27 KB, text/x-python)
2014-02-17 04:55 UTC, chunchen
no flags Details
new settings.py file (4.70 KB, text/x-python)
2014-02-17 04:56 UTC, chunchen
no flags Details

Description Jakub Hadvig 2014-02-14 14:50:52 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. rhc app create test ruby-1.9 mongodb-2.4
2. At https://mms.mongodb.com create account and download monitor-agent zip/tar
3. copy settting.py to the $APP_DIR/.openshift/mms
3. rhc cartridge add 10gen-mms-agent-0.1 -a test


Actual results:
Failed to execute: 'control start' for /var/lib/openshift/52fe2975bd61cb1cb900000c/10gen-mms-agent

Expected results:
Cartridge should be embeded without error

Additional info:
Problem seems to be related which changed layout of the monitoring agent zip/tar which can be downloaded after registering for MMS.
Now the settings.py doesn't contain 'secret_key' attribute

Comment 1 chunchen 2014-02-17 02:22:26 UTC
It's also reproduced on INT(devenv_4382).

Comment 2 chunchen 2014-02-17 04:54:29 UTC
It can work for old settings.py, but failed to work for new settings.py, please refer to the following results:

1. For the old settings.py
1) rhc app create test ruby-1.9 mongodb-2.4
2) copy old settting.py to the $APP_DIR/.openshift/mms
3) rhc cartridge add 10gen-mms-agent-0.1 -a test

Adding 10gen-mms-agent-0.1 to application 'test' ... done

10gen-mms-agent-0.1 (10gen Mongo Monitoring Service Agent)
----------------------------------------------------------
  Gears:          Located with mongodb-2.4, ruby-1.9
  Monitoring URL: https://mms.mongodb.com/

10gen-mms-agent added. 
Please configure your mongodb host at https://mms.mongodb.com/ to start monitoring performance data.

Monitoring URL: https://mms.mongodb.com/

2. For the new settings.py
1) rhc app create test ruby-1.9 mongodb-2.4
2) At https://mms.mongodb.com create account and download monitor-agent zip/tar
3) copy new settting.py to the $APP_DIR/.openshift/mms
4) rhc cartridge add 10gen-mms-agent-0.1 -a test

Adding 10gen-mms-agent-0.1 to application 'test1' ... Starting 10gen-mms-agent cartridge
Failed to execute: 'control start' for /var/lib/openshift/53016eed6cec0e13ab000083/10gen-mms-agent

Comment 3 chunchen 2014-02-17 04:55:43 UTC
Created attachment 863946 [details]
old settings.py file

Comment 4 chunchen 2014-02-17 04:56:20 UTC
Created attachment 863947 [details]
new settings.py file

Comment 5 chunchen 2014-02-17 05:43:42 UTC
BTW:
If adding the secret_key  filed back to the new settings.py file, then we can embed 10-gen cartridge to application with mongodb.

Comment 6 Michal Fojtik 2014-02-17 09:18:48 UTC
There is a Trello card[1] for updating mms cartridge to newer version that should fix this bug.

I think chunchen workaround (adding secret_key into new settings.py) is reasonable to fix this bug in a meantime.

Moving this off the blocker list but keeping this bug open for the Trello card completetion (Dan?)

[1] https://trello.com/c/8OD69SJS/142-update-10gen-mms-agent-cartridge-due-to-settings-py-layout-changes

Comment 7 Dan McPherson 2014-02-17 14:03:08 UTC
I was hoping we would fix this before releasing.  All new users would be affected right?

Comment 8 Xiaoli Tian 2014-02-18 01:29:19 UTC
(In reply to Dan McPherson from comment #7)
> I was hoping we would fix this before releasing.  All new users would be
> affected right?

I think all new 10gen users will be affected unless they add their seceret key field manually to the settings.py file. If we want to delay the fix, we may fix the docs firstly or highlight it in release notes about the work around.

Comment 9 Dan McPherson 2014-03-02 22:35:03 UTC
*** Bug 1071598 has been marked as a duplicate of this bug. ***

Comment 10 Jakub Hadvig 2014-03-21 09:32:05 UTC
I think we can close this one, cause the new settings.py is not present in the current tarball. Instead the new tarball contains now only two files.
Those are: mongodb-mms-monitoring-agent, monitoring-agent.config 

Closing this one. Was reported by me and also fixed and I believe this scenario is not valid anymore.

Comment 11 ashelley 2014-03-31 17:54:47 UTC
Is there new documentation on how to use the monitoring-agent.config format?

Right now I think the "10gen Mongo Monitoring Service Agent" still expects settings.py file.  

You can still get the legacy .tar.gz or .zip file from 

https://mms.mongodb.com/setup/monitoring#monitoringAgent

which contains settings.py file by clicking other linux and using the links found here: 

"If you are using Kerberos authentication, or your Monitoring Agent must connect to the internet via proxy, you will need to continue to use our legacy Python Monitoring Agent. You may download a zip or tar.gz file. See the docs for installation instructions."

I've tried adding my apikey to the settings.py file and following the documentation but i'm still getting the error:

"Unable to complete the requested operation. Show less
Starting 10gen-mms-agent cartridge
10gen-mms-agent added. 
Please configure your mongodb host at https://mms.mongodb.com/ to start monitoring performance data.

Monitoring URL: https://mms.mongodb.com/
Failed to execute: 'control start' for /var/lib/openshift/53319fea5973ca7c8600062b/10gen-mms-agent"

Steps to reproduce:

- create an application with node.js and mongodb...
- create .openshift/mms/settings.py from the legacy archive and modify it so that mms_key="myapikey" is set
- try to add "10gen Mongo Monitoring Service Agent" from the openshift web interface

Actual results:

"Unable to complete the requested operation. Show less
Starting 10gen-mms-agent cartridge
10gen-mms-agent added. 
Please configure your mongodb host at https://mms.mongodb.com/ to start monitoring performance data.

Monitoring URL: https://mms.mongodb.com/
Failed to execute: 'control start' for /var/lib/openshift/53319fea5973ca7c8600062b/10gen-mms-agent"

Expected results:

- not an error

I think the bug is that the package still expects a settings.py file in .openshift/mms/settings.py

I know this is closed but just ran into this issue and not sure how to get MMS up and running.


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