If a sub section of a deploy schema is one of multiple options
python-jsonschema, which used to verify the schema, is unable to
determine which option is intended so cannot produce a useful
error message. As "type" is required by all partitions and volumes
this is be used to determine the correct sub schema, which can then
be validated recursively using python-jsonschema. The validation
error message then gives specific details on each incorrect
parameter.
Change-Id: Icb22b88b40f0fa45a3fe3932d69ba32e4a360edd
Use an ansible playbook to configure a centos host so that the
Bareon functional tests can be run.
Change-Id: I846be89759d73ac72bdaa41246315716d44d858f
During upstreaming functional test, some test object names was
updated(or not updated). As result several functional tests eds with
error.
Change-Id: I45699a1b4ea809b620cc96bb3ef274e619840612
Add support to new bareon-ironic communication "protocol" - extension
for vendor passthru API. This protocol allow to receive generic
tasks(steps) from bareon-ironic driver, process them on bareon "side"
and send back results.
Right now only one step is implemented - step to inject SSH key.
Change-Id: I9ea828b24085fa72df470eef41ad32d9096f6b40
Bareon is capable to fetch ssh-key from ironic conductor, after start.
So we can avoid preinstalled ssh-key in bareon image. But ssh-key is
extremelly helpfull for debugging. This change switch ssk-key from
mandatory to optional.
It also add "hook" for injecting root passwords inside bareon-image. It
can/should be used for debugging too. (In case if you will have access
to node's console).
Change-Id: Icb27d40c9872703d9b01a8c7705ad7b185277e6b
Make a single point responsible for config option registration to
increase control over config initialization and avoid conflicts.
Usually such conflicts become visible when sharing code with externa
callers. In our case it was the deployment config validator (part of
data drivers), exported as part of the ironic data driver via the
setuptools entry point.
Change-Id: Ibba18db61c222d910d8dca8866ea74b14ce011c8
Rename GDisk int SGDisk, to have a "direct" match with wrapped tool. All
"satalite" objects acquire "s" preffix too.
Change-Id: I59847bb84a288073358560c58885f925d8589f04
The old way to detect SCSI address of block devices rely on incorrect
assumption. It rely that folder
/sys/class/scsi_device/{scsi_address}/device/block exist for any SCSI
device. And because this assumption is incorrect, if fails with
unhandled exception, on such hardware.
Rewrite core responsible for detection SCSI address of block devices.
Change-Id: I3c9938e145fc8c6d3036fdb769fd20f8b8f63678
Some comments are outdated - don't represent code actions. Some comments
should be replaced with docstrings. Some should be reworded.
This change is going to fix all this "comment" issues.
Change-Id: Ie518a2f25dbc9c27b0a7db35a7533bde8dec278f
These are a set of functional tests developed to test known issues and
patches for those issues. It's better to keep these tests public, in
case someone else faces functional degradation of bareon code.
Change-Id: I17899f115df7f81786681ddb97db18cf2a01689a
Now it is not an issue. But it can become issue in any time. "hidden"
modification of global objects is a time bomb.
Change-Id: I4e9d9984cb5d0af3b03b6436ddb7c7849703acbb
Ironic driver support "check and live as is" partitioning operation. It
is used to in "redeploy" node after hardware failure. Ususally some
files are changes since time when node was deployed. And usually we need
to keep this files "as is" too.
The problem appers in "do_install_os" deployment step. It revert all
files to state stored into deploing image.
This update disable "do_install_os" when "check and live as is"
partitioning operation is requested.
Change-Id: I978059ec28444389e5a1b18ae0a20af0e1a71a45
Deprecated storage scheme didn't take into account "remaining" size
claims. As and percentage sizes too. This change make it capable to
handle suze size "units".
But it calculate size based on disk size received from caller. Same as
it was done in old storage scheme.
Change-Id: I4d6a59065a1546163615ac4b65411898b942afe2
"Provisions" family of bunctional tests depend of "hardcoded"
SSH-key. This fix removes this dependency.
Change-Id: I2c7a1ef8ebd57a3b402bb1534a6f01221a8cd32b
Now all partition related tools expect "size" in bytest(not in MiB) or
instances of SizeUnit object. Nailgun was last data driver that
represented "size" of block devices in MiBs.
Change-Id: I03170969407d33a8921fc0b4b32739d1865c10e0
By some reason, pvcreate method allocates two 64MiB metadata chunks by
default. We can/should make test how many vg/lv can be allocated using
default two 2MiB metadata chunks(this LVM defaults not our). But I
believe that it will be enough for any reasonable amount ov vg/lv.
We still can pass required metadata size, if we need to.
Update functional tests expected constants to match metadata size
update.
Change-Id: I0106fa35b7b21f16ce6a9a8794e6c88ba61ceeca
Update data and deploy drivers to enable usage of new objects model and
new partitioning tools.
Remove a lot of old partition code, become unused/never reached code.
Change-Id: I9f01304632be28626abaf8fb322dd4fda0017589
Convert several properties into class level attribute in data-drivers
class hierarchy.
It decreases amount of code and makes workflow more obvious.
Change-Id: Iba6ec79ab4266acbcc90133356953c8aee7180fc
Builds old data model using data stored in new data model. It is
required to keep at least part of existing API of data-driver.
We can't use existing code to build old data model, because it conatins
at least 2 serious mistake(located during code analisys while creating
parser for new object model). It is also tangled and and wry.
Change-Id: Ic2418a1c2a6334aafb2048fd057d35ca7945c31e
Extract some portion of "Disk" objects into abstract class. Later it will
be used as base class for other kinds of storages(at least for LVM).
Change-Id: I3fa9cb230f80a6d7bb3285700d12e6f88a9018c7
We need to "transfer" non numeric sizes from deployment config to
deployment driver. Now we have only one such "size" - this is
"ramaining" constant.
Also this object knows(will know), how to pass this claim to the storage
object.
Change-Id: I1956a0fcf60bfa5c0c3eda7ecb7c3dda176880ca
This object keeps info about existing(on object creation time) block
devices and provice API to lookup these block devices. Lookup support
of all schemas used in deployment config to define block devices.
Change-Id: I15b3345733f09b04c6656c3cabe75fbfab85acb5