| Summary: | net-analyzer/cacti post-install instructions for upgrades are totally wrong | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Jakub Moc (RETIRED) <jakub> |
| Component: | New packages | Assignee: | Gentoo Netmon project <netmon> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Jakub Moc (RETIRED)
2005-03-01 05:23:44 UTC
All the steps named there are useless (except maybe for major version upgrades). Actually, you have to setup everything from scratch if you follow them. Please drop the whole "Upgrading" part from the instructions or correct this. First of all, no dropping of database is needed! Also, the rra directory should be in CONFIG_PROTECT, otherwise you will lose all your graphs. :-( Reproducible: Always Steps to Reproduce: 1. Upgrade cacti. 2. Follow the "Upgrading" instructions. 3. Congratulations, now you have to start setting up everything from scratch. Actual Results: No upgrade, you have to setup cacti from scratch. Graphs lost. Expected Results: Provide useful, not misleading and in fact harmful instructions to people that are upgrading! Also, I really don“t like to lose graphs history. As far as adding the rra directory to CONFIG_PROTECT goes, since it's handled by webapp-config, this is not possible until webapp-config supports something like this. I've gone ahead and removed the Upgrading instructions. I'd like to have replaced it with correct information, but I am not familiar with this package. If you'd like to take a stab at it, that'd be awesome. If you do, just reopen this bug and I'll get it included asap. Thanks for the bug. Thanks. Basic upgrade instructions are on the Cacti homepage, see http://www.cacti.net/downloads/docs/html/upgrade.html Step 1: Just needed to have a DB backup if something goes wrong. Steps 2-4 and 8 are done via ebuild upgrade and webapp-config, no need to do them manually. Step 5: Was correct in the original upgrade instructions. Steps 6 and 7 - well, webapp-config should not touch the files in there. :-/ Step 8 is AFAIK not necessary _if_ you are running the poller.php script as root from root crontab, not as Apache. Since running it as Apache user is advised in postinst-en.txt, the appropriate owner of /rra and /log should set when installing/upgrading via ebuild/webapp-config or these instructions should be changed. I have this line in crontab and it works with current root:root permissions: */5 * * * * /usr/bin/php /var/www/localhost/htdocs/poller.php > /dev/null 2>&1 Also specifying the complete path to CLI PHP is highly advisable, cron is not good at parsing the $PATH environment variable. Step 9: Pretty obvious one. ;-) I hope this helps. Updated.
In response to your:
> Step 8 is AFAIK not necessary _if_ you are running the poller.php script as root from root crontab, not as Apache. Since running it as Apache user is advised in postinst-en.txt, the appropriate owner of /rra and /log should set when installing/upgrading via ebuild/webapp-config or these instructions should be changed.
a. webapp_serverowned is the function you use to tell webapp.eclass that certain *files* should be installed as the web server owner. webapp_serverowned doesn't support directories it looks like.
b. We also can't manually run chown from the ebuild since we don't know what user the web server (whatever it may be) will run as. We cannot assume that it is apache.
This is why we have to resort to instructing the user to do so manually.
Thanks very much for helping me get the upgrading instructions sorted out.
|