On the first run on 'primary-mongo' role package was installed, service have been started and firewall rule was added:
(/Stage[main]/Mongodb::Server::Install/Package[mongodb_server]/ensure) created
2014-04-30T14:14:01.737951+00:00 notice: (/Stage[main]/Mongodb::Server::Service/Service[mongodb]/ensure) ensure changed 'stopped' to 'running'
2014-04-30T14:14:01.932865+00:00 notice: (/Stage[main]/Mongodb::Firewall/Firewall[120 mongodb]/ensure) created
But then creation of ceilometer database failed:
2014-04-30T14:14:34.133064+00:00 err: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[ceilometer]/Mongodb_database[ceilometer]) Could not evaluate: Execution of '/usr/bin/mongo --quiet --eval db.getMon
2014-04-30T14:14:34.133480+00:00 err: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[ceilometer]/Mongodb_database[ceilometer]) exception: connect failed
Everything else mongo related failed too and Nailgun started the second try to install primary mongo role
2014-04-30T14:14:48.454325+00:00 notice: ***** Beginning deployment of node node-4 with role primary-mongo *****
2014-04-30T14:14:48.454719+00:00 notice: (/Stage[zero]/Begin_deployment/Notify[***** Beginning deployment of node node-4 with role primary-mongo *****]/message) defined 'message' as '***** Beginning deplo
2014-04-30T14:14:50.811954+00:00 notice: MongoDB params: 127.0.0.1192.168.0.1
2014-04-30T14:14:50.812272+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Notify[MongoDB params: 127.0.0.1192.168.0.1]/message) defined 'message' as 'MongoDB params: 127.0.0.1192.168.0.1'
2014-04-30T14:14:50.907577+00:00 notice: Installing package mongodb from 2.4.6-1.mira1 to installed
2014-04-30T14:14:51.247689+00:00 notice: (/Stage[main]/Mongodb::Client/Package[mongodb_client]/ensure) ensure changed '2.4.6-1.mira1' to 'installed'
2014-04-30T14:14:51.461579+00:00 notice: mongodb configuring databases
2014-04-30T14:14:51.462026+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Notify[mongodb configuring databases]/message) defined 'message' as 'mongodb configuring databases'
2014-04-30T14:14:51.776395+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[ceilometer]/Mongodb_database[ceilometer]/ensure) created
2014-04-30T14:14:52.036495+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[ceilometer]/Mongodb_user[ceilometer]/ensure) created
2014-04-30T14:14:52.291130+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[admin]/Mongodb_database[admin]/ensure) created
2014-04-30T14:14:52.540861+00:00 notice: (/Stage[main]/Openstack::Mongo_primary/Mongodb::Db[admin]/Mongodb_user[admin]/ensure) created
2014-04-30T14:14:52.548255+00:00 notice: mongodb primary finished
and everything went fine.
Then controller role was successfuly deployed successfully too and the entire environment is operational.
Why did mongo client failed to connect to the mongo service on the first deployment run? Maybe the was not enough time for mongo to warm up?
I reproduced it.
On the first run on 'primary-mongo' role package was installed, service have been started and firewall rule was added:
(/Stage[ main]/Mongodb: :Server: :Install/ Package[ mongodb_ server] /ensure) created 30T14:14: 01.737951+ 00:00 notice: (/Stage[ main]/Mongodb: :Server: :Service/ Service[ mongodb] /ensure) ensure changed 'stopped' to 'running' 30T14:14: 01.932865+ 00:00 notice: (/Stage[ main]/Mongodb: :Firewall/ Firewall[ 120 mongodb]/ensure) created
2014-04-
2014-04-
But then creation of ceilometer database failed:
2014-04- 30T14:14: 34.133064+ 00:00 err: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[ceilometer] /Mongodb_ database[ ceilometer] ) Could not evaluate: Execution of '/usr/bin/mongo --quiet --eval db.getMon 30T14:14: 34.133480+ 00:00 err: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[ceilometer] /Mongodb_ database[ ceilometer] ) exception: connect failed
2014-04-
Everything else mongo related failed too and Nailgun started the second try to install primary mongo role
2014-04- 30T14:14: 48.454325+ 00:00 notice: ***** Beginning deployment of node node-4 with role primary-mongo ***** 30T14:14: 48.454719+ 00:00 notice: (/Stage[ zero]/Begin_ deployment/ Notify[ ***** Beginning deployment of node node-4 with role primary-mongo *****]/message) defined 'message' as '***** Beginning deplo 30T14:14: 50.811954+ 00:00 notice: MongoDB params: 127.0.0. 1192.168. 0.1 30T14:14: 50.812272+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Notify[ MongoDB params: 127.0.0. 1192.168. 0.1]/message) defined 'message' as 'MongoDB params: 127.0.0. 1192.168. 0.1' 30T14:14: 50.907577+ 00:00 notice: Installing package mongodb from 2.4.6-1.mira1 to installed 30T14:14: 51.247689+ 00:00 notice: (/Stage[ main]/Mongodb: :Client/ Package[ mongodb_ client] /ensure) ensure changed '2.4.6-1.mira1' to 'installed' 30T14:14: 51.461579+ 00:00 notice: mongodb configuring databases 30T14:14: 51.462026+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Notify[ mongodb configuring databases]/message) defined 'message' as 'mongodb configuring databases' 30T14:14: 51.776395+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[ceilometer] /Mongodb_ database[ ceilometer] /ensure) created 30T14:14: 52.036495+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[ceilometer] /Mongodb_ user[ceilometer ]/ensure) created 30T14:14: 52.291130+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[admin] /Mongodb_ database[ admin]/ ensure) created 30T14:14: 52.540861+ 00:00 notice: (/Stage[ main]/Openstack ::Mongo_ primary/ Mongodb: :Db[admin] /Mongodb_ user[admin] /ensure) created 30T14:14: 52.548255+ 00:00 notice: mongodb primary finished
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
2014-04-
and everything went fine.
Then controller role was successfuly deployed successfully too and the entire environment is operational.
Why did mongo client failed to connect to the mongo service on the first deployment run? Maybe the was not enough time for mongo to warm up?