Some of the openvz directories were not getting cleaned up after
and instance was deleted. Now those directories are deleted if they
still exist.
We also noticed an issue where, under load, the driver would run
multiple get_next_id calls before creating the next container. This
made it possible for two containers to share the same CTID which
causes the spawn to fail. This solution uses a directory on the
file system to indicate that a CTID is chosen but not spawned and
also a semaphore in the form of the oslo lockutils.
Change-Id: Ibac11d5dc8b9eaaf9d14dacacc85e600ee342c9a
The host device (/dev/*) should be removed after the device is removed
from within the container, else a kernel I/O error will occur.
Change-Id: I43ae839d6a9c8643a43b0c063f39715c53552c77
The next vz id to use to create a new container should also consider
the vz id directories that exist in addition to containers that are
running. There can be container that was deleted but for some reason
did not clean up all its directories within /var/lib/vz/{private,root}
which will cause the next container that reuses that id to fail.
Change-Id: I5813c30f594d99a6a21054cd5b3caa24d85039fe
The new ovz tools changed the default layout for ovz create. This
allows us to specifiy which one we want to use.
Change-Id: I880058d19510e080e19d07f3f6e5e1ab2632832e
The ISCSI driver returns a device name that maps to
/dev/disk/by-path/ip-%s-iscsi-%s-lun-%s. This points shows up as a
symlink that points to the actual device in /dev that matches the
pattern of /dev/sd*.
Occasionally, this symlink does not resolve on the first pass which
causes the /dev/disk/by-path/ip-%s-iscsi-%s-lun-%s path to be returned
instead of the actual /dev/ path. This causes the _list_host_devices
from the base volume driver to return no volumes.
This patch forces the ISCSI volume driver to retry the symlink resolution
until it gets the /dev/ path it needs.
Change-Id: Ia6f255b4243de6dff689cdb446fd168075f96cdb
* This allows for defining exact vz configs for specific flavor, instead
of the driver calculating them. We can define future flavor-specific
vz configs through nova flavor extra_specs (metadata) instead of adding
configs in the driver.
Current vz configs that can be defined through flavor extra specs:
- 'vz_config_file': vz config file to initially apply
- 'vz_cpulimit': vz cpulimit
- 'vz_bandwidth': tc bandwidth limit
* Vswap has been added as the new default way of setting memory settings
* Refactoring has been done to use new Container class. Also new
resource_manager class has been created to centralize most vz calculations
and config logic (vz networking has been left alone).
* Got rid of reset_instance_size since its not used by nova-compute manager.
* Changed vz config that is initially applied to be a fresh new container
config and flavor extra_specs driven.
Change-Id: I125682bbe89cedec08f328394ebb402a5c079b6d
Use instance system_metadata table to store the instance's container
id so it can be retrieved by nova api extensions.
Change-Id: I61ee802942df0c9252d7e28c096a7b1ac41b8fba
OpenVZ requires an empty folder in /lib/vz/root/<ctid> in order to
start a container. This folder is no longer being created by the
migration logic. This check creates it if it doesn't exist.
Change-Id: I21a5141d3b0b412922c1f112b7f505380c856efe
The driver no longer relies on the deprecated nova 'id' column
in order to configure openvz. Some additional changes were made
to associate containers with the nova host that spawned them
to allow this driver to run multiple on nova-compute instances on
a single host.
A side benefit is now we have an object representing an openvz
container that can be extended to provide better OO facilities
than were previously available.
Change-Id: Ie86f4133f9a2e0afdaff805870855b12abd87a18
In this case we've found that different versions of OpenVZ may
include output for this vzlist command (e.g., just a -) if there
aren't any instances. We just want to ignore these if the json
isn't there as expected (since _set_description is what should
construct them in the first place).
Change-Id: I472bbb63afe1313e74b742297320bf0adebacc32
Nova made backwards-incompatible changes in how it
calls these methods in the driver. Altered the
method signatures to match the new expectation.
Change-Id: I02182dae9159bcac671899df846e50b301f16003
On a node with no iscsi established sessions running (e.g. a new
node) 'iscsiadm -m session' may return error code 21 signifying
that there aren't any sessions, etc. to execute on. In this case
it's perfectly valid and the login should still proceed.
Change-Id: I1cee2a1aa55e44b9a66b8a1809d75c4cbd703777
Specifically, updates network_info since legacy is no longer supported, as
well as other minor updates.
Change-Id: Idf1d848594826b051d6444475faed6f9812c8ba7
Since this is apparently not getting into Nova it needs to be renamed
so the package name won't conflict.
Change-Id: Ib449e99c2a7756e46e4626a84ddb246265476bd3