naparuba/shinken — Issue #165: [shinken.sh] Behavior
Author: Seb-Solon
Created: 2012-02-07 11:20:03+00:00
State: open
Labels: Setup

Hi everyone,

I open this thread because I think we should discuss the shinken.sh behavior together. Maybe the devel list is more appropriated, but I beleive that you will all receive a email for this new issue. It's pretty the same thing in fact :)

I was discussing the backup fucntion of the script with @david-guenault and I realized that maybe the problem wasn't where I thought.

As I said before, this script tends to be the main entry point for Shinken users. Unfortunately we can't make assumptions about users. Of course I (and you) would like the users to be smart with a great knowledge of what it's good and it's not :) But you also know that, user may be real noob who were asked for installing Shinken without knowing what a server is ...

In this case, shinken.sh sohuld be in charge of "protecting" the server.
Let's take a bad example :
The user specify the install path as /usr/local/ (yes no sub-directory, because the user is such a moron that when his manager told him to install in /usr/local he didn't realized that he had to create a new folder)
As the install phase doesn't backup or delete files, everything is fine. Now our user notice that a new version of Shinken is available on the git. As he is lazy, he uses the update function... Yes the backup save etc var and libexec, but you can say goodbye to your /usr/local :)
The problem is the same, is the user decides to remove Shinken. If it's installed in a shared directory, there will be some trouble.

Now take another example. The user install Shinken in a good directory. He also notices that a new version is available.
If the update fails, the directory may be a complete mess (depending on when the fail occured). Of course, with a simple backup the user can just remove Shinken, install and move the backup he had. I think the user doesn't have to do it by itself. If there is a problem, the backup is here to retrieve the previous install.

What I think : Shinken may check if the directory is empty before install.
A backup is done to save a state. When you restore your backup, everything should be working as before. Therefore, the backup should copy the whole directory.

Regards,

Seb