Skip to content

Commit

Permalink
Added: iMSCP::Mount::isMountpoint() function (iMSCP::Mount library)
Browse files Browse the repository at this point in the history
Added: iMSCP::Syscall library
Rewritten: iMSCP::Mount library - Make direct syscalls instead of calling mount(8)/umount(8)
Updated: API version to 1.0.5 (needed due to changes in iMSCP::Mount library)
[ci skip]
  • Loading branch information
nuxwin committed Aug 25, 2016
1 parent d3ad0ea commit ad6633b
Show file tree
Hide file tree
Showing 14 changed files with 311 additions and 83 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Expand Up @@ -18,8 +18,11 @@ CONTRIB
Removed: 10_named_tuning2.pl listener (replaced by 10_named_override_default_ns_rr.pl listener)

BACKEND
Added: iMSCP::Mount::isMountpoint() function (iMSCP::Mount library)
Added: iMSCP::Syscall library
Added: Support for `rbind' (iMSCP::Mount library)
Fixed: Could not bind mount socket files (iMSCP::Mount library)
Rewritten: iMSCP::Mount library - Make direct syscalls instead of calling mount(8)/umount(8)

DATABASE
Added: Compound unique index on the domain_traffic table to avoid slow query and duplicate entries
Expand Down Expand Up @@ -65,6 +68,9 @@ PACKAGES
Fixed: Could not authenticate to AWStats interface of domain aliases and subdomains
Removed: Support for AWStats static mode

PLUGINS
Updated: API version to 1.0.5 (needed due to changes in iMSCP::Mount library)

PRESEED
Removed: SERVER_IPS parameter according changes made in installer

Expand Down
10 changes: 9 additions & 1 deletion docs/1.3.x_errata.md
Expand Up @@ -4,6 +4,14 @@

### Pre-update tasks

#### Plugins:

Due to major changes made in the iMSCP::Mount library, versions of InstantSSH plugin which are older than 4.1.0 are not
compatible with this new version. Thus, if you use that plugin, you need to disable it first. Once the update done, you
must upgrade your InstantSSH plugin with the last available version.

#### Services

Before running the i-MSCP installer, you must stop the `imscp_panel` service manually.

### AWStats authentication
Expand Down Expand Up @@ -185,7 +193,7 @@ imscp-reconfigure script.

This `imscp_mountall` service mounts i-MSCP file systems when the server is rebooted. This service reads entries in a
fstab-like file located at `/etc/imscp/mounts/mounts.conf`. Unlike the entries that are added in the system fstab file,
the entries added in this file are processed in sequential order.
the entries added in this file are always processed in sequential order.

Third-party software components that want add entries in that file must use the API provided by the iMSCP::Mount
library.
Expand Down
1 change: 1 addition & 0 deletions docs/Debian/packages-jessie.xml
Expand Up @@ -236,6 +236,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
1 change: 1 addition & 0 deletions docs/Debian/packages-stretch.xml
Expand Up @@ -134,6 +134,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
1 change: 1 addition & 0 deletions docs/Debian/packages-wheezy.xml
Expand Up @@ -276,6 +276,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
1 change: 1 addition & 0 deletions docs/Ubuntu/packages-precise.xml
Expand Up @@ -256,6 +256,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
1 change: 1 addition & 0 deletions docs/Ubuntu/packages-trusty.xml
Expand Up @@ -250,6 +250,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
1 change: 1 addition & 0 deletions docs/Ubuntu/packages-xenial.xml
Expand Up @@ -145,6 +145,7 @@
<package>libnet-dns-perl</package>
<package>libnet-libidn-perl</package>
<package>libtimedate-perl</package>
<package>libunix-mknod-perl</package>
<package>libxml-parser-perl</package>
<package>libxml-simple-perl</package>
<package>libjson-perl</package>
Expand Down
3 changes: 2 additions & 1 deletion engine/PerlLib/Servers/httpd/apache_fcgid.pm
Expand Up @@ -1313,8 +1313,9 @@ sub mountLogsFolder

my $fsSpec = File::Spec->canonpath( "$self->{'config'}->{'HTTPD_LOG_DIR'}/$data->{'DOMAIN_NAME'}" );
my $fsFile = File::Spec->canonpath( "$data->{'HOME_DIR'}/logs/$data->{'DOMAIN_NAME'}" );
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'ro,bind' };
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'bind,ro' };
my $rs = $self->{'eventManager'}->trigger( 'beforeMountLogsFolder', $data, $fields );
$rs ||= iMSCP::Dir->new( dirname => $fsFile )->make();
$rs ||= addMountEntry( "$fields->{'fs_spec'} $fields->{'fs_file'} $fields->{'fs_vfstype'} $fields->{'fs_mntops'}" );
$rs ||= mount( $fields );
$rs ||= $self->{'eventManager'}->trigger( 'afterMountLogsFolder', $data, $fields );
Expand Down
3 changes: 2 additions & 1 deletion engine/PerlLib/Servers/httpd/apache_itk.pm
Expand Up @@ -1309,8 +1309,9 @@ sub mountLogsFolder

my $fsSpec = File::Spec->canonpath( "$self->{'config'}->{'HTTPD_LOG_DIR'}/$data->{'DOMAIN_NAME'}" );
my $fsFile = File::Spec->canonpath( "$data->{'HOME_DIR'}/logs/$data->{'DOMAIN_NAME'}" );
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'ro,bind' };
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'bind,ro' };
my $rs = $self->{'eventManager'}->trigger( 'beforeMountLogsFolder', $data, $fields );
$rs ||= iMSCP::Dir->new( dirname => $fsFile )->make();
$rs ||= addMountEntry( "$fields->{'fs_spec'} $fields->{'fs_file'} $fields->{'fs_vfstype'} $fields->{'fs_mntops'}" );
$rs ||= mount( $fields );
$rs ||= $self->{'eventManager'}->trigger( 'afterMountLogsFolder', $data, $fields );
Expand Down
3 changes: 2 additions & 1 deletion engine/PerlLib/Servers/httpd/apache_php_fpm.pm
Expand Up @@ -1325,8 +1325,9 @@ sub mountLogsFolder

my $fsSpec = File::Spec->canonpath( "$self->{'config'}->{'HTTPD_LOG_DIR'}/$data->{'DOMAIN_NAME'}" );
my $fsFile = File::Spec->canonpath( "$data->{'HOME_DIR'}/logs/$data->{'DOMAIN_NAME'}" );
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'ro,bind' };
my $fields = { fs_spec => $fsSpec, fs_file => $fsFile, fs_vfstype => 'none', fs_mntops => 'bind,ro' };
my $rs = $self->{'eventManager'}->trigger( 'beforeMountLogsFolder', $data, $fields );
$rs ||= iMSCP::Dir->new( dirname => $fsFile )->make();
$rs ||= addMountEntry( "$fields->{'fs_spec'} $fields->{'fs_file'} $fields->{'fs_vfstype'} $fields->{'fs_mntops'}" );
$rs ||= mount( $fields );
$rs ||= $self->{'eventManager'}->trigger( 'afterMountLogsFolder', $data, $fields );
Expand Down

0 comments on commit ad6633b

Please sign in to comment.