Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-LAB-HELP
-
Labels:None
-
HD-Node:Spain
Description
Hi,
I tried to run the script to identify old, invalid users here:
https://github.com/chemaper/delete_os_tenant_resources
However, when I ran this, I encountered an error (see below).
Fernando advised to send the error here.
BR,
Seán.
sean@sean:~/xifi/delete_os_tenant_resources$ ./phase0_generateuserlist.py
DEBUG:root:Getting expired users
INFO:utils.log:Admin token requested: <REDACTED>
INFO:utils.log:Number of Trial users detected: 1214
INFO:utils.log:Number of expired users found: 1212
DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to
http://cloud.lab.fiware.org:4730/v3/auth/tokens
DEBUG:root:Building user map
DEBUG:iso8601.iso8601:Parsed 2015-09-03T13:36:30.070507Z into
with default timezone <iso8601.iso8601.Utc
object at 0x7fee2a910fd0>
DEBUG:iso8601.iso8601:Got u'2015' for 'year' with default None
DEBUG:iso8601.iso8601:Got u'09' for 'monthdash' with default 1
DEBUG:iso8601.iso8601:Got 9 for 'month' with default 9
DEBUG:iso8601.iso8601:Got u'03' for 'daydash' with default 1
DEBUG:iso8601.iso8601:Got 3 for 'day' with default 3
DEBUG:iso8601.iso8601:Got u'13' for 'hour' with default None
DEBUG:iso8601.iso8601:Got u'36' for 'minute' with default None
DEBUG:iso8601.iso8601:Got u'30' for 'second' with default None
DEBUG:iso8601.iso8601:Parsed 2015-09-03T13:36:30.070507Z into
with default timezone <iso8601.iso8601.Utc
object at 0x7fee2a910fd0>
DEBUG:iso8601.iso8601:Got u'2015' for 'year' with default None
DEBUG:iso8601.iso8601:Got u'09' for 'monthdash' with default 1
DEBUG:iso8601.iso8601:Got 9 for 'month' with default 9
DEBUG:iso8601.iso8601:Got u'03' for 'daydash' with default 1
DEBUG:iso8601.iso8601:Got 3 for 'day' with default 3
DEBUG:iso8601.iso8601:Got u'13' for 'hour' with default None
DEBUG:iso8601.iso8601:Got u'36' for 'minute' with default None
DEBUG:iso8601.iso8601:Got u'30' for 'second' with default None
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET
http://172.32.48.1:4731/v3/ -H "Accept: application/json" -H "User-Agent:
python-keystoneclient"
WARNING:keystoneclient.auth.identity.base:Failed to contact the endpoint at
http://172.32.48.1:4731/v3/ for discovery. Fallback to using that endpoint
as the base url.
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET
http://172.32.48.1:4731/v3/users -H "User-Agent: python-keystoneclient" -H
"Accept: application/json" -H "X-Auth-Token:
<REDACTED>"
Traceback (most recent call last):
File "./phase0_generateuserlist.py", line 56, in <module>
for user in keystone.users.list():
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py",
line 336, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v3/users.py",
line 108, in list
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py",
line 73, in func
return f(*args, **new_kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py",
line 366, in list
self.collection_key)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py",
line 113, in _list
resp, body = self.client.get(url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py",
line 170, in get
return self.request(url, 'GET', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py",
line 206, in request
resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py",
line 95, in request
return self.session.request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py",
line 336, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py",
line 382, in request
resp = send(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py",
line 426, in _send_request
raise exceptions.ConnectionRefused(msg)
keystoneclient.openstack.common.apiclient.exceptions.ConnectionRefused:
Unable to establish connection tohttp://172.32.48.1:4731/v3/users
sean@sean:~/xifi/delete_os_tenant_resources$
_______________________________________________
Fiware-lab-help mailing list
Fiware-lab-help@lists.fi-ware.org
https://lists.fi-ware.org/listinfo/fiware-lab-help
Hello,
First at all, please be careful with these scripts; the phase0 script is not dangerous, but some of the other scripts are. For example it is not a good idea to delete resources before notifying users, but the script that notifies users should be run only once, to avoid "spamming" the users.
A message was already sent to delete resources next Monday, no resources should be deleted before this day, nor new messages that may confuse users be sent.
Therefore, PLEASE DON'T RUN THE SCRIPTS THESE DAYS.
About your question. Have you created a virtualenv and installed the requirements as the README indicates?
Best regards,
Chema.