jenkins-bot has submitted this change and it was merged. Change subject: Allow use of cachefilesd to speed up file system operations ......................................................................
Allow use of cachefilesd to speed up file system operations Add a new configuration option that can be used to enable use of the cachefilesd service. This service runs on the VM and caches files accessed from the host NFS server locally on the VM's native filesystem. This can be enabled with `vagrant config nfs_cache yes`. It is left off by default for now to allow further testing. References: * http://chase-seibert.github.io/blog/2014/03/09/vagrant-cachefilesd.html * http://linux.die.net/man/8/cachefilesd Co-author: Bryan Davis <[email protected]> Bug: T78733 Change-Id: Icdb9ca07cfe81ba70ca924ce2459fcd2f277e684 --- M Vagrantfile M features/config.feature M lib/mediawiki-vagrant/settings/definitions.rb M lib/mediawiki-vagrant/version.rb M puppet/modules/mwv/manifests/init.pp 5 files changed, 26 insertions(+), 1 deletion(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/Vagrantfile b/Vagrantfile index 3750ede..e09d61e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -130,6 +130,7 @@ if settings[:nfs_shares] root_share_options[:type] = :nfs root_share_options[:mount_options] = ['noatime','rsize=32767','wsize=32767','async'] + root_share_options[:mount_options] << 'fsc' if settings[:nfs_cache] config.nfs.map_uid = Process.uid config.nfs.map_gid = Process.gid else diff --git a/features/config.feature b/features/config.feature index fae444b..d7cb790 100644 --- a/features/config.feature +++ b/features/config.feature @@ -57,6 +57,7 @@ | static_ip | 1.1.1.1 | | http_port | 8888 | | nfs_shares | no | + | nfs_cache | yes | | forward_agent | yes | | forward_x11 | no | Then the command should have completed successfully @@ -67,6 +68,7 @@ | static_ip | 1.1.1.1 | | http_port | 8888 | | nfs_shares | no | + | nfs_cache | yes | | forward_agent | yes | | forward_x11 | no | diff --git a/lib/mediawiki-vagrant/settings/definitions.rb b/lib/mediawiki-vagrant/settings/definitions.rb index e0c64d9..d979c4a 100644 --- a/lib/mediawiki-vagrant/settings/definitions.rb +++ b/lib/mediawiki-vagrant/settings/definitions.rb @@ -37,6 +37,12 @@ default: defined?(Vagrant::Util::Platform) ? !Vagrant::Util::Platform.windows? : true, coercion: ->(setting, new) { !!(new.to_s =~ /^(true|t|yes|y|1)$/i) } + setting :nfs_cache, + description: "Use cachefilesd to speed up NFS file access (EXPERIMENTAL)", + help: "Enter 'yes' or 'no'. If your VM is currently running, reload it after changing this setting.", + default: false, + coercion: ->(setting, new) { !!(new.to_s =~ /^(true|t|yes|y|1)$/i) } + setting :forward_agent, description: "Enable agent forwarding over SSH connections by default", help: "Enter 'yes' or 'no'. Agent forwarding requires an SSH agent running on the host computer.", diff --git a/lib/mediawiki-vagrant/version.rb b/lib/mediawiki-vagrant/version.rb index 93ca639..2d3ea8b 100644 --- a/lib/mediawiki-vagrant/version.rb +++ b/lib/mediawiki-vagrant/version.rb @@ -1,3 +1,3 @@ module MediaWikiVagrant - VERSION = '0.7.0' + VERSION = '0.7.1' end diff --git a/puppet/modules/mwv/manifests/init.pp b/puppet/modules/mwv/manifests/init.pp index 41d31ed..539e3ed 100644 --- a/puppet/modules/mwv/manifests/init.pp +++ b/puppet/modules/mwv/manifests/init.pp @@ -55,4 +55,20 @@ package { [ 'chef', 'chef-zero' ]: ensure => absent, } + + # Support the `nfs_cache` setting with cachefilesd + package { 'cachefilesd': + ensure => present, + } + + file { '/etc/default/cachefilesd': + content => "RUN=yes\nSTARTTIME=5\n", + require => Package['cachefilesd'], + } + + service { 'cachefilesd': + ensure => running, + require => Package['cachefilesd'], + subscribe => File['/etc/default/cachefilesd'], + } } -- To view, visit https://gerrit.wikimedia.org/r/201616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icdb9ca07cfe81ba70ca924ce2459fcd2f277e684 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh <[email protected]> Gerrit-Reviewer: Aaron Schulz <[email protected]> Gerrit-Reviewer: BryanDavis <[email protected]> Gerrit-Reviewer: Dduvall <[email protected]> Gerrit-Reviewer: Gilles <[email protected]> Gerrit-Reviewer: Jdlrobson <[email protected]> Gerrit-Reviewer: Ori.livneh <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
