Merge baremetal/utils and nova utils
Merge baremetal/test_utils and nova/test_utils
Remove many unused methods from both files
Update test_pxe for merged utils.py
- minor cleanup of db/sqlalchemy/api
- fix some things in conf_fixtures
- fix tests in deploy_helper
- remote unused retry_on_deadlock method
- remove network and service from test.py
Baremetal driver get_available_nodes was incorrectly returning only a
list of unprovisioned nodes, leading update_availabile_resources to
sometimes delete a baremetal node that had an instance provisioned
to it -- sometimes even while the provisioning was still in process.
Fix bug 1174952
Change-Id: I4f08a2f6539a5b6cd12245ac6b4dc308767ae0cd
Import the oslo looping call implementation (which is a copy of
nova's), delete nova's local copy, convert all users to the new
location.
It should be noted that the oslo implementation of
FixedIntervalLoopingCall measures time from the start of the
periodic task, not the end, so periodic tasks will run with a
constant frequency instead of the frequency changing depending on
how long the periodic task takes to run.
Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4
After the change I6653829364b0a641442d45e766493180d6f2a880,
bm_nodes.prov_mac_address is no longer set. However VPD still
uses it. This patch changes VPD to use bm_interfaces.address
instead of bm_nodes.prov_mac_address.
Fixes bug 1168574.
Change-Id: I2bab869b282958ee9fd0e4776928e56351018324
To prevent sfdisk stopping with "bad input", use a empty string
instead of "-" (and doing so requires using "," as a separator).
Fixes bug 1166112
Change-Id: I5e4cffaa326fbafd1583d55744f921a40b3ae76f
Now prov_mac_address is going to be dropped from bm_nodes table. This patch
adjust api to the change.
A user is expected to create a node without specifying prov_mac_address, then add
an interface having the address to the node. However, for compatibility, a user
still can specify prov_mac_address when create a node. In this case, an interface
having prov_mac_address is automatically added to the node.
In response body of create, index and show, "prov_mac_address" field no longer
exists since they are showed as a member of "interfaces" fileld.
DocImpact
Change-Id: I6653829364b0a641442d45e766493180d6f2a880
A number of places tried to use undefined names. This included one
powervm test which turned out to not check anything at all (used
fake implementation of tested method) and needed to be moved.
Make sure that this class of errors causes run_pep8 failure in the
future.
Change-Id: I82ccb63bbc6f6d2b20ecb7f06b2fc22f8f034a33
Remove a lot of getLogger lines and imports of logging in modules
which never use that functionality.
Change-Id: Icdaee2c540980412b000d02ebf1ec568dcf5b38a
Since LOG = getLogger() has been moved from the global scope
to the function scope (main), the rest of the module could
not find LOG. This patch makes LOG global again.
Fixes bug 1165262
Change-Id: I2607802dcbed64135f75011a02ebce95519e4ea1
Logging needs to be setup properly before we try to log
something. Fix a test case that loads the code but does
not execute the code that results in the LOG being setup
properly.
Fixes LP# 1161031
Change-Id: I9d5bc6b87cfb25243f00e17b532d4485dc4454e4
Originally, baremetal pxe/tilera driver managed two types of network
interfaces in two tables; provisioning interfaces in bm_nodes table
and non-provisioning (normal) interfaces in bm_interfaces table.
But, now actually both types are handled in the same way and there is
no difference between them except for which table they are in.
This patch moves the provisioning interfaces to bm_interfaces. However
it does not drop prov_mac_address in bm_nodes since VirtualPowerManager
still uses it to identify a target in a list of VMs returned by the
VM's host.
Change-Id: I5ce940e7127aa3b29ba7802612938dc5dbc3152f
As part of the move of plugins to entrypoints, take advantage of the
entrypoints based console scripts, which will make our command line scripts
available for unittesting.
Part of blueprint entrypoints-plugins
Co-authored-by: Michael Still <mikal@stillhq.com>
Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
Drop these two columns:
* bm_nodes.prov_vlan_id
* bm_nodes.registration_status
And update related code, tests and api_samples.
Change-Id: Iadefc83a00ad9ae5a3bb39f357080299875bdf09
The function is not used anymore. It creates an instance of
BareMetalDeployment, which was removed in c20110d1.
Change-Id: I40b634f8cf0d4369f09cb61aca6f95a059e85d6d
blueprint add-tilera-to-baremetal.
The baremetal driver is a hypervisor driver for Openstack Nova
Compute. Within the Openstack framework, it has the same role
as the drivers for other hypervisors (libvirt, xen, etc). With
this patch set of tilera-backend, provisioning and management
of non-PXE tilera physical hardware is accomplished using
common cloud APIs and tools.
Change-Id: I356c06a07ace463779e3b84836d5000331e24814
Co-authored-by: Mikyung Kang <mkkang@isi.edu>
Co-authored-by: David Kang <dkang@isi.edu>
Co-authored-by: Ken Igarashi <igarashik@nttdocomo.co.jp>
Co-authored-by: Arata Notsu <notsu@virtualtech.jp>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
The type of CONF option virtual_power_ssh_port was incorrectly defaulted
to Str. This can cause Paramiko to raise when casting to %d.
Fixes bug 1157824.
Change-Id: I30ddd1ff0da45f8392085249f1bd2a539b201a7e
This patch corrects a issue with VPD when configured for virsh the
list running vms function attempts to execute $2 instead of the actual
command.
Fixes Bug 1154280
Change-Id: I6d06cc58fb0f2935c4341761908b914106bda916
Authored-by: Chris Krelle <nobodycam@gmail.com>
If a volume becomes inoperable (e.g. the ISCSI connection is severed)
and the user goes to reboot, the instance may enter a permanently halted
state.
The root cause is that a VBD that points to 'bad' volume prevents VM
operations ('reboot', 'start') from completing under XenServer.
The work around is to detect which volumes are bad, detach in the
virt-layer, retry the operation (or in the case of reboot, just 'start'
the halted instance), and then notify the compute manager via a
callback so it can detach the volume in Cinder.
Fixes bug 1148614
Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f
In Models by default type of deleted column is Integer, but bm tabels
use Boolean type for deleted columns.This produce bug in postgresql
(type mismatch).
At this moment we are not able to do any db migrations, so there is
only one way to fix this bug. Change type of deleted columns in Models
from Integer to Boolean.
In Havana we will be able to change deleted columns types to type of id
for bm tables and use soft_delete and UC as in rest of nova.
Fixes bug 1140294
Change-Id: Id56c4bbff7048ed5c746dc995380be9ba0a12c39
This path corrects a issue where is_power_on function can incorrectly match a
node if its name is a substring of another node.
I have also added a test for this.
fixes bug 1152676
Change-Id: Ic3b0b952d53dcd4464098f98879a84684efe22b2
Authored-by: Chris Krelle <nobodycam@gmail.com>
Baremetal PXE driver should read deploy_kernel_id & deploy_ramdisk_id
from the 'baremetal:' namespace within instance_type['extra_specs']
so that it doesn't conflict with ComputeCapabilitiesFilter any more.
Fixes bug 1129485.
Change-Id: I84b3acb2ed83dc2b1ff8f1a21ca1d95f7d25751a
While most hypervisors return a single - and constant - value from
driver.get_available_nodes, baremetal does not. When a node is deleted
from the baremetal database, it is no longer returned from
driver.get_available_nodes. However, Nova's compute_node record is not
directly updated.
This patch allows Compute Manager to detect missing nodes within
update_available_resources. It then invokes resource_tracker to update
the dead node and remove it from compute.
This in turn allows the ServiceGroup API to properly update the
servicegroup when a baremetal node is no longer in service.
Fixes bug 1138184
Change-Id: Icfff3f8e3099668806633a6a58a152b32ec8b49b
This patch adds the ablity to set ssh port, and use key based
authentication for VPD.
This patch adds config options:
virtual_power_ssh_port: port to ssh to on virtual power host
virtual_power_host_key: private key file for ssh auth
Note: Key file must be able to be read by user nova is running as.
This patch switches the default virtual_power_type from 'vbox'
to 'virsh' to match the most common usage.
Fix Bug 1136010
Change-Id: Id89878d63d26602bb3eacc2a2ce7902d9bd33d61
Authored-by: Chris Krelle <nobodycam@gmail.com>
...and remove the use of instance['extra_specs'] from the libvirt and
baremetal virt drivers. Also remove the hack in instance_update()
which places them there in the first place.
Fixes bug 1133572
Change-Id: I39e9fabb28b48dc52ec47f58d76b0bf2c6ee0204
The existing code would, no matter-what, skip the first migration when
running through the migrations tests. This makes the code
slightly counterintuitive (why skip the first one?), and is not very
flexible.
The reworked logic lets a migration raise a `NotImplementedError` to
signal that it doesn't support a `downgrade`. This lets the
walk-versions code treat the first-migration just like any other.
Change-Id: I19fd8ebc6075392cf9e573b8b4166291584b4a83
SQLAlchemy-migrate appears to support passing in a Column or a
column-name string into `drop_column`. In practice though, only the
column-name form actually works.
Change-Id: I1bcc28511d652df44f7168fb84c8be7dacd60cfd