The stunnel EFS port can be configurable#288
Conversation
|
Hi @rkurucz9 thanks for raising the PR. Could you elaborate on your use case for this request as we evaluate merging this? |
|
Hi @dankova22, Thank you for your question. I would like to mount the EFS on my local host via Bastion host with SSM AWS-StartPortForwardingSessionToRemoteHost. Unfortunately, the port 2049 is reserved on my host, however I can set local port number to e.g. 12049 in SSM AWS-StartPortForwardingSessionToRemoteHost parameters to avoid the port collision issue. If you need more information, please let me know. |
| "%s. You should be able to find a new config file in the same folder as current config file %s. " | ||
| "Consider update the new config file to latest config file. Use the default value [%s = %s]." | ||
| % (warning_message, CONFIG_FILE, config_item, default_value) | ||
| ) |
There was a problem hiding this comment.
This warning is written to sys.stdout, but mount.efs's stdout can be parsed by callers (systemd units, automount helpers, scripts wrapping mount). Diagnostics like this should go to stderr
| return default_value | ||
| return config.getboolean(config_section, config_item) | ||
|
|
||
| def get_int_config_item_value( |
There was a problem hiding this comment.
This method seems like a duplicate of get_boolean_config_item_value, we can have a generic method like
def _get_config_item_value(config, section, item, default, getter, emit_warning=True):
# shared section/option check + warning emission
...
return getter(section, item)
def get_boolean_config_item_value(...): return _get_config_item_value(..., config.getboolean, ...)
def get_int_config_item_value(...): return _get_config_item_value(..., config.getint, ...)
Issue #, if available: N/A
Description of changes: The EFS port number is configurable by efs-utils.conf with the stunnel_efs_port property.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.