Comment 0 for bug 1496852

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote : Bootstrap action backtraces when invoked a second time

From the unit log:

2015-09-15 15:23:34 INFO bootstrap Setting up database schemas (will timeout after 86400 seconds) ...
2015-09-15 15:23:34 INFO bootstrap Setting up sample data...
2015-09-15 15:23:34 INFO bootstrap Generating 72 snapshots from 1442308800 to 1442330614.
2015-09-15 15:23:34 INFO bootstrap Traceback (most recent call last):
2015-09-15 15:23:34 INFO bootstrap File "/usr/bin/landscape-schema", line 12, in <module>
2015-09-15 15:23:34 INFO bootstrap canonical.landscape.scripts.schema.run()
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/scripts/schema.py", line 360, in run
2015-09-15 15:23:34 INFO bootstrap start_time, stop_time, datatypes)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/sample/sample.py", line 873, in create_stock_sample_data
2015-09-15 15:23:34 INFO bootstrap stan = data.build_person(name, email, password)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/sample/sample.py", line 152, in inner
2015-09-15 15:23:34 INFO bootstrap result = func(*args, **kwargs)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/sample/sample.py", line 165, in build_person
2015-09-15 15:23:34 INFO bootstrap identity=identity)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/model/main/person.py", line 728, in create_person
2015-09-15 15:23:34 INFO bootstrap notify(event)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/zope/event/__init__.py", line 31, in notify
2015-09-15 15:23:34 INFO bootstrap subscriber(event)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/event/subscriber.py", line 76, in dispatch
2015-09-15 15:23:34 INFO bootstrap handle(phase, *args)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/zope/component/_api.py", line 142, in handle
2015-09-15 15:23:34 INFO bootstrap getSiteManager(None).subscribers(objects, None)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/zope/interface/registry.py", line 323, in subscribers
2015-09-15 15:23:34 INFO bootstrap return self.adapters.subscribers(objects, provided)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/zope/interface/adapter.py", line 601, in subscribers
2015-09-15 15:23:34 INFO bootstrap subscription(*objects)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/event/subscriber.py", line 42, in wrapper
2015-09-15 15:23:34 INFO bootstrap return function(*args)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/model/main/subscriber.py", line 122, in standalone_create_initial_account_handler
2015-09-15 15:23:34 INFO bootstrap current_account_count = get_all_accounts().count()
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/model/main/account.py", line 1636, in get_all_accounts
2015-09-15 15:23:34 INFO bootstrap return collection.find()
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/collection/collection.py", line 23, in find
2015-09-15 15:23:34 INFO bootstrap return self._get_result(self._store, **self._where)
2015-09-15 15:23:34 INFO bootstrap File "/opt/canonical/landscape/canonical/landscape/model/account/collection.py", line 90, in _get_result
2015-09-15 15:23:34 INFO bootstrap return store.find(Account, *where)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/store.py", line 222, in find
2015-09-15 15:23:34 INFO bootstrap self.flush()
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/store.py", line 502, in flush
2015-09-15 15:23:34 INFO bootstrap self._flush_one(obj_info)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/store.py", line 539, in _flush_one
2015-09-15 15:23:34 INFO bootstrap result = self._connection.execute(expr)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 295, in execute
2015-09-15 15:23:34 INFO bootstrap result = Connection.execute(self, Returning(statement), params)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/database.py", line 241, in execute
2015-09-15 15:23:34 INFO bootstrap raw_cursor = self.raw_execute(statement, params)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/databases/postgres.py", line 311, in raw_execute
2015-09-15 15:23:34 INFO bootstrap return Connection.raw_execute(self, statement, params)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/database.py", line 374, in raw_execute
2015-09-15 15:23:34 INFO bootstrap self._run_execution(raw_cursor, args, params, statement)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/database.py", line 388, in _run_execution
2015-09-15 15:23:34 INFO bootstrap self._check_disconnect(raw_cursor.execute, *args)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/dist-packages/storm/database.py", line 454, in _check_disconnect
2015-09-15 15:23:34 INFO bootstrap return function(*args, **kwargs)
2015-09-15 15:23:34 INFO bootstrap psycopg2.IntegrityError: duplicate key value violates unique constraint "person_email_key"
2015-09-15 15:23:34 INFO bootstrap DETAIL: Key (email)=(<email address hidden>) already exists.
2015-09-15 15:23:34 INFO bootstrap
2015-09-15 15:23:34 INFO bootstrap Traceback (most recent call last):
2015-09-15 15:23:34 INFO bootstrap File "/var/lib/juju/agents/unit-landscape-server-0/charm/actions/bootstrap", line 9, in <module>
2015-09-15 15:23:34 INFO bootstrap sys.exit(action())
2015-09-15 15:23:34 INFO bootstrap File "/var/lib/juju/agents/unit-landscape-server-0/charm/actions/lib/action.py", line 22, in __call__
2015-09-15 15:23:34 INFO bootstrap return_values = self._run()
2015-09-15 15:23:34 INFO bootstrap File "/var/lib/juju/agents/unit-landscape-server-0/charm/actions/lib/bootstrap.py", line 25, in _run
2015-09-15 15:23:34 INFO bootstrap self._subprocess.check_call(cmd)
2015-09-15 15:23:34 INFO bootstrap File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
2015-09-15 15:23:34 INFO bootstrap raise CalledProcessError(retcode, cmd)
2015-09-15 15:23:34 INFO bootstrap subprocess.CalledProcessError: Command '('/usr/bin/landscape-schema', '--create-lds-account-only', '--admin-name', u'John Doe', '--admin-email', <email address hidden>', '--admin-password', u'pwd')' returned non-zero exit status 1