Skip to content

Improve error handling when Supervisor not started #6301

@dmccown

Description

@dmccown

Description

When attempting to load a svc hab svc load while the Supervisor is starting you get an error that you can't contact the Supervisor. We should indicate that the Supervisor is in a "starting" state and you should retry after the Supervisor has loaded.

Alternatively, we could wait until the Supervisor has started and then load your package if we detect the Supervisor is "starting".

Example of current error

	###
            ### Unable to contact the Supervisor.
            ###
            ### If the Supervisor you are contacting is local, this probably means it is not running. You can run a Supervisor in the foreground with:
            ###
	### hab sup run
	### Or try restarting the Supervisor through your operating system's init process or Windows service.
	###
	### Original error is:
	###
	### Connection refused (os error 111)
	###

Acceptance Criteria

  1. While a Supervisor is starting we give a warning that you should wait and try again.
  2. While a Supervisor is starting we wait until it has started and then load the package.

Demo

  1. Start a Supervisor
  2. Load a package hab svc load
  3. Either see the warning or wait on the Supervisor to finish starting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions