return envs
@staticmethod
- def get_prestart():
- return (
- '# keepalived needs IP forwarding and non-local bind\n'
- 'sysctl net.ipv4.ip_forward=1\n'
- 'sysctl net.ipv4.ip_nonlocal_bind=1\n'
- )
+ def get_sysctl_settings() -> List[str]:
+ return [
+ '# IP forwarding and non-local bind',
+ 'net.ipv4.ip_forward = 1',
+ 'net.ipv4.ip_nonlocal_bind = 1',
+ ]
def extract_uid_gid_keepalived(self):
# better directory for this?
ceph_iscsi = CephIscsi.init(ctx, fsid, daemon_id)
tcmu_container = ceph_iscsi.get_tcmu_runner_container()
_write_container_cmd_to_bash(ctx, f, tcmu_container, 'iscsi tcmu-runnter container', background=True)
- elif daemon_type == Keepalived.daemon_type:
- f.write(Keepalived.get_prestart())
_write_container_cmd_to_bash(ctx, f, c, '%s.%s' % (daemon_type, str(daemon_id)))
if daemon_type == 'osd':
lines = OSD.get_sysctl_settings()
+ elif daemon_type == 'keepalived':
+ lines = Keepalived.get_sysctl_settings()
# apply the sysctl settings
if lines: