cloudmesh / client

Deprecated: Version 3 of cloudmesh is a light weight cloud client to manage virtual clusters
http://cloudmesh.github.io/client
Other
3 stars 12 forks source link

secgroup delete does not work when --cloud=kilo is not specified #253

Open laszewsk opened 7 years ago

laszewsk commented 7 years ago

ERROR: Problem starting vm ERROR: Unable to find security_group with name 'gvonlasz-default' Traceback (most recent call last): File "/Users/big/ENV2/lib/python2.7/site-packages/cloudmesh_client/cloud/iaas/provider/openstack/CloudProviderOpenstackAPI.py", line 562, in boot_vm nics=nics) File "/Users/big/ENV2/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1272, in create boot_kwargs) File "/Users/big/ENV2/lib/python2.7/site-packages/novaclient/v2/servers.py", line 706, in _boot return_raw=return_raw, kwargs) File "/Users/big/ENV2/lib/python2.7/site-packages/novaclient/base.py", line 333, in _create resp, body = self.api.client.post(url, body=body) File "/Users/big/ENV2/lib/python2.7/site-packages/keystoneauth1-2.9.0-py2.7.egg/keystoneauth1/adapter.py", line 184, in post return self.request(url, 'POST', **kwargs) File "/Users/big/ENV2/lib/python2.7/site-packages/novaclient/client.py", line 117, in request raise exceptions.from_response(resp, body, url, method) BadRequest: Unable to find security_group with name 'gvonlasz-default' (HTTP 400) (Request-ID: req-2a9f6ee9-5a80-469d-a851-2f66eb92d32e) ERROR: info. failed. (ENV2) big:client big$ nova secgroup list

laszewsk commented 7 years ago

cm secgroup delete gvonlasz-default --cloud=kilo Delete secgroup kilo:gvonlasz-default ERROR: Failed to delete Security Group=gvonlasz-default in cloud=kilo None (ENV2) big:client big$ cm secgroup list +-------+------------------+----------+--------+-----------+----------+ | name | group | fromPort | toPort | cidr | protocol | +-------+------------------+----------+--------+-----------+----------+ | http | gvonlasz-default | 80 | 80 | 0.0.0.0/0 | tcp | | ssh | gvonlasz-default | 22 | 22 | 0.0.0.0/0 | tcp | | icmp | gvonlasz-default | -1 | -1 | 0.0.0.0/0 | icmp | | https | gvonlasz-default | 443 | 443 | 0.0.0.0/0 | tcp | +-------+------------------+----------+--------+-----------+----------+ (ENV2) big:client big$ cm secgroup upload Uploading the groups/rules to cloud - kilo... ...done INFO: All completed (ENV2) big:client big$ cm vm boot ERROR: Could not guess the username of the vm Machine gvonlasz-008 is being booted on cloud kilo ... +-----------+------------------------+ | Attribute | Value | +-----------+------------------------+ | cloud | kilo | | flavor | m1.small | | image | Ubuntu-14.04-64 | | key | gvonlasz | | meta | + | | - | category: kilo | | - | kind: cloudmesh | | - | group: default | | - | image: Ubuntu-14.04-64 | | - | cluster: None | | - | key: gvonlasz | | - | flavor: m1.small | | name | gvonlasz-008 | | nics | | | secgroup | + | | - | gvonlasz-default | +-----------+------------------------+ ERROR: Problem with secgroup Traceback (most recent call last): File "/Users/big/ENV2/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 1051, in refresh cls.add(element) File "/Users/big/ENV2/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 776, in add update=current) File "/Users/big/ENV2/lib/python2.7/site-packages/cloudmesh_client/db/CloudmeshDatabase.py", line 922, in update cls.session.query(t).filter_by(**filter).update(values) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3201, in update updateop.exec() File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1127, in exec_ self._do_exec() File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1282, in _do_exec mapper=self.mapper) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1034, in execute bind, close_with_result=True).execute(clause, params or {}) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/Users/big/ENV2/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 "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/Users/big/ENV2/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: vm_openstack.cm_id [SQL: u'UPDATE vm_openstack SET category=?, kind=?, type=?, provider=?, cm_id=?, created_at=?, updated_at=?, label=?, name=?, user=?, project=?, cluster=?, username=?, uuid=?, "diskConfig"=?, availability_zone=?, power_state=?, task_state=?, vm_state=?, launched_at=?, terminated_at=?, "accessIPv4"=?, "accessIPv6"=?, static_ip=?, floating_ip=?, config_drive=?, created=?, flavorid=?, flavor=?, "hostId"=?, imageid=?, image=?, "group"=?, "key"=?, volumes_attached=?, progress=?, security_groups=?, status=?, tenant_id=?, updated=?, user_id=? WHERE vm_openstack.name = ?'] [parameters: (u'kilo', 'vm', 'string', 'openstack', 29, u'2016-11-22 15:21:25', u'2016-11-22 15:21:25', u'badi-001', u'badi-001', None, None, None, None, u'4b72a69d-a9fd-4801-94c9-b35a64033ec3', u'MANUAL', u'nova', 1, None, u'active', u'2016-11-22T20:06:12.000000', None, u'', u'', u'10.0.5.145', None, u'', u'2016-11-22T20:05:57Z', u'2', None, u'c602364d26373272581df00c74f462e52381275af6ed130064ea6780', u'9eb8416d-1313-4748-a832-5fe0ecbbdffc', None, None, None, None, None, u'badi-default', u'ACTIVE', u'74e41156d99e4497901d4c4e2b159f41', u'2016-11-22T20:06:12Z', u'090ea72e35c94c49ad8cc8133627fa1a', u'badi-001')] info. OK.