Skip to content

Warn port 80 in use when and not by mchef proxy when mchef configured for proxy mode. #109

@gthomas2

Description

@gthomas2

a) check docker ps table to see if "mchef-proxy" is running on 80 (mchef-proxy is the name of the container, not the image name)

dba15ce67832 nginx:alpine "/docker-entrypoint.…" 4 months ago Up 4 days 0.0.0.0:80->80/tcp, [::]:80->80/tcp mchef-proxy

RETURN EARLY IF MCHEF-PROXY IS RUNNING ON 80

b) Check to see if port 80 is being used by something else. Note - we will probably need different code for osx, linux and windows to do this check. If something is running on port 80, warn that mchef proxy mode will not work.

This check should be applied in the following places

  1. When configuring mchef to run in proxy mode (mchef config -p / mchef config --proxy)
  2. When upping an instance via mchef up command
  3. When creating a new instance via a recipe <- also note that when in proxy mode it should warn that the recipe port (if present) will be ignored.

Proxy service methods that should be used for this:

ProxyService->isProxyModeEnabled <- if not enabled then no warning
ProxyService->sProxyContainerRunning <- if running, no warning

To start proxy service
ProxyService->ensureProxyRunning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions