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

[licensing] Treat any case where we do not have a valid license as if no license is installed #8412

Closed
corneliusludmann opened this issue Feb 23, 2022 · 4 comments
Assignees
Labels
team: delivery Issue belongs to the self-hosted team type: improvement Improves an existing feature or existing code

Comments

@corneliusludmann
Copy link
Contributor

corneliusludmann commented Feb 23, 2022

Currently, an invalid license prevents any users to sign up. An installation with an invalid license should not be in a worse position than an installation with no license at all.

We have this behavior already to some extent so that we don't return an invalid license but a default license for some cases, e.g. here:

if lic.ValidUntil.Before(time.Now()) {
return defaultReplicatedLicense()
}

However, there are some cases where we don't have a valid license, e.g. when the license server from Replicated is not reachable etc.

I would propose to change the implementation like this:

  • Don't return the default license in newReplicatedEvaluator() but return the invalid license with the proper reason/explanation why the license is invalid.
  • In the function HasEnoughSeats, don't respond with false when the license is invalid but call HasEnoughSeats from the default license in that case (same for other methods like Enabled(...)).

That has the following advantages:

@corneliusludmann corneliusludmann added team: delivery Issue belongs to the self-hosted team type: improvement Improves an existing feature or existing code labels Feb 23, 2022
@gtsiolis
Copy link
Contributor

See also #3918 for historical context and in case we can close one of these two issues as duplicate. Cc @corneliusludmann @AlexTugarev

@corneliusludmann
Copy link
Contributor Author

Thanks, @gtsiolis. I think the other issue is more about handling error messages. I added this to our project board since this is something that I had on my radar as well.

@mrsimonemms
Copy link
Contributor

See #8593 (comment)

@gtsiolis
Copy link
Contributor

Closing as the licensor component has been removed in #16983. Cc @aledbf @AlexTugarev @geropl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: delivery Issue belongs to the self-hosted team type: improvement Improves an existing feature or existing code
Projects
No open projects
Development

No branches or pull requests

4 participants