client_files: Dict[str, Dict[str, Tuple[int, int, int, bytes, str]]],
host: str) -> None:
updated_files = False
+ if host in self.mgr.offline_hosts:
+ return
old_files = self.mgr.cache.get_host_client_files(host).copy()
for path, m in client_files.get(host, {}).items():
mode, uid, gid, content, digest = m
self.tuned_profiles = TunedProfileStore(self)
self.tuned_profiles.profiles = profiles
self.ssh = SSHManager(self)
+ self.offline_hosts = []
def set_store(self, what: str, value: str):
raise SaveError(f'{what}: {value}')
self._write_tuned_profiles(host, profiles)
def _remove_stray_tuned_profiles(self, host: str, profiles: List[Dict[str, str]]) -> None:
+ if host in self.mgr.offline_hosts:
+ return
cmd = ['ls', SYSCTL_DIR]
found_files = self.mgr.ssh.check_execute_command(host, cmd).split('\n')
found_files = [s.strip() for s in found_files]
self.mgr.ssh.check_execute_command(host, ['sysctl', '--system'])
def _write_tuned_profiles(self, host: str, profiles: List[Dict[str, str]]) -> None:
+ if host in self.mgr.offline_hosts:
+ return
updated = False
for p in profiles:
for profile_name, content in p.items():