This patch scares me since every fix involves adding a character
to a regex. I am /pretty sure/ that this is a no-op but I don't
have the capacity to test this beyond what tox can do.
As the printed strings contain newlines, this causes a space to be written
as the first character of the following line causing them to be indented.
An example config that is broken. Here disabling modules indents all the
other lines of cloud.cfg except the first one causing the username name
setting to fail as it expects indenting to be certain number of spaces.
plugins:
cloud_init:
metadata_sources: Ec2
username: admin
disable_modules:
- locale
- mounts
This commit removes the spaces by specifying end=''.
mountpoints. Without this having /tmp on separate partition results
in error as the permissions of /tmp are 0755. Setting them to 01777
fixes the setup.
This allows to build an image with qcow2 as a disk backend.
The update implements a new class that inherits from QEMUVolume and just
needs the extention and file format.
Enables the use of Logical Volumes as disk backends.
It uses an existing volume group and has no support for creating a new one.
It will not override an existing logical volume and fail gracefully.
The lv is created, activated and then mounted as a loop device.
The boostraping process is then launched on the loop device.
Once the process is completed, the lv is unmounted and desactivated.
The created lv will be deleted should the boostraping process fail.
The lv must be activated before use.
A manifest has been included for testing purposes.
On Unix, with shell=True, the shell default to /bin/sh.
Using Popen(['type', command], shell=True) is equivalent to calling
Popen(['/bin/sh', '-c', 'type', command]).
In this case 'command' becomes a positional parameter to the shell,
and not an argument to the command 'type'.
The solution is to pass a single string as parameter.
The problem is that with shell=True, we are never safe from a shell injection,
so it is wiser to use a python only solution.
The package distutils is part of the standard distribution, so it doesn't add
extra dependencies.
The method find_executable has the same behaviour as 'which' on bash.