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
Update Harvester node driver to support multi nics and disks #1051
Conversation
dc79809
to
69ea805
Compare
0d821c6
to
a79af48
Compare
ba9f145
to
5959241
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @futuretea
- This PR [FEATURE] terraform-provider-rancher2 to support to add additional NIC and disks harvester/harvester#2733 specifies to add a second NIC and disk config to
rancher2_machine_config_v2
but it looks here like you are deprecating the other network/disk fields and replacing them withnetwork_info
anddisk_info.
Could you explain this decision? - Has this been tested? If so, please attach the dev test plan or what has already been done to verify this works with the new harvester node driver in rancher.
I'd also like another pair of eyes with Harvester experience on this |
@annablender Hi, I updated the instructions and cancelled the review of @slickwarren by mistake. Could you please help me make a request again? Thanks! |
@futuretea Sorry, could you answer my above questions #1051 (review)? Thanks so much |
@a-blender Hi
old field only allow user to add on disk/nic
Yes, I already test it by following the test plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM and test case work. Just a minor question, do we want to check whether disk_info
and network_info
is a valid JSON format and whether their keys are correct?
@FrankYang0529 Having implemented the check logic on the node driver side. |
@lanfon72 Can you help to file another issue to track this? CC @WuJun2016, userData and networkData passed through terraform-provider-rancher2 may be plaintext, not base64. The UI needs an enhancement to support this case. Thanks. |
I have no idea where should I file the issue 😹 (rancher/rancher or harvester/harvester or rancher/dashboard?) |
harvester/harvester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one nit
Signed-off-by: futuretea <Hang.Yu@suse.com>
Signed-off-by: futuretea <Hang.Yu@suse.com>
Signed-off-by: futuretea <Hang.Yu@suse.com>
@a-blender @slickwarren Please help review the PR again, we're going to release Harvester v1.1.2 and need this change. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thank you, this can be merged.
Signed-off-by: futuretea Hang.Yu@suse.com
need harvester node driver v0.6.1
rancher v2.6.11-rc4 and rancher v2.7.2-rc2 already include the new Harvester node driver
API changes
Harvester node driver add two new fields
disk_info
andnetwork_info
to support multi nics and disks inharvester/docker-machine-driver-harvester@37b5b37#diff-1a5e9ad2c9efb72d85e174ec77c9a20a65c98f9f702d72ef615b1b552d1af7c0
In terraform-provider-rancher2, we need to remind the user that the old field is deprecated because we want the user to use the new field (The new field is an extensible field that supports single or multiple disks and networks).
disk_size
- (Deprecated) Usedisk_info
insteaddisk_bus
- (Deprecated) Usedisk_info
insteadimage_name
- (Deprecated) Usedisk_info
insteaddisk_info
- (Required) A JSON string specifying info for the disks e.g.{\"disks\":[{\"imageName\":\"harvester-public/image-57hzg\",\"bootOrder\":1,\"size\":40},{\"storageClassName\":\"node-driver-test\",\"bootOrder\":2,\"size\":1}]}
(string)network_name
- (Deprecated) Usenetwork_info
insteadnetwork_model
- (Deprecated) Usenetwork_info
insteadnetwork_info
- (Required) A JSON string specifying info for the networks e.g.{\"interfaces\":[{\"networkName\":\"harvester-public/vlan1\",\"macAddress\":\"\"},{\"networkName\":\"harvester-public/vlan2\",\"macAddress\":\"5a:e7:c5:24:5b:44\"}]}
(string)Related issues
harvester/harvester#2733
#985
#984
Depend PRs
rancher/rancher#40172
rancher/rancher#40171
Test Plan
Virtualization Management
use cluster namefoo-harvester
CGO_ENABLED=0 go build -mod=vendor .
0.0.0-master
:When I apply for the first time, such an error will occur, but it is OK to apply again. Is there anything wrong in my configuration file? Or is it a known problem?
rm -r ~/.terraform.d/plugins/