Open badmutex opened 7 years ago
This is usually caused by an outdated local copy of the cloudmesh.db file. Try delete the file (~/.cloudmesh/cloudmesh.db) and try again.
On Oct 19, 2016, at 1:03 PM, badi notifications@github.com wrote:
ISSUE TYPE
Bug Report CM VERSION
| name | version | +------------------+---------+ | python | 2.7.12 | | pip | 8.1.2 | | cloudmesh_client | 4.3.7 | | git hash | 174d6dc | +------------------+---------+ You are running a supported version of python: 2.7.12 You are running a supported version of pip: 8.1.2
CM INFO
+-------------+-------------------------+ | Attribute | Value | +-------------+-------------------------+ | cloud | chameleon | | key | badi | | user | badi | | vm | | | group | default | | secgroup | badi-default | | counter | 1 | | image | Ubuntu-Server-14.04-LTS | | flavor | m1.small | | refresh | None | | debug | True | | interactive | None | | purge | None | +-------------+-------------------------+
OS / ENVIRONMENT
SUMMARY
Calling cm flavor list or cm flavor refresh has sqlite3.IntegrityErrors
STEPS TO REPRODUCE
$ cm flavor list --cloud kilo ERROR: Problem with secgroup Traceback (most recent call last): File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 970, in refresh cls.add(element) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 695, in add update=current) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 841, in update cls.session.query(t).filter_by(filter).update(values) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3201, in update updateop.exec() File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_ self._do_exec() File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1282, in _do_exec mapper=self.mapper) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1034, in execute bind, close_with_result=True).execute(clause, params or {}) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: flavor_openstack.cm_id [SQL: u'UPDATE flavor_openstack SET category=?, kind=?, type=?, provider=?, cm_id=?, created_at=?, updated_at=?, label=?, name=?, user=?, project=?, uuid=?, ram=?, os_flv_disabled=?, vcpus=?, swap=?, os_flavor_acces=?, rxtx_factor=?, os_flv_ext_data=?, disk=? WHERE flavor_openstack.name = ?'] [parameters: ('kilo', 'flavor', 'string', 'openstack', 1, u'2016-10-19 11:31:27', u'2016-10-19 11:31:27', u'm1.tiny', u'm1.tiny', None, None, u'1', 512, False, 1, u'', True, 1.0, 0, 1, u'm1.tiny')] ERROR: Problem with secgroup Traceback (most recent call last): File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 970, in refresh cls.add(element) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 695, in add update=current) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 841, in update cls.session.query(t).filter_by(filter).update(values) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3201, in update updateop.exec() File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_ self._do_exec() File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1282, in _do_exec mapper=self.mapper) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1034, in execute bind, close_with_result=True).execute(clause, params or {}) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/home/badi/github.com/cloudmesh/client/venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: flavor_openstack.cm_id [SQL: u'UPDATE flavor_openstack SET category=?, kind=?, type=?, provider=?, cm_id=?, created_at=?, updated_at=?, label=?, name=?, user=?, project=?, uuid=?, ram=?, os_flv_disabled=?, vcpus=?, swap=?, os_flavor_acces=?, rxtx_factor=?, os_flv_ext_data=?, disk=? WHERE flavor_openstack.name = ?'] [parameters: ('kilo', 'flavor', 'string', 'openstack', 1, u'2016-10-19 11:31:27', u'2016-10-19 11:31:27', u'm1.tiny', u'm1.tiny', None, None, u'1', 512, False, 1, u'', True, 1.0, 0, 1, u'm1.tiny')] +----+-----------+-------+----------+-------+------+--------+-------------+-----------------+------+-------+---------------------+ | Id | Name | RAM | Disabled | vCPUs | Swap | Access | rxtx_factor | os_flv_ext_data | Disk | Cloud | updated | +----+-----------+-------+----------+-------+------+--------+-------------+-----------------+------+-------+---------------------+ | 2 | m1.small | 2048 | 0 | 1 | | 1 | 1.0 | 0 | 20 | kilo | 2016-10-19 11:31:27 | | 1 | m1.tiny | 512 | 0 | 1 | | 1 | 1.0 | 0 | 1 | kilo | 2016-10-19 11:31:27 | | 4 | m1.large | 8192 | 0 | 4 | | 1 | 1.0 | 0 | 80 | kilo | 2016-10-19 11:31:27 | | 3 | m1.medium | 4096 | 0 | 2 | | 1 | 1.0 | 0 | 40 | kilo | 2016-10-19 11:31:27 | | 5 | m1.xlarge | 16384 | 0 | 8 | | 1 | 1.0 | 0 | 160 | kilo | 2016-10-19 11:31:27 | +----+-----------+-------+----------+-------+------+--------+-------------+-----------------+------+-------+---------------------+
EXPECTED RESULTS
ACTUAL RESULTS
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cloudmesh/client/issues/249, or mute the thread https://github.com/notifications/unsubscribe-auth/ABS9UTFnjwv673YqsVz1lWxJXpotkgZuks5q1k1ZgaJpZM4KbOH2.
ISSUE TYPE
CM VERSION
CM INFO
OS / ENVIRONMENT
SUMMARY
Calling
cm flavor list
orcm flavor refresh
hassqlite3.IntegrityError
sSTEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS