Skip to content

MODULES-3711 - Add limit to mysql server ID generated value #872

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

Merged
merged 1 commit into from
Aug 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/facter/mysql_server_id.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def get_mysql_id
Facter.value(:macaddress).split(':').inject(0) { |total,value| (total << 6) + value.hex }
Facter.value(:macaddress).split(':')[2..-1].inject(0) { |total,value| (total << 6) + value.hex }
end

Facter.add("mysql_server_id") do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/mysql_server_id_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Facter.fact(:macaddress).stubs(:value).returns('3c:97:0e:69:fb:e1')
end
it do
Facter.fact(:mysql_server_id).value.to_s.should == '66961985441'
Facter.fact(:mysql_server_id).value.to_s.should == '4116385'
end
end

Expand Down