mkfs.xfs will not write to the device if it suspects that there is a
filesystem or partition table on the device already.
'-f' option should added to force overwriting when an existing
filesystem is detected on the device.
Change-Id: I6dabe592629d017de3a7e775c92f819968b9ab64
Closes-Bug: #1482210
0.90 will be used for centos only letting GRUB-legacy to boot.
Otherwise, default (1.2) will be used as GRUB2 is able to deal with it.
Change-Id: I89c5178d991970de4682c1e239e0ecb014ba61bd
Closes-Bug: #1430432
Some methods were declared with the default parameters specified as
CONF.<foo> values. Those values will be evaluated only once during
module build time. So, the values speficied in config file won't be
passed into those methods as config file values will be available
only after config file gets parsed in run-time.
Change-Id: Ic8e24be4fdc0ce165d8142d47405373acaf4a803
Closes-Bug: #1479307
There's no point to place /boot partition on NVMe disk
as grub2 without UEFI support is unable to recognize it and
read any data from it.
Unfortunately, fuel-agent doesn't work with grub2-efi.
It always installs BIOS version of grub2.
It's just a work around that will allow to land /boot partition
on non-NVMe disk.
The absence of non-NVMe disks on a node will cause a failure of
provisioning.
DocImpact
Change-Id: I166c94416ccb152ccd8d1dc780dfb21a774a4f1d
Co-Authored-By: Atze de Vries <atze.devries@naturalis.nl>
Related-Bug: #1474970
Ditch 'device' and '*args' from its signature and
substitute them with 'devices' list.
Change-Id: I99a90c26c9a9b36ed4bfabbc7f882e4031d52899
Closes-Bug: #1476621
Those warnings appear when fuel-agent performs udev rules
blacklisting.
Adding a syncing with udev via 'udevadm settle' to the lines which
actually manipulate with these rules, totally eliminates those scary
warnings.
Change-Id: I9e528f948f83d97e9cf084e3b2c3250eef518c5e
Closes-Bug: #1422717
Add nf_conntrack_proto_gre to the default loaded modules
for CentOS and Ubuntu. This enables VMs on OpenStack
that use GRE to provide GRE connectivity over floating
IPs.
Closes-bug: #1474210
Change-Id: I265a30d698396bcce64b139dfa8696a440cc2a3b
unittest2 backports some nice features from newer versions of unittest
for python 2.7 (like assertRaises context manager). Moreover tests now
are using either oslotest or testtools directly, switching to one test
framework is going to simplify tests.
Change-Id: Ibce9403b20958f9db2a59db9c6b7479a4fc57857
Implements blueprint: volume-manager-refactoring
In case when some partition has keep_data = True
need to elevate flag to file system level and
do not to create new partition table. Do not clean
file system when it has keep_data = True.
There should not be a problem if some raw data
will not be cleaned.
Change-Id: Ifccc9256b12944283219cffeedb8c8da8ab420f8
Implements: blueprint partition-preservation
This new "simple" data driver takes serialized partitioning info
that is provided before provisioning from external tool.
It does not make any calculations for that data and expect it to have
all required informations about partitioning.
Other changes:
* added unittest2 to use some of it features
* added requests_mock to mock http requests
* added objects conversion to/from dictionary to make serialization
easier
* added a common "interface" for data drivers
* fixed test for "do_build_image" - now a correct data driver is used
Change-Id: I673cde6f0ead9945919a87cd1cfce7ed09c6e593
Implements: blueprint volume-manager-refactoring
Using "umount -l" is a potentially dangerous act as
fuel-agent doesn't wait until any process stops using files
on that mounted fs.
Use of lazy umount should be disabled by default.
In case if regular umount failed,
it means abnormal situation where manual intervention is needed as
lazy umount couldn't sort out the issue by itself.
Change-Id: If258535c43402142a8dcad0c87bc519fcc6904d2
Closes-Bug: #1454366
lvcreate --yes switch has been added in the recent versions of lvm2
which are not available on Ubuntu 14.04.
blueprint fuel-bootstrap-on-ubuntu
Change-Id: Iedef0131176c42f51b8254f3561b084e6f294cad
Make it possible to set the image build directory via the command
line. Also create the image build directory if it doesn't exist.
The default image build directory (/tmp) can be too slow/small.
In particular if fuel_agent runs in a container (which is the case
on the Fuel master node) /tmp resides in the container filesystem
which is backed by dm-snapshot. dm-snapshot is known to have a poor
write performance, especially for large(er) files like OS images.
By default docker storage is a loopback file residing in
/var/lib/docker. Thus the data written to the OS image being built
goes through a number of layers:
ext4 -> loop -> dm-snapshot (/var/lib/docker-> loop ->
-> ext4 (/var/lib/docker) -> dm-linear (os-varlibdocker) ->
-> hard drive
which causes substantial IO overhead. If the master node runs on a VM
rather than a physcial hardware the above chain gets even more
complicated (and write performance gets really afwul):
ext4 -> loop -> dm-snapshot (/var/lib/docker-> loop ->
-> ext4 (/var/lib/docker) -> dm-linear (os-varlibdocker) ->
-> virtual hard drive (qemu) -> qcow2 -> ext4 (host)
Using a host volume (mounted at /var/lib/fuel/ibp) as an image build
directory eliminates the extra layers so the written data goes through
ext4 -> loop -> ext4 -> dm-linear (os-var) -> hard drive
so the IBP image build time gets reasonable.
Related-Bug: #1457643
Change-Id: Idcafd23e659fcc7c0d7e6087501799834234b34c
* Add errors=panic to rootfs in order to panic and
not to go to 'ro' when there are any errors on the disk
* Set parameter kernel.panic in sysctl to 60 (By default,
the kernel will not reboot after a panic, but this option
will cause a kernel reboot after 60 seconds.)
Doc-Impact
Change-Id: Ib24f13d3cbbf792e7ee81a9b4054e084f4ec1b5e
Closes-Bug: 1371689
* improve test coverage;
* add exception raising for methods which should return something;
Change-Id: I4aa7ee05e37c8a7935d8759875f76f98d30388fa
Closes-Bug: #1452158
CONF initialization is moved into method.
Autogeneration script does not work when
CONF is initialized in global scope.
Closes-Bug: #1472576
Change-Id: I7810d0befb0f8006592299424af1b773066785e3
The issue is that oslo log module tries to
import oslo.serialization which is depricated.
Correct way to import this is to use
oslo_serialization module name.
The correct way how to fix this would be
installing oslo_log module instead of using
log module from oslo-incubator. But this way
is going to take long time because there are
no corresponding rpm and deb packages available.
TODO: use oslo_log instead of log module from oslo-incubator
when rpm and deb packages are available
Change-Id: I866fa0e19c5b872a82af6739d3537c24916bccc1
Closes-Bug: #1472018
In order to speed-up image building process, fuel-agent will
turn off journalling. That should noticeably reduce the cost of
fsync calls. Expected speed-up is about 2x-3x.
Additionaly this change will help image building job to fit within
3600 secs timeout.
Change-Id: I24fcc8ba16c092b1bc936928890717c6e9501aa7
Related-Bug: #1441679