seattletestbed / seash Goto Github PK
View Code? Open in Web Editor NEWInteractive vessel management tool
License: MIT License
Interactive vessel management tool
License: MIT License
Make use of the refactored location-printing logic within the geoip_location_str function.
Seash gives errors like this when trying to load keys that don't exist:
!> loadkeys ../../test12/test2 as test2
Traceback (most recent call last):
File "seash.py", line 1622, in command_loop
File "/home/justin/downloads/test11/seattle/seattle_repy/rsa_repy.py", line 732, in rsa_file_to_privatekey
File "/home/justin/downloads/test11/seattle/seattle_repy/emulfile.py", line 144, in emulated_open
File "/home/justin/downloads/test11/seattle/seattle_repy/emulfile.py", line 301, in __init__
IOError: [2](Errno) No such file or directory: '../../test12/test2.privatekey'
It should show a message rather than a traceback and also hint to the user what they might try to do instead. This includes making sure they know not to enter ".publickey" or ".privatekey", or maybe even allowing them to enter that as well and taking the correct action if they do.
Albert Rafetseder requested that we add a mechanism to list the contents of a remote file through seash. This way one need not download and then open another shell and cat the file.
It would be nice if a command could be added to seash to do this.
A lot of the seash tests fail if auto tab completion is turned off on the machine. The tests should take this into account (unless that is the desired result)? You can take a look at the continuousbuild test running on testbed-opensuse (https://blackbox.cs.washington.edu/~continuousbuild/linux/)
Seash should allow modules to extend it. This would do things like support geoip lookups, selexor integration, controlling GENI resources, etc.
reports:
When I use 'python seash.py' it reports the following errors:
python seash.py
Traceback (most recent call last):
File "seash.py", line 2422, in <module>
time_updatetime(34612)
File "/home/lenovo/proxy/seattle/seattle_repy/time_interface_repy.py", line 121, in time_updatetime
raise Exception(ex_str)
Exception: ERROR: failed to update ntp time, Time Server update failed. Perhaps retry later...Unable to locate any servers running time_server.repy
whether it because I behind the local router? And can I use proxy?
It's not clear why seash can't contact the time server.
seash.py needs to be refactored. 1700 lines of elif
blocks make me sad. Also, of the 2367 total lines in the file, there are only 1094 unique lines. That's quite a bit of code repetition.
The command 'show files' should sort the list of files returned to make it easier for the user to see differences between the set of files on different nodes.
The new version of seash fails to create new groups. This seems to be a problem with seash_dictionary assuming that the target of an 'add XX to TARGET' command already exists.
Seash no longer accepts the syntax 'show ip > filename'.
We should have the ability to save the groups, etc. that the user has set via seash. Additionally, having the ability to 'autosave' would be useful.
Lines like 'Timed out' get sprinkled into a 'show log' call without being associated with a specific IP.
Many of the seash commands used to work for plural and singular versions. For example, show locations
or show ips
. These no longer work but our documentation uses them.
We should find a smart way to make seash use the pluralized versions of many of these commands. Copying the data in the dictionary certainly doesn't qualify.
This update is twofold:
show location(s)
command to perform geoip lookups to find node location infoshow coordinates
, that displays node latitude/longitude coordinatesWe should implement tab completion for seash commands and file names for major operating systems. For instance, when the user types "show" and hits TAB, seash should display a list of commands that are compatible with "show". When the user types "run" followed by TAB, seash should list files in the specified directory. This should be similar to the Unix shell.
Seash doesn't check if mismatched keys are loaded. I.e. I can rename Joe's publickey to be foo.publickey and Bob's privatekey to be foo.privatekey and loadkeys foo will work fine. We should check for this and give an intelligent error message.
seash fails and scrolls output on Windows. It seems to be readline related.
Evan reported a problem with start_vessel() where each call would result in more arguments used when the program was run (all additional args plus the new ones). I immediately knew what I did wrong, it's fundamental mistake: used a mutable object for a default value of an argument.
A user was (understanbly) confused because when she would try to copy output from seash, it would exit. She was using the common keyboard shortcut, Ctrl-C.
Seash doesn't print any information to help the user understand what happened.
Currently, Seash spits out a Traceback when you attempt show location
or show coordinates
on local IPs. The error has to do with how Seash handles the NoneType returned from the query to the GeoIP server.
This should be fixed to at least display a useful error message.
Seash should ignore whatever follows a hash sign (#) on a line. This would be great for documentation purposesd, and code-wise it's only an additional split
upfront.
There is currently no page that describes each seash module in detail. It should include details on what each module is for, and what they do.
We probably should have something that prints an informative message when the user logs into seash. There are enough commands in the shell that it might not be a bad idea to remind them that they can savestate, etc.
I can think of about 10 different things we could list now. (We can even promote new software, etc. much like our blog is supposed to)
Arguments to Seash's browse command seem to have no effect. They should change which advertise service is used.
Exact warning message is:
safe.py:72: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
import compiler
This isn't really a problem unless we plan on moving Seattle to later versions of Python.
Warning has appeared in systems with Python 2.7.2 installations when running seash.py
The group names for Started, Stopped, etc. aren't what is shown. This should be fixed.
seash does not recognize user-inputted arguments when using 'start' instead of 'run'
This depends on XML-RPC implementation of GENI operations. Once that task is complete (#255), seash can be extended to acquire/release vessels, as well as to perform all other geni ops.
Tab complete doesn't work on Python 2.7 on Mac OSX 10.5. It however works on Python 2.5 and 2.6.
Currently, uploading large (150kb+) files through seash results in timeout problems. There should be a way for the user to set the timeout for all signed and raw communications with the node manager.
One of our most common sources of confusion is the fact that sesah times out when uploading a large program. We should try to think of a way to handle this that is more graceful than the opaque error messages that we currently give.
It's not clear how to solve this.
The experimentlibrary has various functions that allow you to interact with a vessel. However these are two functions that would be nice if they were added (or any similar functions).
get_vesselhandle(nodeid, vesselname):
Given an unique nodeid and a particular vesselname, return the
vesselhandle for that particular vessel.
get_nodeid(nodelocation):
Given the current location of the node (ip:port), retrieve the nodeid associated with the node.
Seash doesn't allow using up arrow to select previous commands, etc. This is highly desirable.
Add 'show version' functionality to seash.
We need a way to distinguish nodes of different versions from one another, since some repy programs may rely on recent changes pushed in the latest versions to run.
We should add detailed help messages for different commands in seash. This will allow a user to get more information (and perhaps examples) about how to use many of the commands.
There is too much going on with the help message in seash. We need to strategically trim.
Jeff needs a way to get node version info using the experimentlib. The easiest solution is probably just to include this in the vesseldict's returned by browse_node(), especially as they each already include general node info such as the nodeid.
Often times, when communications with a vessel is slow, you get confusing errors. It would be good to display something more human readable.
For example,
hundrednodes@%all !> run allpairsping.repy 63179
Failure 'signedcommunicate failed on session_recvmessage with error 'recv() timed out!'' on 141.219.252.133:1224:v16
Added group 'rungood' with 97 targets and 'runfail' with 1 targets
could be written instead as:
Did not receive timely response from some nodes. This operation may have failed or succeeded on these nodes. Relevant nodes: 141.219.252.133:1224:v16
Note that I'm just suggesting some text. Feel free to improve / clarify further.
We get '''seash_exceptions.!ParseError: Target does not exist''' errors. This appears to be related to the nodemanager that is started in order for the test to function. Additionally, the nodemanager does not seem to be shutdown correctly after the script ends.
Richard Weiss mentioned it would be nice to have a way to set variables in seash. Perhaps something like bash where you could set a variable using: set GENIPORT=123
and then later do: run allpairsping.repy $GENIPORT
.
We should think about this.
It would be useful to have the ability to run pre-existing seash scripts. For example, we could write something like this...
login.seash
loadkeys leonwlaw
as leonwlaw
browse
on browsegood
and then from within seash...
!> script login.seash
leonwlaw@browsegood !>
Or if we want to do some debugging...
!> script login.seash verbose
!> loadkeys leonwlaw
!> as leonwlaw
leonwlaw@ !> browse
leonwlaw@ !> on browsegood
leonwlaw@browsegood !>
In addition, maybe the module can also run a script specified directly from the command line.
leonwlaw > python seash.py --script login.seash [--verbose]
-- Factoid text --
Enabled modules: ....
leonwlaw@browsegood !>
If there is no Internet connectivity, Seash throws bad errors. When starting Seash up, it hangs for 10-20 seconds then throws the error below:
Traceback (most recent call last):
File "seash.py", line 260, in <module>
time_updatetime(34612)
File "/home/monzum/workspace/seattle_project/scratch_work/seattle_copy/seattle_repy/time_interface_repy.py", line 122, in time_updatetime
raise Exception(ex_str)
Exception: ERROR: failed to update ntp time, Time Server update failed. Perhaps retry later...Unable to locate any servers running time_server.repy
If the network is disconnected after you have started Seash then we get a different error that is also very unhelpful:
Traceback (most recent call last):
File "seash.py", line 226, in command_loop
File "/home/monzum/workspace/seattle_project/scratch_work/seattle_copy/seattle_repy/seash_dictionary.py", line 1522, in command_dispatch
File "/home/monzum/workspace/seattle_project/scratch_work/seattle_copy/seattle_repy/command_callbacks.py", line 1099, in browse
File "/home/monzum/workspace/seattle_project/scratch_work/seattle_copy/seattle_repy/advertise_repy.py", line 379, in advertise_lookup
TypeError: 'NoneType' object is not iterable
I constructed a new demokit using the head of trunk (I've attached it). I sent it to Ravi who said it didn't work.
File "seash.py", line 2273, in
time_updatetime(34612)
File "/home/raviravula/ravidemo/time_repy.py", line 131, in time_updatetime
raise Exception(ex_str)
Exception: ERROR: failed to update ntp time, Time Server update failed.
Perhaps retry later...Unable to locate any servers running
time_server.repy
This is the message.But "python seash.py" took a long time to give this.
Thanks,
Ravi.
We want a python library that can be used for scripting communication with the nodemanager and seattlegeni. It should provide all of the basic functionality and be easy to use (that is, it should hide messy stuff and be fairly high-level).
Yasusi Kanada requests:
I am thinking of using Seattle in my class in Kogakuin University (in Shinjuku).
However, Seattle (seash.py) is written in Python 2 but only Python 3.1 is
installed in PCs in Kogakuin University. To install a new software is basically
inhibited.
Do you have any idea to run Seattle on Python 3.1? Thanks.
Running 'set owner [will always throw up a message saying "WARNING: (ip address), True"
Currently one can show logs with seash but cannot save them. A user has inquired as to whether logs can be saved from within seash and we provided them instructions for writing to files they can then download with seash. That works in this case but in general others will probably have this same desire.
justinc notes:
We perhaps should stress in our documentation that the circular log isn't the right way to capture large amounts of data though.
Seash only allows keys to be located in the current directory. If you try to put keys in any other directory, it assumes that the directory is also part of your user name.
When uploading large files, a bug crept up in seash through session.repy. Below is the provided error message from the log.
"""
ashash3@WAN !> on %8 upload flower.jpg
Failure 'signedcommunicate failed on session_sendmessage with error
'unsupported operand type(s) for +: 'float' and 'str''' uploading to
88.26.241.118:1224:v72
ashash3@WAN !> on %8 upload paper.txt
Failure 'signedcommunicate failed on session_sendmessage with error
'unsupported operand type(s) for +: 'float' and 'str''' uploading to
88.26.241.118:1224:v72
ashash3@WAN !> on %8 upload puppy.jpeg
ashash3@WAN !> on %8 upload flower.jpg
Failure 'signedcommunicate failed on session_sendmessage with error
'unsupported operand type(s) for +: 'float' and 'str''' uploading to
88.26.241.118:1224:v72
ashash3@WAN !> on %8 upload flower.jpeg
ashash3@WAN !>
"""
I have downloaded the latest demokit from the SeattleGENI website and have tried uploaded the files provided by Ashley Chou several times. So far I have not been able to duplicate the error. The only error I have seen are 'Socket closed' error on some nodes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.