Zhou Zheng Sheng has posted comments on this change.
Change subject: Skip monitoring the usage of tmpfs filesystems in diskStats ......................................................................
Patch Set 3: Looks good to me, but someone else must approve
(1 inline comment)
Current solution is good.
.................................................... File vdsm/sampling.py Line 160: for p in self.MONITORED_PATHS: Line 161: rc, out, _ = utils.execCmd(['stat', '--file-system', '--format=%T', Line 162: p]) Line 163: if rc == 0 and out[0] == 'tmpfs': Line 164: continue So can we put this piece near the definition of MONITORED_PATHS ?
MONITORED_PATHS = [ p for p in ['/tmp', '/var/log', '/var/log/core', P_VDSM_RUN] if utils.execCmd( ['stat', '--file-system', '--format=%T', p]) != (0, ['tmpfs'], [])]
or
MONITORED_PATHS = filter( lambda p: utils.execCmd( ['stat', '--file-system', '--format=%T', p]) != (0, ['tmpfs'], []), ['/tmp', '/var/log', '/var/log/core', P_VDSM_RUN]) Line 165: Line 166: free = 0 Line 167: try: Line 168: stat = os.statvfs(p)