You are not logged in.
Pages: 1
Hi All,
I tried to set up cloud-init on a fresh arch linux installation (4.7.6-1), following the description: https://wiki.archlinux.org/index.php/Cloud-init.
The end of the text was not clear for me (Systemd integration, what to do exactly here?), and when I tried to start and enable services
(e.g. systemctl start cloud-init-local.service, then systemctl enable cloud-init-local.service), I got errors: some python-related errors (missing site-packages),
systemd errors (dependences), and some missing commands (debconf-set-selections, dpkg, ...).
Some of them could be resolved by:
pacman -S python2-pip
pacman -S lsb-release
easy_install-2.7 cloud-init
add dependency to /usr/lib/systemd/system/cloud-config.target: After=... multi-user.target
add dependency to /usr/lib/systemd/system/cloud-init.target: After=multi-user.target
But yet during startup (in OpenNebula) I got errors (journalctl):
- Command: ['debconf-set-selections'] not found
- Command: ['dpkg', '--print-architecture'] not found
- in file "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 1268, in load_file
pipe_in_out(ifh, ofh, chunk_cb=read_cb)
File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 1311, in pipe_in_out
data = in_fh.read(chunk_size)
IOError: [Errno 22] Invalid argument
I am not sure if I have to install dpkg AUR package or not, what to do with missing debconf-set-selections, or util.py error.
Some contextualization indeed worked (for example, the SSH key was injected correctly), I don't know yet about the rest (processing cloud-init file).
What should I do to properly install cloud-init? Anyone could do a flawless install?
Regards,
Akos
Offline
I think you have probably made matters worse by installing another copy of cloud-init via easy_install. Undo this, then tell us what errors you're running into. You did configure cloud-init to use the arch module, as described in the wiki, right?
Mod note: not an installation issue, moving to NC.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I forgot to set "distro" to "arch" in cloud.cfg.
I will report if I fail with the correct distro.
Sorry...
Offline
Maybe I do something very wrong but I still get error when trying to start cloud-init-local.service.
This is a fresh install of Arch Linux 4.7.6-1, then I installed the cloud-init package (pacman -S cloud-init),
edited /etc/cloud/cloud.cfg (setting default user to root), and didn't add any unverified_modules:.
(This is not a VM startup, but I simply tried to enable cloud-init-local service on the image before deploy...)
[root@arch ~]# systemctl start cloud-init-local.service
Job for cloud-init-local.service failed because the control process exited with error code.
See "systemctl status cloud-init-local.service" and "journalctl -xe" for details.
[root@arch ~]# cloud-init init --local
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 6, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
Akos
Offline
You're missing python{,2}-setuptools
Offline
You're missing python{,2}-setuptools
that should be reported to the packager I guess
Offline
After separately installing python2-setuptools (pacman -S python2-setuptools), things have changed slightly.
(This dependency is listed in web https://www.archlinux.org/packages/comm … loud-init/ but not among in package dependencies (pacman -Si cloud-init).)
[root@arch ~]# pacman -S python2-setuptools
resolving dependencies...
...
[root@arch ~]# cloud-init init --local
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2991, in <module>
@_call_aside
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2977, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3004, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 662, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 970, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 856, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests' distribution was not found and is required by cloud-init
Offline
That one has been reported: https://bugs.archlinux.org/task/46909
Last edited by WorMzy (2016-10-18 09:22:29)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Ok, then:
[root@arch ~]# pacman -S python2-requests
=>
pkg_resources.DistributionNotFound: The 'argparse' distribution was not found and is required by cloud-init
Which package contains 'argparse'? (argh is not ok.)
Offline
With the following I got ahead a bit:
[root@arch ~]# pacman -S python2-pip
[root@arch ~]# pip2 install argparse
[root@arch ~]# pip2 install oauthlib
[root@arch ~]# pip2 install jinja2
Now it seems there is some problem with the network settings. It is still a good sign.
Offline
I don't know what to do with this:
[root@arch ~]# cloud-init init --local
Cloud-init v. 0.7.8 running 'init-local' at Tue, 18 Oct 2016 11:40:03 +0000. Up 79493.89 seconds.
2016-10-18 13:40:04,654 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceOpenNebula.DataSourceOpenNebula'> failed
2016-10-18 13:40:04,767 - __init__.py[WARNING]: apply_network_config is not currently implemented for distribution '<class 'cloudinit.distros.arch.Distro'>'. Attempting to use apply_network
2016-10-18 13:40:04,774 - util.py[WARNING]: failed stage init-local
failed run of stage init-local
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 521, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 265, in main_init
init.apply_network_config(bring_up=not args.local)
File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 650, in apply_network_config
return self.distro.apply_network_config(netcfg, bring_up=bring_up)
File "/usr/lib/python2.7/site-packages/cloudinit/distros/__init__.py", line 166, in apply_network_config
netconfig, bring_up=bring_up)
File "/usr/lib/python2.7/site-packages/cloudinit/distros/__init__.py", line 155, in _apply_network_from_network_config
return self.apply_network(contents, bring_up=bring_up)
File "/usr/lib/python2.7/site-packages/cloudinit/distros/__init__.py", line 137, in apply_network
dev_names = self._write_network(settings)
File "/usr/lib/python2.7/site-packages/cloudinit/distros/arch.py", line 79, in _write_network
'DNS': str(tuple(info.get('dns-nameservers'))).replace(',', '')
TypeError: 'NoneType' object is not iterable
Offline
Changing line 79 in /usr/lib/python2.7/site-packages/cloudinit/distros/arch.py to:
'DNS': str(tuple(info.get('dns-nameservers'))).replace(',', '') if info.get('dns-nameservers') != None else None
allows to start and enable cloud init local (systemctl start cloud-init-local.service), however systemctl start cloud-init.service results in:
Failed to start cloud-init.service: Unit networking.service not found.
Offline
giving up
Offline
Pages: 1