dhcpoptionsnetworklist parameter in "deployVirtualMachine" doesn't work with VR as provider
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 6 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 32
Mô tả
### problem
dhcpoptionsnetworklist parameter in "deployVirtualMachine" doesn't work with VR as provider
As a user/operator I want to boot my vm from a PXE server via dhcpoptionsnetworklist
### versions
ACS 4.20.x
### The steps to reproduce the bug
1. Launch a isolated or a shared network
2. Create a pxe server vm which acts like a TFTP server
For example, you can create a pxe template/iso from the following pxe
https://netboot.xyz/
https://github.com/ventoy/PXE/releases
https://canonical.com/maas
3. Register pxe iso
https://boot.ipxe.org/ipxe.iso
4. Launch vm via API with the ISO with dhcpoptionsnetworklist, by pointing the IP of the pxe server in the same network
```
deploy virtualmachine zoneid=193a5741-05c9-4fe3-84d3-29a869ba1528 serviceofferingid=551f20c3-83d5-4e4a-bc50-d1c10974da57 networkids=dd6fe1cb-3ffa-4c1f-8472-8b438b4a7f6c
dhcpoptionsnetworklist[0].networkid=dd6fe1cb-3ffa-4c1f-8472-8b438b4a7f6c dhcpoptionsnetworklist[0].dhcp:66=10.1.1.27 dhcpoptionsnetworklist[0].dhcp:67=pxelinux.0
```
5. Check the db and the details are stored
```
mysql> select * from nic_extra_dhcp_options;
+----+--------------------------------------+--------+------+------------+
| id | uuid | nic_id | code | value |
+----+--------------------------------------+--------+------+------------+
| 1 | 83af66c0-01f3-4033-a9ac-89c819cfe485 | 31 | 66 | 10.1.1.27 |
| 2 | 0c0ef9f5-3f28-45ed-8ed1-e2e3cb28cc49 | 31 | 67 | pxelinux.0 |
```
5. During the vm boot time the request still goes to the virtual router instead of the pxe server
HTTP://10.1.1.1/pxelinux.0 and fails to run
Workaround
Log in to the VR and add the following content
Comment the following lines in //etc/dnsmasq.conf
#enable-tftp
#tftp-root=/opt/tftpboot
#dhcp-boot=pxelinux.0
---
Add the following lines
dhcp-option=66,10.1.1.27
dhcp-option=67,pxelinux.0
dhcp-boot=pxelinux.0,,10.1.1.27
Restart the dnsmasq service
service dnsmasq restart
### What to do about it?
Currently dhcpoptionsnetworklist parameter may probably work with only NuageVsp plugin and not with VR
It would be great if we can support this for VR so that end user can boot from a pxe server
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cách API deployVirtualMachine xử lý dhcpoptionsnetworklist và cách các mục được chuyển đến nic_extra_dhcp_options đối với một mạng dựa trên VR. So sánh đường đi đó với hành vi của VR dnsmasq.conf và xác minh rằng các yêu cầu PXE sử dụng các tùy chọn DHCP được cung cấp và đến được server đã cấu hình thay vì router ảo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- infrastructure, networking
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100