TheTorProject / lepidopter

lepidopter: raspberry pi image for conducting OONI network measurements
https://ooni.torproject.org/
GNU General Public License v3.0
47 stars 20 forks source link

Feature/ooniprobe v2 #74

Closed anadahz closed 7 years ago

anadahz commented 8 years ago

This implements #73 . Stable ooniprobe v2 will be included upon official release.

hellais commented 8 years ago

Inside of https://github.com/TheTorProject/ooni-probe/pull/582/commits/31bcae623b8a621aa941f284e67438168243c44a I pushed changes to support parsing multiple config files.

Basically ooniprobe will look at config files in the following order (first have priority over the last):

In order to properly handle the lepidopter specific options you should remove from the config file any option that is not lepidopter specific and so that we can fallback to the default for those and write the configuration file to /etc/ooniprobe.conf.

Looking at the config file I believe you should write a config file that includes only the following:

basic:
   logfile: /var/log/ooni/ooniprobe.log
advanced:
   webui_port: 8842
   webui_address: "0.0.0.0"

Edit: If you need to include some other settings let me know, because there could be some side effects that may be confusing to debug.

hellais commented 8 years ago

Also note that this should ideally also include a version of the updater.

anadahz commented 8 years ago

I'm not sure that this will work nice, as how you mentioned it seems that we definitely going to have some "side effects" i.e incorrect configuration file being used.

@hellais Is it not possible to add a config option that ooniprobe-agent will use once instructed?

hellais commented 8 years ago

I would rather the configuration file is placed inside of the standard location for it which is /etc/ooniprobe.conf, so that we don't start the daemon with any custom option on lepidopter (this allows us more flexibility to adjust it's behaviour based on ooniprobe system updates). Is it a problem to change the location of the configuration file?

anadahz commented 8 years ago

Sure I can add a link to /etc/ooniprobe.conf though it will be nicer to move to a non hardcoded configuration PATH in future releases of ooniprobe.

hellais commented 8 years ago

Sure I can add a link to /etc/ooniprobe.conf though it will be nicer to move to a non hardcoded configuration PATH in future releases of ooniprobe.

Can you make it an actual file and not a symlink? I would like it if the layout of the filesystem at the end of the the update process is exactly the same as from an install of a new lepidopter image.

As I said I would like to have configuration file management be handled inside of ooniprobe and have the freedom to change the default paths when and if needed without having to worry about ooniprobe not being invoked in a non standard way in lepidopter.

anadahz commented 8 years ago

ooniprobe.conf has been moved to /etc in: https://github.com/TheTorProject/lepidopter/pull/74/commits/94118e9517399b9e7195810aaacec0a653b62e75

hellais commented 8 years ago

There are still a couple of things missing for the updater (look at the install command of updater.py to see what needs to be done to install it https://github.com/OpenObservatory/lepidopter-update/blob/master/updater/updater.py#L280):

anadahz commented 7 years ago

The points in https://github.com/TheTorProject/lepidopter/pull/74#issuecomment-245232682 have been implemented but in a different PATH /opt/ooni/lepidopter-update/ insted of /opt/ooni/updater/.

anadahz commented 7 years ago

I'm going to proceed by merging this to master.