Skip to content

The stunnel EFS port can be configurable#288

Open
rkurucz9 wants to merge 1 commit into
aws:masterfrom
rkurucz9:stunnel_efs_port_is_not_hardcoded
Open

The stunnel EFS port can be configurable#288
rkurucz9 wants to merge 1 commit into
aws:masterfrom
rkurucz9:stunnel_efs_port_is_not_hardcoded

Conversation

@rkurucz9

Copy link
Copy Markdown

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.

@dankova22

Copy link
Copy Markdown

Hi @rkurucz9 thanks for raising the PR.

Could you elaborate on your use case for this request as we evaluate merging this?

@rkurucz9

Copy link
Copy Markdown
Author

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.
Best regards

Comment thread src/mount_efs/__init__.py
"%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)
)

@vmishra22 vmishra22 Jun 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/mount_efs/__init__.py
return default_value
return config.getboolean(config_section, config_item)

def get_int_config_item_value(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants