Closed (fixed)
Project:
Aegir Hosting Logs
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
24 Mar 2016 at 18:27 UTC
Updated:
10 Nov 2017 at 19:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ergonlogicI'm pretty sure this isn't part of Aegir core. I believe the relevant code lives in hosting_logs.
Comment #3
helmo commentedThat means you don't have the '/var/log/aegir' directory. You'll have to create that dir as the root user.
This code was created when the default was to create the log dir under /var/aegir, where we do have write access. However that has other security implications.
The README mentions that the dir needs to be created ... but maybe we need to add that to the UI too.
Comment #5
helmo commentedI've now added a hook to display a message just after enabling this module to point to the README.
Comment #7
ergonlogicI think this issue needs to be re-opened. This functionality remains buggy:
The
provision_logs_pathoption doesn't seem to get set anywhere on the backend, though there's a front-end field to set it. So I think this module only works if you use the default.Also, later, we seem to check a different option:
The line in that actually throws that warning is calling
mkdir(), but we now assume that an admin will create the directory, so perhaps this should be achmod()instead? Also,provision_file()->chmod()is the usual mechanism for handling filesystem operations.Comment #8
helmo commentedper #7
mkdir of '/var/log/aegir' will almost always fail :(
Comment #9
ergonlogicAlso of note: I believe that I was seeing these warnings when the module was present but not yet enabled. I
ll try to confirm this.
Comment #10
colanJust got this on an upgrade to the Aegir release.
I don't even have this module enabled so I'm not sure why I'm running into this when verifying the Hostmaster site.
Comment #11
alfthecat commented@ergonlogic
Yes, I just did a fresh aegir install and got the warning when the module wasn't enabled. The warning went away after installing and following Readme instructions.
Comment #12
colanI ran the following, and was able to cleanly verify the hostmaster site:
sudo mkdir /var/log/aegirThis works without having to enable the module.
Can we put this in the release notes, that that directory has to be created before upgrading?
Comment #13
helmo commentedThis patch gets rid of the warning by checking if we can write to it.
An alternative is to just remove the whole hook... as the only case where I see this as potentially being used is when you change the provision_logs_path variable.
Jon?
PS: I've added a line to the release notes.
Comment #14
helmo commentedThe reason why this came up even when the hosting_logs module is not enabled is #2917495: Drush includes code from not enabled modules
Comment #16
helmo commented