[mesheryctl] Check if the Port is ready for system start

Current Behaviour -

When the port 9081 is already listening i.e. Local server might be running or something else. When you run

mesheryctl system start
Starting Meshery...

Meshery deployed on Kubernetes.
Meshery is starting...
Opening Meshery (http://localhost:30650) in browser.

In the above case, meshery is not available, furthermore the k8’s resources associated with the meshery are created .

Suggestions/Enhancements -

Add a check on the PORT , before the k8’s resources are created for the system start command.

@hexxdump may have some thoughts on this.

Ok… this one seems interesting, one method is that, we can ping the port if it’s active or not, if it’s active then proceed on deploying other available ports or take other actions. If not, we can signal the green light to Meshery to start on port 9081. This is my assumed approach for now. WDYT @harkiratsm ?

With this approach we can -

  1. limit the meshery deploying itself i.e. meshery starting when it’s already started.
  2. Would not create k8’s resources if the port is not free .

Do think of every bad worst case so we can handle that as well. // @alphaX86 fyi . . . . .

1 Like