Skip to content

EE license fixes.#5383

Merged
parasssh merged 3 commits intomasterfrom
paras/ee_license_fixes
May 7, 2020
Merged

EE license fixes.#5383
parasssh merged 3 commits intomasterfrom
paras/ee_license_fixes

Conversation

@parasssh
Copy link
Copy Markdown
Contributor

@parasssh parasssh commented May 6, 2020

Fixes DGRAPH-1341

The enterprise_license option on zero is not applied properly. There were couple issues: 1) It would be over-written by trial license. 2) It generally failed because when the license was applied, Raft was not initialized and the zero was not the leader.

This patch make several fixes and improvements

  1. Apply the option enterprise_license only after the node's Raft is initialized and it is the leader.
  2. Don't apply the trial license if a license already exists.
  3. Disallow the enterprise_license option for OSS build and bail out.
  4. Apply the option even if there is a license from a previous life of the Zero (i.e. Zero is restarted with same the zw/

Tests:

  1. New Cluster, dgraph zero
    Trial license is applied.
  2. New Cluster, dgraph zero --enterprise_license=<path to EE license file>
    EE License is applied.
  3. Existing Cluster, Previously Trial License applied., Now dgraph zero --enterprise_license=<path to EE license file>
    EE License is applied.
  4. Existing Cluster, Previously EE License. Now dgraph zero
    Old EE License is used. Trial license is not applied.
  5. OSS with enterprise_license option
    ERROR
  6. OSS without enterprise_license option on New, Existing Cluster
    No Licenses applied.

This change is Reviewable

@parasssh parasssh requested a review from manishrjain as a code owner May 6, 2020 23:53
@parasssh parasssh requested review from a team, danielmai and martinmr May 6, 2020 23:53
Copy link
Copy Markdown
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 5 of 5 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @danielmai and @manishrjain)

Copy link
Copy Markdown
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm: Just one comment.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @danielmai and @parasssh)


dgraph/cmd/zero/raft.go, line 746 at r1 (raw file):

			if !licenseApplied && n.AmLeader() {
				licenseApplied = true
				// Apply enterprise license if one was given.

You can mention that this can override the previous license that was present. That's an intended behavior because ...

Copy link
Copy Markdown
Contributor Author

@parasssh parasssh left a comment

Choose a reason for hiding this comment

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

Dismissed @manishrjain from a discussion.
Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on @danielmai and @martinmr)


dgraph/cmd/zero/raft.go, line 746 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

You can mention that this can override the previous license that was present. That's an intended behavior because ...

Done.

@parasssh parasssh merged commit 4e35cba into master May 7, 2020
@parasssh parasssh deleted the paras/ee_license_fixes branch May 7, 2020 02:44
parasssh pushed a commit that referenced this pull request May 7, 2020
Fixes DGRAPH-1341

This patch make several fixes and improvements
 -  Apply the option enterprise_license only after the node's Raft is initialized and it is the leader.
  - Don't apply the trial license if a license already exists.
  - Disallow the enterprise_license option for OSS build and bail out.
  - Apply the option even if there is a license from a previous life of the Zero (i.e. Zero is restarted with same the zw/
parasssh pushed a commit that referenced this pull request May 7, 2020
( git cherry-pick 4e35cba)
Fixes DGRAPH-1341

This patch make several fixes and improvements
 -  Apply the option enterprise_license only after the node's Raft is initialized and it is the leader.
  - Don't apply the trial license if a license already exists.
  - Disallow the enterprise_license option for OSS build and bail out.
  - Apply the option even if there is a license from a previous life of the Zero (i.e. Zero is restarted with same the zw/
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
Fixes DGRAPH-1341

This patch make several fixes and improvements
 -  Apply the option enterprise_license only after the node's Raft is initialized and it is the leader.
  - Don't apply the trial license if a license already exists.
  - Disallow the enterprise_license option for OSS build and bail out.
  - Apply the option even if there is a license from a previous life of the Zero (i.e. Zero is restarted with same the zw/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants