Skip to content

Commit

Permalink
Update log (vesoft-inc#2431)
Browse files Browse the repository at this point in the history
Co-authored-by: Yichen Wang <[email protected]>
  • Loading branch information
nebula-bots and Aiee authored Feb 10, 2023
1 parent 8956e17 commit 1a201d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/common/encryption/License.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,11 @@ Status License::checkExpiration(const folly::dynamic& content) {
if (content["gracePeriod"].asInt() != 0) {
gracePeriod = content["gracePeriod"].asInt() * kSecsInDay;
warningAhead = 30 * kSecsInDay;
VLOG(2) << "[License] gracePeriod: " << gracePeriod << " days";
} else { // Trial license
VLOG(2) << "[License] This is a trial license and no grace period is given";
gracePeriod = 0;
warningAhead = 7 * kSecsInDay;
}
VLOG(2) << "[License] gracePeriod: " << gracePeriod << " days";

// Give the user a grace period before disable the launch of meta service
// The length of the grace period is specified in the license
Expand Down Expand Up @@ -801,7 +800,7 @@ std::string License::genClusterCode(const std::vector<std::string>& machineCodes
Status License::checkHardware() {
// If the gracePeriod is 0, the license is a trial license, skip the hardware check.
if (content_["gracePeriod"].asInt() == 0) {
LOG(INFO) << "[License] Trial license detected, hardware checking is skipped.";
LOG(INFO) << "[License] GracePeriod is 0.";
return Status::OK();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/tck/license/License.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature: License
# check trial license
Then the "metad" service should contain the log:
"""
[License] Trial license detected, hardware checking is skipped.
[License] GracePeriod is 0.
"""
# check license monitor
Then the "metad" service should contain the log:
Expand Down

0 comments on commit 1a201d7

Please sign in to comment.