Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace result formatter crashes #1417

Closed
mfeit-internet2 opened this issue Mar 15, 2024 · 1 comment
Closed

Trace result formatter crashes #1417

mfeit-internet2 opened this issue Mar 15, 2024 · 1 comment
Assignees
Labels

Comments

@mfeit-internet2
Copy link
Member

Probably passing a wrong value somewhere.

$ pscheduler task trace --dest psmp-gn-bw-bud-hu.geant.org
...
Problem fetching results: Failed to format result: Traceback (most recent call last):
  File "/usr/libexec/pscheduler/classes/test/trace/result-format", line 69, in <module>
    pscheduler.result_format_method(TEMPLATE, max_schema=MAX_SCHEMA, validator=result_is_valid)
  File "/usr/lib/python3.9/site-packages/pscheduler/text.py", line 272, in result_format_method
    return _format_method(template,
  File "/usr/lib/python3.9/site-packages/pscheduler/text.py", line 251, in _format_method
    succeed(jinja2_format(template, json_stripped, strip=True))
  File "/usr/lib/python3.9/site-packages/pscheduler/text.py", line 171, in jinja2_format
    finished = j2.from_string(HEADER + template).render(info)
  File "/usr/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 17, in top-level template code
  File "/usr/lib/python3.9/site-packages/pscheduler/text.py", line 148, in iso8601_duration_seconds_helper
    delta = iso8601_as_timedelta(duration)
  File "/usr/lib/python3.9/site-packages/pscheduler/iso8601.py", line 15, in iso8601_as_timedelta
    duration = isodate.parse_duration(iso)
  File "/usr/lib/python3.9/site-packages/isodate/isoduration.py", line 86, in parse_duration
    raise TypeError("Expecting a string %r" % datestring)
TypeError: Expecting a string Undefined

Result that caused this:

{
  "paths": [
    [
      {
        "ip": "10.88.0.1",
        "rtt": "P0D",
        "hostname": "host.containers.internal"
      },
      {
        "ip": "10.0.2.2",
        "rtt": "PT0.0002S"
      },
      {},
      {
        "as": {
          "owner": "MERIT-AS-14, US",
          "number": 237
        },
        "ip": "192.122.200.73",
        "rtt": "PT0.0019S",
        "hostname": "xe-11-0-1x241.sfld-cor-123net.mich.net"
      },
      {
        "as": {
          "owner": "MERIT-AS-14, US",
          "number": 237
        },
        "ip": "192.122.183.10",
        "rtt": "PT0.007S",
        "hostname": "v0x1004.rtr.wash.net.internet2.edu"
      },
      {
        "ip": "163.253.1.174",
        "rtt": "PT0.0168S",
        "hostname": "fourhundredge-0-0-0-3.4079.core2.clev.net.internet2.edu"
      },
      {
        "ip": "163.253.1.138",
        "rtt": "PT0.017S",
        "hostname": "fourhundredge-0-0-0-3.4079.core2.ashb.net.internet2.edu"
      },
      {
        "ip": "163.253.1.121",
        "rtt": "PT0.0166S",
        "hostname": "fourhundredge-0-0-0-1.4079.core1.wash.net.internet2.edu"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.124.44",
        "rtt": "PT0.0973S",
        "hostname": "internet2.mx1.lon.uk.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.98.22",
        "rtt": "PT0.102S",
        "hostname": "ae4.rt1.ams.nl.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.98.21",
        "rtt": "PT0.1088S",
        "hostname": "ae8.rt1.fra.de.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.98.159",
        "rtt": "PT0.1152S",
        "hostname": "ae6.rt1.pra.cz.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.98.243",
        "rtt": "PT0.1197S",
        "hostname": "ae5.mx1.vie.at.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.98.44",
        "rtt": "PT0.1243S",
        "hostname": "ae3.mx1.bud.hu.geant.net"
      },
      {
        "as": {
          "owner": "GEANT The GEANT IP Service, NL",
          "number": 20965
        },
        "ip": "62.40.114.47",
        "rtt": "PT0.1231S",
        "hostname": "psmp-gn-bw-bud-hu.geant.org"
      }
    ]
  ],
  "schema": 1,
  "succeeded": true
}
@mfeit-internet2
Copy link
Member Author

Wasn't handling no-response hops. Fixed.

@github-project-automation github-project-automation bot moved this from Ready to Done in perfSONAR Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant