"Log file rotation" feature missing in create/edit server, when feature is active

Obviously, new servers are created with the Logfile Rotation feature automatically turned on (if the Feature is enabled and the Plan allows it). There is no checkbox to turn it off in the web interface then.

The checkbox also is missing in "Edit virtual server" then.

Using the command line API it is possible though to turn it off after creation: "virtualmin disable-feature --logrotate --domain mydomain.com"

Afterwards, the "Logfile Rotation" feature does show up (turned off) in the "Edit Virtual Server" web interface function!

When I turn it on again there (which works correctly), it disappears once more from the list.

Status: 
Closed (fixed)

Comments

That is actually intentional .. the log rotation feature is automatically enabled whenever a website is, so that users don't accidentally de-select it and end up with huge log files.

Why would you want to disable log rotation for a domain?

You're right, I suppose I wouldn't want to (and indeed DON'T want to :) ) disable log file rotation.

I just think that not showing this option at all, when it is mentioned in the documentation and the Plan server features, can (and as we see does) lead to puzzlement why it isn't there. After all, users might indeed have a custom method of log rotation (as the documentation implies as a useful case for deactivating the built-in one).

And since the feature can be turned on via GUI, and turned off via command line, one should in my opinion be able - at least for reasons of consistency - to turn it off (after an appropriate warning) via GUI too.

You can turn it off globally at System Settings -> Features and Plugins, for the case where you've setup your own log rotation method. I just decided that allow it to be disabled via the UI is too likely to cause problems for inexperienced users. Users of the API are generally expected to better know what they are doing :-)

Okay that's good... I personally sure can live with that, since I know now how to configure it. :)

Maybe you might want to add an appropriate hint somewhere in the GUI that it is possible to turn rotation off via the API, so that users don't wonder if the switch is missing due to a bug.

I'll look into that .. although nobody else has asked how to turn off log rotation, as its generally something you always want active if you value your disk space :-)

Well, seems I'm quite the observant user then, and there's a first for everything. ;)

As I said, it's not that I'd want to turn it off, it just struck me as odd that this feature was missing. If e.g. a checkbox was there, which you can't turn off, and a notice in the documentation "do not turn this off!", that would suffice. Then I know it's not a bug and the coders forgot to add that function, but it's intentional.

Maybe it's just me. Computer science guy... you know those. ;)

Automatically closed -- issue fixed for 2 weeks with no activity.

An additional hint/finding about this "issue":

I just noticed, after looking quite stumped at Virtualmins on two servers of mine - one being the "experimental" one that I did all my test with so far, one being a freshly installed one that's supposed to become my production server - that the latter exhibited the behavior described in this issue (Log file rotation feature checkbox missing), while the former did have the checkbox, always, no matter the status of the feature.

I found out that the reason is that I unchecked Default on the page Features and Plugins for the Logfile rotation. Same goes for the features "Administration user" and "Home directory". When you turn "Default" off for those, you can create domains with those features turned off, and the checkboxes to turn them off or on later stay visible.

I don't know if that behavior is intended - just letting you know that I just discovered it. :)

Oh yeah, now you mention it I remember that this is intentional behavior. It's been a while since I wrote that code :-)

:D I SO know what you mean.

I'm currently in the process of documenting a considerable bunch of code that I produced for my doctoral thesis... It's been like three months that I wrote that code, and I'm already wondering in multiple places "now what the heck was the purpose of those lines there..." ;)