mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
disable nfs directory cache on kvm host
This commit is contained in:
parent
08bb9eaf47
commit
262ad16f4c
@ -321,6 +321,33 @@ class cgroupConfig(serviceCfgBase):
|
||||
logging.debug(formatExceptionInfo())
|
||||
return False
|
||||
|
||||
class nfsConfig(serviceCfgBase):
|
||||
def __init__(self, syscfg):
|
||||
super(nfsConfig, self).__init__(syscfg)
|
||||
self.serviceName = "Nfs"
|
||||
|
||||
def config(self):
|
||||
try:
|
||||
if not os.path.exists("/etc/nfsmount.conf"):
|
||||
return True
|
||||
|
||||
cfo = configFileOps("/etc/nfsmount.conf")
|
||||
cfo.addEntry("AC", "False")
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.enableService("rpcbind")
|
||||
self.syscfg.svo.stopService("rpcbind")
|
||||
self.syscfg.svo.startService("rpcbind")
|
||||
|
||||
self.syscfg.svo.enableService("nfs")
|
||||
self.syscfg.svo.stopService("nfs")
|
||||
self.syscfg.svo.startService("nfs")
|
||||
|
||||
return True
|
||||
except:
|
||||
logging.debug(formatExceptionInfo())
|
||||
return False
|
||||
|
||||
class securityPolicyConfigUbuntu(serviceCfgBase):
|
||||
def __init__(self, syscfg):
|
||||
super(securityPolicyConfigUbuntu, self).__init__(syscfg)
|
||||
|
||||
@ -133,6 +133,7 @@ class sysConfigAgentUbuntu(sysConfigAgent):
|
||||
networkConfigUbuntu(self),
|
||||
libvirtConfigUbuntu(self),
|
||||
firewallConfigUbuntu(self),
|
||||
nfsConfig(self),
|
||||
cloudAgentConfig(self)]
|
||||
|
||||
#it covers RHEL6/Fedora13/Fedora14
|
||||
@ -144,6 +145,7 @@ class sysConfigRedhat6(sysConfigAgentRedhatBase):
|
||||
networkConfigRedhat(self),
|
||||
libvirtConfigRedhat(self),
|
||||
firewallConfigAgent(self),
|
||||
nfsConfig(self),
|
||||
cloudAgentConfig(self)]
|
||||
|
||||
#It covers RHEL5/CentOS5, the mainly difference is that there is no cgroup
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user