Commit Graph

16 Commits

Author SHA1 Message Date
Jenkins 23bd5cba22 Merge "Reuse code to save remote ssh calls" 2016-08-16 16:08:39 +00:00
Isaac Beckman fac0b2fd8f Reuse code to save remote ssh calls
There were 2 identical remote calls to systool.
The output of the first call can be used to save the second one.

Change-Id: Ia6bb75a2606aa47d9a759738452326010ab856dd
2016-08-16 17:10:16 +03:00
Jenkins f70388e0ea Merge "Execute source before running non-interactive ssh" 2016-08-04 16:30:29 +00:00
Isaac Beckman 28d88d0bf2 Bind\unbind pci device to vfio-pci driver
Starting with Linux 4.1, the kernel includes vfio-pci.
VFIO - "Virtual Function I/O".
The VFIO driver is an IOMMU/device agnostic framework for exposing
direct device access to userspace, in a secure, IOMMU protected
environment.
The vfio-pci takes full advantage of IOMMU, has better device support
and prevents multiple access to the same device.
Binding a pci device to vfio-pci driver is very useful for setting
pci-passthrough for a VM

Change-Id: I6c7df6840429e1b005908fdcc57a5f4e47fab922
2016-07-25 09:39:19 +00:00
Isaac Beckman 0e45dbe4db Execute source before running non-interactive ssh
The SSH command execution shell is a non-interactive shell.
The commands from the file /etc/profile are executed only when
bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option. Hence need to source
/etc/profile explicitly

Change-Id: I88560431e7e14b70ccc1cdab77b218036b586f96
2016-07-17 14:54:35 +00:00
Walter A. Boring IV f4e427216e Move HBA online check
This patch moves the test for the HBA to after it's been
reattached to the host driver.   The current check will always
fail, because it will never see it.

The host driver will never see the HBA until after the virsh reattach
command runs.

Change-Id: I74255576e2b7f31dcb35c87bbf7fc270d6d736b0
2015-11-18 18:57:28 +00:00
Walter A. Boring IV 912809b0fa Add an Online check for the FC HBA
Fibre Channel devices can go into Linkdown or Offline mode after
a many times being PCI pass through to virsh domains.  We need
to make sure that the HBA we are attempting to pass through to the
virsh domain is actually in port_state="Online".  If the HBA
isn't online, then every volume attachment via that HBA will fail
100% of the time.

This patch adds a test against the requested HBA(s) and makes sure
that they are Online.  If all the requested HBA(s) are not Online,
then the script will fail.

Change-Id: Icf05bc3ed6adb842006852f1804696fc416c0d26
2015-11-16 08:39:55 -08:00
Walter A. Boring IV a019f0f571 Reattach the PCI device to host driver
This patch adds the ability to do a virsh nodedev-reattach of the
PCI device.   This detaches the PCI device from the pci-stub to it's
original host driver (lpfc) in the hope that it does a reset of the
device upon reattach.

Change-Id: Ib44a35820015b98e13beb628d1625a33eeafc96b
2015-10-15 16:52:30 +00:00
Ramy Asselin 6f0134e084 Restrict commands allowed by fc passthrough key
Currently the fc passthrough key will allow the vm host
to run any command on the hypervisor. Instead, restrict the
commands to just what is needed.

Change-Id: I210d646c4155d526912d9bee3865d239e08d5de4
2015-09-30 10:39:39 -07:00
Patrick East 5803cd0999 Fix FC provider setup script profile.d script output
The old output was not correct in that the script would actually cause
an error to occur when parsing it. This would result in the
fc_pci_device variable to not be available, and in turn the passthrough
to fail.

Change-Id: I440ad53ac47eee871aba1d796ba6258eb7ebff52
2015-06-15 15:13:39 -07:00
Ramy Asselin e56925a18f Allow override the fc_pci_device variable
Other than allow users to pick their own variable name,
this is useful for the use case of using a particular fc device
for a specific test.

Change-Id: Iefd7f7a3b7b7a15efc8fa5d00dda886a2c87ecf2
2015-06-10 15:04:02 -07:00
Ramy Asselin b28b3252b1 Add ability to pass through n devices
Default n is 1. Override by e.g. export FC_NUM=2.
Abort if n pci devices are not passthrough.

Change-Id: I2474499b1f81c7f199e21552644eb151cf836fe0
2015-05-28 18:31:26 -07:00
Ramy Asselin ec385d3207 Check string length to ensure it worked
Change-Id: Id88ad942be50f1f101899096f83039d30076c754
2015-05-28 18:22:05 -07:00
Ramy Asselin 7f54dbed83 Add configuration to support single node providers
For simple setups where providers are single compute node and
no dns is setup for hostname lookup, use the provider's ip address
as the hypervisor endpoint.

Change-Id: Ide60107cb6666648b09c39f947fedaa65211868a
2015-05-28 15:36:16 -07:00
Ramy Asselin 4d8756c0bc Use the temp fcoe file created for fc passthrough
Change-Id: I8126c7589ff9ab75bb5c61047eb818a8cbca670c
2015-05-28 15:09:34 -07:00
Patrick East 781abe4833 Add some Fibre Channel helper scripts
Credit for these should go to Ramy Asselin. I borrowed the original
versions of these and modified them a bit to work in my system. The
largest change was in the invoke-cf-passthrough function which now is a
standalone script that looks for environment variables for some
parameters. In addition instead of using the gateway x.x.x.1 address to
connect to a hypervisor it will check nova for the host and then connect
with its hostname. This allows it to work for systems using neutron that
cannot ssh through the gateway address. In addition it will try to add
all fc pci devices and not stop after one success. This means if you
are set up for multipathing on the host with multiple hba’s each one
will get passed through to the test node.

The general flow of how to use these is to run the setup script on a
nodepool provider first. Then as part of the jenkins job (or nodepool
ready script) run the passthrough script. At some point in the
process you need to install the fc driver, this should work fine either
as part of the image build process or any point before doing the
passthrough.

Co-Authored-by: Ramy Asselin ramy.asselin@hp.com

Change-Id: Ieba77e99f9d2949f92060483deb58975324e770c
2015-05-13 17:52:53 -07:00