def _check_rsync(self):
rsync_config_path = "/etc/rsyncd.conf"
rsync_ironic_section_name = 'ironic_rsync'
if not utils._pid_of('rsync'):
raise exception.RsyncProcessNotFound()
if os.path.exists(rsync_config_path):
cfg = utils.read_config(rsync_config_path)
else:
raise exception.RsyncConfigNotFound(path=rsync_config_path)
if rsync_ironic_section_name in cfg.sections():
self.rsync_dir = cfg.get(rsync_ironic_section_name, 'path')
else:
raise exception.RsyncIronicSectionNotFound(
section=rsync_ironic_section_name
)
评论列表
文章目录