-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add NIC configuration information to Machine #136
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To implement automatic conversion of data stored in etcd, "schema version" is introduced. The first schema version is "2" considering old data are made with schema version "1".
ymmt2005
changed the title
Add schema versioning.
Add NIC configuration information to Machine
Feb 12, 2019
and add "MaskBits" field to provide netmask bits to Ignition templates.
ymmt2005
force-pushed
the
add-nic-info
branch
from
February 12, 2019 10:48
0c8f369
to
4085f88
Compare
"gateway-offset" field in dhcp.json was used to calculate the default gateway address in a subnet. Because the subnet is also calculated from ipam.json, placing "gateway-offset" in DHCP configurations is considered a design flaw. This PR adds "node-gateway-offset" field to ipam.json and uses it to calculate the default gateway addresses.
ymmt2005
force-pushed
the
add-nic-info
branch
from
February 12, 2019 10:52
4085f88
to
741a676
Compare
ymmt2005
force-pushed
the
add-nic-info
branch
2 times, most recently
from
February 12, 2019 18:40
727e0df
to
fb38aa4
Compare
dctest 上で動作確認。 Before: $ sabactl machines get --serial "fb8f2417d0b4db30050719c31ce02a2e8141bbd8" | jq '.[0].info'
{
"bmc": {
"ipv4": {
"address": "10.72.17.3",
"netmask": "255.255.240.0",
"gateway": "10.72.16.1"
}
}
}
$ sabactl ipam get
{
"max-nodes-in-rack": 28,
"node-ipv4-pool": "10.69.0.0/20",
"node-ipv4-range-size": 6,
"node-ipv4-range-mask": 26,
"node-ip-per-node": 3,
"node-index-offset": 3,
"bmc-ipv4-pool": "10.72.16.0/20",
"bmc-ipv4-offset": "0.0.1.0",
"bmc-ipv4-range-size": 5,
"bmc-ipv4-range-mask": 20,
"bmc-ipv4-gateway-offset": 1
} バージョンアップ: $ sudo ./sabakan --config-file=/etc/sabakan/config.yml
2019-02-13T02:23:58.760406Z boot-0 sabakan info: "upgrading schema version" from="1" to="2"
2019-02-13T02:23:58.867119Z boot-0 sabakan info: "updated schema version" to="2"
2019-02-13T02:23:58.894676Z boot-0 sabakan info: "resume stateful watching" rev=510 After: $ ./sabactl machines get --serial "fb8f2417d0b4db30050719c31ce02a2e8141bbd8" | jq '.[0].info'
{
"network": {
"ipv4": [
{
"address": "10.69.0.3",
"netmask": "255.255.255.192",
"maskbits": 26,
"gateway": "10.69.0.1"
},
{
"address": "10.69.0.67",
"netmask": "255.255.255.192",
"maskbits": 26,
"gateway": "10.69.0.65"
},
{
"address": "10.69.0.131",
"netmask": "255.255.255.192",
"maskbits": 26,
"gateway": "10.69.0.129"
}
]
},
"bmc": {
"ipv4": {
"address": "10.72.17.3",
"netmask": "255.255.240.0",
"maskbits": 20,
"gateway": "10.72.16.1"
}
}
}
$ ./sabactl ipam get
{
"max-nodes-in-rack": 28,
"node-ipv4-pool": "10.69.0.0/20",
"node-ipv4-range-size": 6,
"node-ipv4-range-mask": 26,
"node-ip-per-node": 3,
"node-index-offset": 3,
"node-gateway-offset": 1,
"bmc-ipv4-pool": "10.72.16.0/20",
"bmc-ipv4-offset": "0.0.1.0",
"bmc-ipv4-range-size": 5,
"bmc-ipv4-range-mask": 20,
"bmc-ipv4-gateway-offset": 1
} |
ymmt2005
force-pushed
the
add-nic-info
branch
from
February 13, 2019 02:03
fb38aa4
to
91b1f99
Compare
ymmt2005
force-pushed
the
add-nic-info
branch
from
February 13, 2019 02:05
91b1f99
to
7820b6d
Compare
dulltz
suggested changes
Feb 13, 2019
Co-Authored-By: ymmt2005 <ymmt2005@gmail.com>
Co-Authored-By: ymmt2005 <ymmt2005@gmail.com>
dulltz
approved these changes
Feb 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds NIC configuration information to
Machine.Info
.The information can be referenced from Ignition templates to configure network.
gateway-offset
indhcp.json
is moved toipam.json
.This impacts existing users (if any).
The data format stored in etcd is slightly changed.
To convert old data automatically, the PR also introduces "schema version".
The first schema version is "2" considering old data are made
with schema version "1".