Giter Site home page Giter Site logo

ripe-atlas-cmdline's People

Contributors

astrikos avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

spencerx

ripe-atlas-cmdline's Issues

Protocol not added in traceroute measurements

According to the documentation, protocol (UDP/ICMP) is required. Indeed, the tools asks the user for it but does not put it in the JSON request:

% python ripe-atlas-cmdline/atlas_manage.py oneoff -f ~/.atlas/auth -s
Specify Target:192.134.92.1
Specify Type:traceroute
Specify Traceroute Protocol[ICMP/UDP]:UDP
Specify Protocol[4/6]:4
Specify Description:Test 192.134.92.1
Is it OneOff y/n:y
Do you need any additional options y/n:n
Specify Start Time [Unix Timestamp\Leave blank for now]:
Specify Number of Probes (Integer):100
Specify Probes Source Type [area/country/prefix/asn/probes/msm]:area
Specify Probes Source [WW/West/North-Central/South-Central/North-East/South-East]:North-Central
You are about to create a new oneoff RIPE Atlas UDM with the following details:
{'definitions': [{'description': 'Test 192.134.92.1', 'type': 'traceroute', 'target': '192.134.92.1', 'is_oneoff': 'true', 'af': 4}], 'probes': [{'requested': 100, 'type': 'area', 'value': 'North-Central'}]}

Problem with HTTP request.
Traceback (most recent call last):
File "/home/stephane/src/RIPE-Atlas/ripe-atlas-cmdline/commands/create.py", line 167, in create
response = urllib2.urlopen(req, post_data)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: BAD REQUEST

Crash with "KeyError: 'result'"

% ./atlas_manage.py oneoff -f ~/.atlas/auth
Specify Target:207.249.67.253
Specify Type:dns
Specify Protocol[4/6]:4
Specify Description:DNS test of ns1.infoacces.net
Is it OneOff y/n:y
Do you need any additional options y/n:y
Specify option:query_type
Specify value:MX
More y/n:y
Specify option:query_argument
Specify value:mexis.net
More y/n:y
Specify option:query_class
Specify value:IN
More y/n:n
Specify Start Time [Unix Timestamp\Leave blank for now]:
Specify Number of Probes (Integer):200
Specify Probes Source Type [area/country/prefix/asn/probes/msm]:area
Specify Probes Source [WW/West/North-Central/South-Central/North-East/South-East]:WW
You are about to create a new oneoff RIPE Atlas UDM with the following details:
{'definitions': [{'description': 'DNS test of ns1.infoacces.net ', 'af': 4, 'query_argument': 'mexis.net', 'query_type': 'MX', 'query_class': 'IN', 'type': 'dns', 'is_oneoff': 'true', 'target': '207.249.67.253'}], 'probes': [{'requested': 200, 'type': 'area', 'value': 'WW'}]}

A new oneoff UDM just created with id: 1012182
Sleeping for 10 secs in order to give some time to Atlas to produce data...
Seems we got more than 90% (199) of requested probes, sleeping for 5 more secs to be sure we get the maximum probes Atlas can give us.
Traceback (most recent call last):
File "./atlas_manage.py", line 25, in
sys.exit(main())
File "./atlas_manage.py", line 21, in main
class_object.run()
File "/home/bortzmeyer/Programmation/RIPE-Atlas/ripe-atlas-cmdline/commands/oneoff.py", line 63, in run
if self.get_probes_number():
File "/home/bortzmeyer/Programmation/RIPE-Atlas/ripe-atlas-cmdline/commands/oneoff.py", line 95, in get_probes_number
self.url_results = 'https://atlas.ripe.net%s' % metadata['result']
KeyError: 'result'

Asking is it is oneoff when the command is "oneoff"

% ./atlas_manage.py oneoff -f ~/.atlas/auth
Specify Target:207.249.67.253
Specify Type:dns
Specify Protocol[4/6]:4
Specify Description:DNS test of ns1.infoacces.net
Is it OneOff [y/n]:

Why asking since the actual command name already shows I want a oneoff measurement?

Options should be mandatory for DNS tests

DNS tests require some options such as the query name. The program does not ask for them and, as a result:

ou are about to create a new oneoff RIPE Atlas UDM with the following details:
{'definitions': [{'description': 'DNS test of ns1.infoacces.net ', 'type': 'dns ', 'target': '207.249.67.253', 'is_oneoff': 'true', 'af': 4}], 'probes': [{'requested': 200, 'type': 'area', 'value': 'WW'}]}

Problem with HTTP request.
Traceback (most recent call last):
File "/home/bortzmeyer/Programmation/RIPE-Atlas/ripe-atlas-cmdline/commands/create.py", line 167, in create
response = urllib2.urlopen(req, post_data)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: BAD REQUEST

Does not handle blank responses to some questions

If I reply by just Enter when asked:

Specify Probes Source Type [area/country/prefix/asn/probes/msm]:
Specify Probes Source:

An incorrect request is created:

You are about to create a new oneoff RIPE Atlas UDM with the following details:
{'definitions': [{'description': 'Test cmd line', 'type': 'ping', 'target': 'www.nic.fr', 'is_oneoff': 'true', 'af': 4}], 'probes': [{'requested': 5, 'type': '', 'value': ''}]}

and it crashes (but does not detect it and still requests the results) ๐Ÿ‘

Problem with HTTP request.
Traceback (most recent call last):
File "/home/bortzmeyer/Programmation/RIPE-Atlas/ripe-atlas-cmdline/commands/create.py", line 167, in create
response = urllib2.urlopen(req, post_data)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: INTERNAL SERVER ERROR

Sleeping for 10 secs in order to give some time to Atlas to produce data...
Problem with HTTP request.
Traceback (most recent call last):
File "/home/bortzmeyer/Programmation/RIPE-Atlas/ripe-atlas-cmdline/commands/init.py", line 40, in http_get
response = urllib2.urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: NOT FOUND

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.