Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4012

FIWARE.Request.Lab.Spain.problem with script to identify invalid users

    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

      {'tz_sign': None, 'second_fraction': u'070507', 'hour': u'13', 'daydash': u'03', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'30', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'09', 'day': None, 'minute': u'36'}

      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

      {'tz_sign': None, 'second_fraction': u'070507', 'hour': u'13', 'daydash': u'03', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'30', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'09', 'day': None, 'minute': u'36'}

      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:

      {SHA1}

      <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

        Activity

          People

          • Assignee:
            jmperibanez Jose Maria Peribañez
            Reporter:
            ZHAW Node Helpdesk Zurich Node Helpdesk
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: