Skip to content
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

Issue #2687 Modify tray started check to verify if daemon is running #2722

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

anjannath
Copy link
Member

the daemon might take a few seconds to come up and make the api endpoint available
it is better to check that the daemon is up by trying to access this endpoint to
make sure user is successfully able to do crc start after crc setup

@anjannath anjannath changed the title Issue #2687 Modify tray started check to verify if daemon is running [wip] Issue #2687 Modify tray started check to verify if daemon is running Sep 13, 2021
@@ -99,3 +103,12 @@ func fixPlistFileExists(agentConfig launchd.AgentConfig) error {
}
return nil
}

func checkIfDaemonRunning() error {
return crcerrors.Retry(context.Background(), time.Second*20, func() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

20 seconds seem very long?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it needs to be changed, in the on macOS tray we only wait 1 second before making /status calls, so 1 second interval and the limit we can set to 3? worst case 3 seconds wait time

return &crcerrors.RetriableError{Err: fmt.Errorf("Daemon is not yet running: %w", err)}
}
return nil
}, time.Second*1)
Copy link
Contributor

Choose a reason for hiding this comment

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

the *1 is not needed :)

@openshift-ci
Copy link

openshift-ci bot commented Sep 14, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anjannath, cfergeau

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…unning

the daemon might take a few seconds to come up and make the api endpoint available
it is better to check that the daemon is up by trying to access this endpoint   to
make sure user is successfully able to do `crc start` after `crc setup`
@openshift-ci
Copy link

openshift-ci bot commented Sep 14, 2021

New changes are detected. LGTM label has been removed.

@anjannath anjannath changed the title [wip] Issue #2687 Modify tray started check to verify if daemon is running Issue #2687 Modify tray started check to verify if daemon is running Sep 14, 2021
@praveenkumar
Copy link
Member

Why this is marked as wip ?

@anjannath
Copy link
Member Author

Why this is marked as wip ?

Its removed now, the bot took sometime to remove the label :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants