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
cloud-init 0.7.8 support broken on FreeBSD #2732
Comments
Launchpad user Bert JW Regeer(bregeer-ctl) wrote on 2016-09-20T20:55:11.832833+00:00 I have removed ConfigDrive and restarted, however even using the OpenStack provider it will fail with networking, AND then fail when setting the SSH key for the freebsd user (default user in cloud.cfg) /usr/local/bin/cloud-init startingWARN: no logging configured! (tried 0 configs)
|
Launchpad user Andres Montalban(amontalban) wrote on 2016-11-29T19:00:42.977904+00:00 Hi Bert, I just stumbled with this, I think that the net module needs to be rewritten for better compatibility. It would be great if we can use other modules like netifaces to list interfaces, macs, ips. That with a couple of ifconfig commands can solve the issue and do not rely on /sys that's only available in Linux. I will try to dedicate some hours on this and see if I can get it fixed. Thanks! |
Launchpad user Andres Montalban(amontalban) wrote on 2016-11-30T22:14:43.040440+00:00 Hi Bert, I have been working on this and have a prototype for the fix and would love to have feedback from other FreeBSD user. Additionally I'm attaching a patch for cloud-init port as I see you are the maintainer so we can maybe add the needed patches to make FreeBSD work ok. Please also apply patches in #1645947 and #1645824. Thanks! |
Launchpad user Andres Montalban(amontalban) wrote on 2016-11-30T22:18:02.850830+00:00 FreeBSD port patch |
Launchpad user Hongjiang Zhang(redriver) wrote on 2016-12-12T05:18:01.791852+00:00 Hi Andres, |
Launchpad user Hongjiang Zhang(redriver) wrote on 2016-12-12T05:40:48.030705+00:00 Hi Andres, I have seen your port-patch. Do you mean I have to apply it to /usr/ports/net/cloud-init/Makefile? I thought the installation of cloud-init is to "git clone https://git.launchpad.net/cloud-init", "python setup.py install", and then "python /usr/local/bin/cloud-init init" after modifying the /usr/local/etc/cloud/cloud.cfg". Is it the correct way? |
Launchpad user Scott Moser(smoser) wrote on 2018-03-19T13:40:52.915738+00:00 Hi, |
Launchpad user Launchpad Janitor(janitor) wrote on 2018-05-19T04:17:48.971093+00:00 [Expired for cloud-init because there has been no activity for 60 days.] |
This bug was originally filed in Launchpad as LP: #1625802
Launchpad details
Launchpad user Bert JW Regeer(bregeer-ctl) wrote on 2016-09-20T20:29:59.940670+00:00
/usr/local/bin/cloud-init startingWARN: no logging configured! (tried 0 configs)
Setting up basic logging...
Cloud-init v. 0.7.8 running 'init-local' at Tue, 20 Sep 2016 20:04:22 +0000. Up 5.53116703033 seconds.
2016-09-20 20:04:22,602 - util.py[DEBUG]: Cloud-init v. 0.7.8 running 'init-local' at Tue, 20 Sep 2016 20:04:22 +0000. Up 5.53116703033 seconds.
2016-09-20 20:04:22,607 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [420] 0 bytes
2016-09-20 20:04:22,615 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 0:0
2016-09-20 20:04:22,618 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance/boot-finished
2016-09-20 20:04:22,619 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/no-net
2016-09-20 20:04:22,621 - handlers.py[DEBUG]: start: init-local/check-cache: attempting to read from cache [check]
2016-09-20 20:04:22,623 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2016-09-20 20:04:22,624 - stages.py[DEBUG]: no cache found
2016-09-20 20:04:22,626 - handlers.py[DEBUG]: finish: init-local/check-cache: SUCCESS: no cache found
2016-09-20 20:04:22,627 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2016-09-20 20:04:22,636 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.freebsd.Distro'>
2016-09-20 20:04:22,638 - init.py[DEBUG]: Looking for for data source in: ['ConfigDrive', 'OpenStack', 'Ec2'], via packages ['', u'cloudinit.sources'] that matches dependencies ['FILESYSTEM']
2016-09-20 20:04:22,655 - init.py[DEBUG]: Searching for local data source in: [u'DataSourceConfigDrive']
2016-09-20 20:04:22,657 - handlers.py[DEBUG]: start: init-local/search-ConfigDrive: searching for local data from DataSourceConfigDrive
2016-09-20 20:04:22,659 - init.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceConfigDrive.DataSourceConfigDrive'>
2016-09-20 20:04:22,663 - util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/sr0'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,676 - util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/sr1'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,684 - util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/cd0'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,698 - util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/cd1'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,706 - util.py[DEBUG]: Running command ['blkid', '-tTYPE=vfat', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,713 - util.py[DEBUG]: Running command ['blkid', '-tTYPE=iso9660', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,719 - util.py[DEBUG]: Running command ['blkid', '-tLABEL=config-2', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
2016-09-20 20:04:22,730 - util.py[DEBUG]: Running command mount with allowed return codes [0] (shell=False, capture=True)
2016-09-20 20:04:22,736 - util.py[DEBUG]: Fetched {u'/dev/vtbd0p2': {'mountpoint': u'/', 'opts': u'journaled soft-updates', 'fstype': u'ufs'}} mounts from mount
2016-09-20 20:04:22,738 - util.py[DEBUG]: Running command ['mount', '-o', 'ro', '-t', 'cd9660', u'/dev/cd0', '/tmp/tmpgzEsG5'] with allowed return codes [0] (shell=False, capture=True)
2016-09-20 20:04:22,787 - openstack.py[DEBUG]: Selected version '2015-10-15' from ['2012-08-10', '2013-04-04', '2013-10-17', '2015-10-15', 'latest']
2016-09-20 20:04:22,789 - util.py[DEBUG]: Reading from /tmp/tmpgzEsG5/openstack/2015-10-15/vendor_data.json (quiet=False)
2016-09-20 20:04:22,794 - util.py[DEBUG]: Read 2 bytes from /tmp/tmpgzEsG5/openstack/2015-10-15/vendor_data.json
2016-09-20 20:04:22,796 - util.py[DEBUG]: Reading from /tmp/tmpgzEsG5/openstack/2015-10-15/user_data (quiet=False)
2016-09-20 20:04:22,798 - openstack.py[DEBUG]: Failed reading optional path /tmp/tmpgzEsG5/openstack/2015-10-15/user_data due to: [Errno 2] No such file or directory: '/tmp/tmpgzEsG5/openstack/2015-10-15/user_data'
2016-09-20 20:04:22,801 - util.py[DEBUG]: Reading from /tmp/tmpgzEsG5/openstack/2015-10-15/network_data.json (quiet=False)
2016-09-20 20:04:22,804 - util.py[DEBUG]: Read 1118 bytes from /tmp/tmpgzEsG5/openstack/2015-10-15/network_data.json
2016-09-20 20:04:22,806 - util.py[DEBUG]: Reading from /tmp/tmpgzEsG5/openstack/2015-10-15/meta_data.json (quiet=False)
2016-09-20 20:04:22,809 - util.py[DEBUG]: Read 1821 bytes from /tmp/tmpgzEsG5/openstack/2015-10-15/meta_data.json
2016-09-20 20:04:22,814 - util.py[DEBUG]: Reading from /tmp/tmpgzEsG5/ec2/latest/meta-data.json (quiet=False)
2016-09-20 20:04:22,817 - util.py[DEBUG]: Read 963 bytes from /tmp/tmpgzEsG5/ec2/latest/meta-data.json
2016-09-20 20:04:22,819 - util.py[DEBUG]: Running command ['umount', '/tmp/tmpgzEsG5'] with allowed return codes [0] (shell=False, capture=True)
2016-09-20 20:04:22,830 - util.py[DEBUG]: Recursively deleting /tmp/tmpgzEsG5
2016-09-20 20:04:22,834 - util.py[DEBUG]: Reading from /var/lib/cloud/data/instance-id (quiet=False)
2016-09-20 20:04:22,836 - handlers.py[DEBUG]: finish: init-local/search-ConfigDrive: SUCCESS: found local data from DataSourceConfigDrive
2016-09-20 20:04:22,838 - stages.py[INFO]: Loaded datasource DataSourceConfigDrive - DataSourceConfigDrive [net,ver=2][source=/dev/cd0]
2016-09-20 20:04:22,840 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2016-09-20 20:04:22,842 - util.py[DEBUG]: Reading from /usr/local/etc/cloud/cloud.cfg (quiet=False)
2016-09-20 20:04:22,857 - util.py[DEBUG]: Read 2037 bytes from /usr/local/etc/cloud/cloud.cfg
2016-09-20 20:04:22,858 - util.py[DEBUG]: Attempting to load yaml from string of length 2037 with allowed root types (<type 'dict'>,)
2016-09-20 20:04:22,878 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2016-09-20 20:04:22,879 - util.py[DEBUG]: Creating symbolic link from '/var/lib/cloud/instance' => '/var/lib/cloud/instances/aba344ee-5536-4f23-a035-721f4060807b'
2016-09-20 20:04:22,884 - util.py[DEBUG]: Reading from /var/lib/cloud/instances/aba344ee-5536-4f23-a035-721f4060807b/datasource (quiet=False)
2016-09-20 20:04:22,886 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/aba344ee-5536-4f23-a035-721f4060807b/datasource - wb: [420] 74 bytes
2016-09-20 20:04:22,888 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-datasource - wb: [420] 74 bytes
2016-09-20 20:04:22,890 - util.py[DEBUG]: Reading from /var/lib/cloud/data/instance-id (quiet=False)
2016-09-20 20:04:22,891 - stages.py[DEBUG]: previous iid found to be NO_PREVIOUS_INSTANCE_ID
2016-09-20 20:04:22,892 - util.py[DEBUG]: Writing to /var/lib/cloud/data/instance-id - wb: [420] 37 bytes
2016-09-20 20:04:22,894 - util.py[DEBUG]: Writing to /run/cloud-init/.instance-id - wb: [420] 37 bytes
2016-09-20 20:04:22,895 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-instance-id - wb: [420] 24 bytes
2016-09-20 20:04:22,898 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [256] 8583 bytes
2016-09-20 20:04:22,899 - main.py[DEBUG]: [local] init will now be targeting instance id: aba344ee-5536-4f23-a035-721f4060807b. new=True
2016-09-20 20:04:22,901 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2016-09-20 20:04:22,902 - util.py[DEBUG]: Reading from /usr/local/etc/cloud/cloud.cfg (quiet=False)
2016-09-20 20:04:22,903 - util.py[DEBUG]: Read 2037 bytes from /usr/local/etc/cloud/cloud.cfg
2016-09-20 20:04:22,904 - util.py[DEBUG]: Attempting to load yaml from string of length 2037 with allowed root types (<type 'dict'>,)
2016-09-20 20:04:22,920 - DataSourceConfigDrive.py[DEBUG]: network config provided via network_json
2016-09-20 20:04:22,923 - util.py[WARNING]: failed stage init-local
2016-09-20 20:04:22,923 - util.py[DEBUG]: failed stage init-local
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 521, in status_wrapper
ret = functor(name, args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 280, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 631, in apply_network_config
netcfg, src = self._find_networking_config()
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 628, in _find_networking_config
return (net.generate_fallback_config(), "fallback")
File "/usr/local/lib/python2.7/site-packages/cloudinit/net/init.py", line 133, in generate_fallback_config
potential_interfaces = set(get_devicelist())
File "/usr/local/lib/python2.7/site-packages/cloudinit/net/init.py", line 99, in get_devicelist
return os.listdir(SYS_CLASS_NET)
OSError: [Errno 2] No such file or directory: '/sys/class/net/'
failed run of stage init-local
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 521, in status_wrapper
ret = functor(name, args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 280, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 631, in apply_network_config
netcfg, src = self._find_networking_config()
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 628, in _find_networking_config
return (net.generate_fallback_config(), "fallback")
File "/usr/local/lib/python2.7/site-packages/cloudinit/net/init.py", line 133, in generate_fallback_config
potential_interfaces = set(get_devicelist())
File "/usr/local/lib/python2.7/site-packages/cloudinit/net/init.py", line 99, in get_devicelist
return os.listdir(SYS_CLASS_NET)
OSError: [Errno 2] No such file or directory: '/sys/class/net/'
2016-09-20 20:04:22,955 - util.py[DEBUG]: cloud-init mode 'init' took 0.453 seconds (0.45)
2016-09-20 20:04:22,956 - handlers.py[DEBUG]: finish: init-local: SUCCESS: searching for local datasources
I've been trying to update the port of cloud-init on FreeBSD to 0.7.8 but unfortunately it doesn't look like ConfigDrive support is functional when ConfigDrive provides networking information.
The text was updated successfully, but these errors were encountered: