Open wido opened 5 years ago
More information:
I tested this with this cloud-init configuration under Ubuntu 18.04
root@ubuntu-test:~# cat /etc/cloud/cloud.cfg.d/99_cloudstack.cfg system_info: default_user: name: root package_mirrors: - arches: [i386, amd64] failsafe: primary: http://ubuntu.apt-get.eu/ubuntu security: http://security.ubuntu.apt-get.eu/ubuntu disable_root: false cloud_config_modules: - emit_upstart - snap_config - ssh-import-id - locale - [ set-passwords, always ] - grub-dpkg - apt-pipelining - apt-configure - ntp - timezone - disable-ec2-metadata - runcmd - byobu datasource: None: {} datasource_list: - ConfigDrive root@ubuntu-test:~#
Files on the CD-Rom:
root@ubuntu-test:~# find /mnt/cdrom/ /mnt/cdrom/ /mnt/cdrom/openstack /mnt/cdrom/openstack/latest /mnt/cdrom/openstack/latest/meta_data.json /mnt/cdrom/openstack/latest/network_data.json root@ubuntu-test:~#
I generated this ISO manually on a non-CloudStack environment to test it, but we could store all the network information we have from a VM inside the ConfigDrive.
@wido yes ideally that's the use of config drive feature. I would see this as a bug, if currently it's not possible to share/send the network (ip and dns) currently. If you do decide to implement the fix, please open PR for 4.11 branch.
@rhtyd Yes, it would be great! It would allow for much larger scaling without the need of DHCP. That removes the VR in many use-cases.
I haven't got ConfigDrive to work yet (offerings which wouldn't work...), but from the code I saw it only generates a empty network_data.json file.
Happy to work on this and write against 4.11
no milestones and no related PRs is this resolved or being worked on?
Hi, I'd be interested as well.
This is still interesting. But @GabrielBrascher and me have been working on other things and haven't been able to give this more attention.
With this (as mentioned) there would be no need for a Virtual Router in many cases.
but no milestone to put to it still, @wido ?
Not yet @DaanHoogland. I'd like to keep this open for future reference. Might be that somebody else wants to pick this up before we have time.
@wido is there any idea how you plan to implement this without a virtual router. this will be interesting for us because of the future use of TF we will lost the VR.
@svenvogel Not sure if this is what you are asking, but the DHCP server would not longer be needed as the IP addressing details will be supplied to the VM via the configdrive ISO, cloud-init/scripts will read them and do the rest of the config.
@svenvogel and @NuxRo Indeed. With ConfigDrive and network information there is no more need for a DHCP server (thus Virtual Router) in a network.
From the local drive cloud-init can fetch all the required network information and configure the network interface accordingly.
Was this tested in cloudstack 4.15.x? Should work or it was not implement yet?
@ccycv, it is not implemented and no plans to implement it are out there (hence the milestone 'unplanned';).
this issue is not implemented yet in 4.18.0
Especially relevant to Edge Zones.
ConfigDrive / cloud-init supports a network_data.json file which can contain network information for a VM.
By providing the network information using ConfigDrive to a VM we can eliminate the need for DHCP and thus the Virtual Router in some use-cases.
An example JSON file:
In Basic Networking and Advanced Networking zones which are using a shared network you wouldn't require a VR anymore.