Skip to content

[CHEF-29745] local license check, default off #4152

Open
marcparadise wants to merge 3 commits intomainfrom
CHEF-29745
Open

[CHEF-29745] local license check, default off #4152
marcparadise wants to merge 3 commits intomainfrom
CHEF-29745

Conversation

@marcparadise
Copy link
Member

This changes adds a license check using a local license file.

This behavior is controlled by a build-time compilation macro, OC_LICENSE_PATH
By default, this will have a value of 'cli', which will preserve the
existing license check behavior of using the automate cli when present.
Existing builds (including downstream) will therefore not be impacted.

If the macro is set to a file path (this can be done by setting the
environment variable OC_LICENSE_PATH to the target location, prior to
build) then at run-time, erchef will expect to find a license file in
this location.

If the specified the license file is missing or invalid, it is treated as
a 90 day trial license from time of upgrade to the version that
implements this change.

When the file is present, the expiration is pulled from the file, based
on the entitlement end time furthest in the future. This was chosen
because the license content does not directly contain expiration date.

Signed-off-by: Marc A. Paradise <marc.paradise@progress.com>
@marcparadise marcparadise requested review from a team as code owners February 24, 2026 02:55
@netlify
Copy link

netlify bot commented Feb 24, 2026

👷 Deploy Preview for chef-server processing.

Name Link
🔨 Latest commit 4632cf6
🔍 Latest deploy log https://app.netlify.com/projects/chef-server/deploys/699d1396576dbc0008270e58

Signed-off-by: Marc A. Paradise <marc.paradise@progress.com>
This is controlled by a build-time compilation macro, OC_LICENSE_PATH
By default, this will have a value of 'cli', which will preserve the
existing license check behavior of using the automate cli when present.

If the macro is set to a file path (this can be done by setting the
environment variable OC_LICENSE_PATH to the target location, prior to
build) then at run-time, erchef will expect to find a license file in
this location.

If the specified the license file is missing or invalid, it is treated as
a 90 day trial license from time of upgrade to the version that
implements this change.

When the file is present, the expiration is pulled from the file, based
on the entitlement end time furthest in the future. This was chosen
because the license content does not directly contain expiration date.
@sonarqubecloud
Copy link

Copy link
Member Author

Choose a reason for hiding this comment

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

Something weird happened with the unit tests in one of my internal rebases, so I have excluded them. I willl get them pushed up tomorrow.

%%% =====================
%%% Internal functions
%%% =====================
check_license(State) ->
Copy link
Member Author

Choose a reason for hiding this comment

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

This is just formatting changes.. but check_license is otherwise unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant