-
-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE REQUEST: nas.yml port conflict checking #322
Comments
Rather than trying to do this as a task in ansible, what about catching this in the build process? It becomes slightly difficult for apps that require working in |
We could use an port assigning scheme. That's what I've done. it would require some slight modifications for some of the current applications that rely on default ports, but I was able to use 32XXY for assigning ports to different applications. 32 (just an arbitrary port >20 to be out of most commonly used ranges) XX (double digits to be assigned to the application 01 = heimdall, 02 = portainer, 03 = transmission Y (takes care of applications that need more that 1 port, such as an http and https port. If it makes things safer/"futureproof" we could do (3XXYY) Example: Application PortsBy default, applications can be found on the ports listed below.
|
and by making the ports more variable it will also allow users to change their port scheme easier, say if they add custom docker containers Edit: also just realized that this also doesn't help check conflicts with applications not installed by ansible-nas. It only helps minimize risk of overlap. |
Hello I faced an issue with port 9000:
|
Is your feature request related to a problem? Please describe.
No so much a problem as an enhancement. As more and more apps get added to AN, there are going to be more and more default app port conflicts. Though port conflicts for most apps can be avoided when a contributor adds an app, sometimes new apps have required static ports (e.g. my Logitech Media Server and Unifi Controller additions) that, since they can't be changed, require a port configuration change by the end user (If they choose to use the apps that conflict of course). It's my guess that some user's wont read or follow the instructions or choose ports that cause a further conflict and AN should take steps to avoid aborting during an install and just skip the conflict.
Describe the solution you'd like
Some REGEX wizardry that will check *_port and make sure it doesn't match a set of ports assigned to a another app. This would be implemented in nas.yml as a when not condition.
High level faux example entry in nas.yml:
Describe alternatives you've considered
Contributors configuring AN from skipping installing an app that has port conflicts with previously AN installed base apps. This is not hard to do (see below) but doesn't take into account non-default settings conflicts that users might self-inflict.
Additional context
No, it's not high priority. Yes, it would add some nice checks. No, I'm not good enough at REGEX or parsing arrays to take this on. Hell, I'm learning Ansible on the fly thanks to Ansible-NAS. :)
The text was updated successfully, but these errors were encountered: