Description of problem: Import analytic data with oo-analytics-import, the script was broken with "uninitialized constant MongoClient (NameError)". This can be work around by adding following two lines in the script. require 'mongo' include Mongo Version-Release number of selected component (if applicable): On devenv_3257 How reproducible: Always Steps to Reproduce: 1. Export analytic data with oo-analytics-export oo-analytics-export --outfile exp.tar.gz 2. Connect to analytics db, add user, then import analytic data with oo-analytics-import mongo analytics db.addUser('openshift','mooo',{readOnly:false}) oo-analytics-import --infile exp.tar.gz Actual results: After step 2: Post processing.. /usr/sbin/oo-analytics-import:53:in `analytics_db': uninitialized constant MongoClient (NameError) from /usr/sbin/oo-analytics-import:70:in `<main>' Expected results: Should be able to import successfully Additional info:
You are probably just missing the "include Mongo" line.
Fixed with rev#a881c2b93c1c14b44c1018bdb5272028b746b90a
This is verified on devenv_3267 Analytic data can be imported successfully [root@ip-10-147-160-150 ~]# oo-analytics-import --infile exp.tar.gz Extracting analytics from 'exp.tar.gz' Running mongoimport on file [analytics.apps.json] on collection [applications] connected to: localhost:27017 Thu May 23 21:58:32 imported 1 objects Running mongoimport on file [analytics.domains.json] on collection [domains] connected to: localhost:27017 Thu May 23 21:58:32 imported 2 objects Running mongoimport on file [analytics.usage.json] on collection [usage] connected to: localhost:27017 Thu May 23 21:58:32 imported 1 objects Running mongoimport on file [analytics.users.json] on collection [cloud_users] connected to: localhost:27017 Thu May 23 21:58:32 imported 6 objects Post processing.. Import complete!