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

Fix mac check bug #830

Merged
merged 4 commits into from
Feb 5, 2020
Merged

Fix mac check bug #830

merged 4 commits into from
Feb 5, 2020

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Jan 14, 2020

Change-Id: If7df1f3906b334bdf82523a07f4a1fa040f729d3

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #830 into master will increase coverage by 0.72%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #830      +/-   ##
============================================
+ Coverage     71.16%   71.88%   +0.72%     
- Complexity     4358     4389      +31     
============================================
  Files           283      286       +3     
  Lines         20967    21085     +118     
  Branches       2959     2967       +8     
============================================
+ Hits          14921    15157     +236     
+ Misses         4566     4437     -129     
- Partials       1480     1491      +11
Impacted Files Coverage Δ Complexity Δ
.../baidu/hugegraph/license/LicenseVerifyManager.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../baidu/hugegraph/backend/store/MetaDispatcher.java 75% <0%> (-12.5%) 3% <0%> (ø)
...va/com/baidu/hugegraph/api/metrics/MetricsAPI.java 65.78% <0%> (-7.9%) 0% <0%> (ø)
...u/hugegraph/backend/store/hbase/HbaseSessions.java 65.68% <0%> (-0.49%) 21% <0%> (ø)
...a/com/baidu/hugegraph/backend/query/Condition.java 78% <0%> (-0.42%) 31% <0%> (ø)
...aidu/hugegraph/backend/store/hbase/HbaseStore.java 73.36% <0%> (-0.21%) 33% <0%> (+1%)
...ugegraph/backend/store/rocksdb/RocksDBMetrics.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
...egraph/backend/store/cassandra/CassandraStore.java 65.82% <0%> (ø) 48% <0%> (ø) ⬇️
...raph/backend/store/cassandra/CassandraMetrics.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
...du/hugegraph/backend/store/hbase/HbaseMetrics.java 0% <0%> (ø) 0% <0%> (?)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8041b93...4a7f0fa. Read the comment docs.

Change-Id: If7df1f3906b334bdf82523a07f4a1fa040f729d3
String expectFormatMac = expectMac.replaceAll(":", "-");
List<String> actualMacs = this.machineInfo.getMacAddress();
for (String actualMac : actualMacs) {
String actualFormatMac = actualMac.replaceAll(":", "-");
Copy link
Contributor

Choose a reason for hiding this comment

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

why not keep ":"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There may be two kinds of join symbols in the mac address, ':' and '-', they are both valid. To avoid check failures due to symbol mismatches, so unified the symbol to '-'

Change-Id: I4a7fff3a8378f0bf10949005f94e40debce64b19
javeme
javeme previously approved these changes Feb 4, 2020
}
if (!matched) {
throw newLicenseException(
"The server's mac '%s' doesn't match the authorized '%s'",
Copy link
Contributor

Choose a reason for hiding this comment

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

change to "The server's macs '%s' don't"

align with newLicenseException

Change-Id: Ib2413bc1f215a964c890bb98909575f0d756f400
zhoney
zhoney previously approved these changes Feb 4, 2020
Change-Id: I9bdbba070f763d9a6a69c1152401097dd61e844e
@zhoney zhoney merged commit 5952dc3 into master Feb 5, 2020
@zhoney zhoney deleted the fix-mac-check branch February 5, 2020 16:43
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.

None yet

3 participants