dragonresearch / rpki.net

Dragon Research Labs rpki.net RPKI toolkit
54 stars 30 forks source link

error trying to get roa lists for hosted handle #213

Closed sraustein closed 12 years ago

sraustein commented 12 years ago

Not sure what is causing this. I tried creating a new gui user, and then creating a ROA for it. The request for the SPARTA handle to arin for its roa list seems to be fine.

{{{ 2012-02-16 00:53:12 rpkid[7480]: Self testuser[6] polling parents 2012-02-16 00:53:12 rpkid[7480]: Sending "list" request to parent SPARTA 2012-02-16 00:53:12 rpkid[7480]: Serving list query from child testuser [sender testuser, recipient SPARTA] 2012-02-16 00:53:12 rpkid[7480]: Parent SPARTA and I agree that I have SKI lUq7yp5GnmZbT245XCvxMOL53FM in resource class 1 2012-02-16 00:53:12 rpkid[7480]: Self testuser[6] updating children 2012-02-16 00:53:12 rpkid[7480]: Self testuser[6] updating ROAs 2012-02-16 00:53:12 rpkid[7480]: : Error on HTTP client connection localhost:4403 <class 'rpki.exceptions.HTTPRequestFailed'> HTTP request failed with status 500, reason Unhandled exception DocumentInvalid: Element msg has extra content: list_roa_requests, response 2012-02-16 00:53:12 rpkid[7480]: : Closing due to error 2012-02-16 00:53:12 rpkid[7480]: : Returning exception HTTPRequestFailed('HTTP request failed with status 500, reason Unhandled exception DocumentInvalid: Element msg has extra content: list_roa_requests, response ',) to caller: HTTP request failed with status 500, reason Unhandled exception DocumentInvalid: Element msg has extra content: list_roa_requests, response 2012-02-16 00:53:12 rpkid[7480]: Could not fetch ROA requests for testuser, skipping: HTTP request failed with status 500, reason Unhandled exception DocumentInvalid: Element msg has extra content: list_roa_requests, response 2012-02-16 00:53:12 rpkid[7480]: Self testuser[6] updating Ghostbuster records 2012-02-16 00:53:12 rpkid[7480]: Self testuser[6] regenerating CRLs and manifests }}}

Trac ticket #195 component rpkid priority minor, owner sra, created by melkins on 2012-02-16T00:55:34Z, last modified 2012-02-17T01:11:08Z

sraustein commented 12 years ago

Looks like some kind of XML schema error for the response irdbd is generating (like all the code, it validates what it's sending as well as what it receives, in an attempt to catch errors as close as possible to the source).

irdbd's log should show the offending PDU (at priority LOG_WARNING).

Trac comment by sra on 2012-02-16T02:13:10Z

sraustein commented 12 years ago

Not sure what log level it is running at, but this is what I see: {{{ 2012-02-16 00:55:12 irdbd[7479]: PDU failed schema check 2012-02-16 00:55:12 irdbd[7479]: <?xml version='1.0' encoding='us-ascii'?> 2012-02-16 00:55:12 irdbd[7479]: 2012-02-16 00:55:12 irdbd[7479]: 2012-02-16 00:55:12 irdbd[7479]: }}}

Trac comment by melkins on 2012-02-16T03:20:25Z

sraustein commented 12 years ago

Jing, a Java-based RelaxNG validator with much better error messages, says:

{{{ /tmp/foo.xml:3:85: error: bad value for attribute "asn" }}}

And, indeed, the schema says: {{{ list_roa_requests_reply = element list_roa_requests { tag, self_handle, attribute asn { xsd:positiveInteger }, attribute ipv4 { ipv4_list }?, attribute ipv6 { ipv6_list }? } }}}

So the question becomes whether the schema is wrong or the code that's putting a zero ASN into the IRDB is wrong. One could make a case either way: Geoff snuck detestations (ASN 0 ROAs) into the specification via submarine, so they're legal; on the other hand, we never promised to support them.

CCing Randy for "grumpy user" opinion.

Trac comment by sra on 2012-02-16T03:44:43Z

sraustein commented 12 years ago

AS 0 is in vendor code. give up. i think they suck too. e.g. what happens when, for prefix P, you have an AS 0 and an AS 42 and the announcement received has origin AS 42. i tolk keyur and hannes that it was valid.

Trac comment by randy on 2012-02-16T20:43:56Z

sraustein commented 12 years ago

AS 0 is in vendor code. give up.

OK, I will hack the schema.

what happens when, for prefix P, you have an AS 0 and an AS 42 and the announcement received has origin AS 42. i tolk keyur and hannes that it was valid.

Given the silly semantics of the AS 0 hack, I agree that the announcement from AS 42 is valid in this case.

Trac comment by sra on 2012-02-16T21:18:25Z

sraustein commented 12 years ago

In [4346]: {{{

!CommitTicketReference repository="" revision="4346"

Allow AS 0 in objects. Closes #195. }}}

Trac comment by sra on 2012-02-17T01:11:08Z

sraustein commented 12 years ago

Closed with resolution fixed