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

Improve the error message when dot is not installed on the system #49

Closed
carlos-molina opened this issue Apr 23, 2014 · 6 comments
Closed

Comments

@carlos-molina
Copy link

I have been exploring the 'irmin' tutorial.

I followed 'Using the In-Memory Backend' instructions as suggested, except that I created the 'irmin-mem' dir within my personal space instead of '/tmp' as indicated in the tutorial.

I uncovered the following error message:

m770@pursuit2:/local/irminsule/testing/irmin-mem$ irmin dump thestate
sh: 1: dot: not found
2014-04-23 10:27:07.942 IRMIN ERROR: The thestate.dot is corrupted
cm770@pursuit2:
/local/irminsule/testing/irmin-mem$

Notice that the thestate.dot file is still created!

cm770@pursuit2:~/local/irminsule/testing/irmin-mem$ ls -la
total 16
drwxr-xr-x 2 cm770 cm770 4096 Apr 23 10:27 .
drwxr-xr-x 4 cm770 cm770 4096 Apr 23 10:33 ..
-rw-r--r-- 1 cm770 cm770 5864 Apr 23 10:27 thestate.dot

It might help to take into account that before the 'irmin dump thestate' instruction I executed on my interaction terminal:

  1. export IRMIN=r:http://127.0.0.1:8080
  2. irmin write person/name carlos
  3. irmin write person/surname molina
  4. STATE=irmin snapshot
  5. irmin write person/surname perez
  6. irmin revert $STATE

These are the last lines produced by irmin main terminal:

2014-04-23 10:26:51.761 HTTP INFO : Request received: PATH=/contents/read/19e370dcbf0f82eba30d835f45c7c1900c0ed66b
2014-04-23 10:27:07.927 HTTP INFO : Request received: PATH=/contents/dump
2014-04-23 10:27:07.928 HTTP INFO : Request received: PATH=/node/dump
2014-04-23 10:27:07.929 HTTP INFO : Request received: PATH=/commit/dump
2014-04-23 10:27:07.930 HTTP INFO : Request received: PATH=/ref/dump
irmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestateirmin dump thestate

@samoht
Copy link
Member

samoht commented Apr 23, 2014

sh: 1: dot: not found

This message means that you don't have the dot executable installed on your system. You need to install graphviz if you want to see generate the graph from the .dot file. On ubuntu that should be a matter of apt-get install graphviz.

I'll try to improve the error message.

@carlos-molina
Copy link
Author

Good and thanks for your help. Yet notice that I did not want to generate anything or fiddle with graphics--I only wanted to dump the state of my storage!

@samoht
Copy link
Member

samoht commented Apr 23, 2014

Well, irmin dump thestate dump the low-level state of your storage as a graph (it's hard to display something more meaningful). You can use irmin list or irmin tree if you want to see high-level view of your store.

@samoht samoht changed the title Irmin: In-memory Backend ERROR: The thestate.dot is corrupted Improve the error message when dot is not installed on the system Apr 23, 2014
@avsm
Copy link
Member

avsm commented Apr 25, 2014

Did you have anything else in mind for what "irmin dump" should output, Carlos? The Dot format is the graph representation of the database, so a pure terminal dump aside from that is tough.

Could just dump the dot to stdout instead of invoking the shell command, I guess.

On 23 Apr 2014, at 13:56, Thomas Gazagnaire notifications@github.com wrote:

Well, irmin dump thestate dump the low-level state of your storage as a graph (it's hard to display something more meaningful). You can use irmin list or irmin tree if you want to see high-level view of your store.


Reply to this email directly or view it on GitHub.

@carlos-molina
Copy link
Author

You're right Thomas, the installation of 'graphviz' solves the problem. I only have three minor observations:

  1. The user needs to execute apt-get under sudo privileges. Like this:

% sudo apt-get install graphviz

and then he or she needs to provide an admin password.

My concern here is that the installation process that I have been following involves the execution of several commands under 'sudo'.

This rules out potential users of Irminsule that do not have access to administration passwords of their Linux machines. I guess that we are ruling out most of the student population.

I you think that this is good idea, we can, at some point, explore and develop an alternative installation procedure that does not involves 'sudo'.

  1. $ open thestate.png` does not work in Linux. You need to use 'display' instead of 'open'.

  2. In response to Anil comments: Did you have anything else in mind for what "irmin dump" should output, Carlos? ...

All depends on who (people or programmes) will use the dump. If it is for people to see (naked eye) the graph on the screen, then we need software to trim the tree so that I can select to display only specific branches, such as my current version of my DB.

I can see that my example of DB has only three leaves and I have altered only one of them. Yet the png graph is already large (nearly an A4 page), hard to look at and even harder to reason about.

@samoht
Copy link
Member

samoht commented Jun 26, 2014

Fixed now.

@samoht samoht closed this as completed Jun 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants