aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-06-15Merge "virtual_fuel: initial support for remote libvirt"Jonas Bjurel4-5/+95
2016-06-15Merge changes from topic 'remote-libvirt-support'Jonas Bjurel1-12/+19
* changes: virtual_fuel: make vm_template an attribute virtual_fuel: factor out image creation into a method VirtualFuel: Add temp_dir and vm_name attributes
2016-06-15Merge changes from topic 'simplify-ipmi-adapter'Jonas Bjurel2-66/+59
* changes: ipmi_adapter: simplify, retry if command fails common.py: allow specifying number of attempts in exec_cmd
2016-06-15virtual_fuel: initial support for remote libvirtJosep Puigdemont4-5/+95
With this patch it should be possible to create a fuel VM on a remote libvirt server by properly defining the LIBVIRT_DEFAULT_URI [1] environment variable. If the variable is not defined, then there should be no percievable change in behaviour for the script. This patch introduces the ability to create volumes (images) on a remote libvirt host where the Fuel VM is to be deployed. For now the volumes are created by default in a pool named jenkins, but the idea is to allow this to be configured, probably in the POD's DHA file. Since all virsh commands honor LIBVIRT_DEFAULT_URI, we use this environment variable to detect wheter we should create a volume or not. The rationale being that the variable will only be set if the user wants to to do the VM deployment on a remote libvirt host. We need to create a volume because we can not rely on being able to access the remote server's file system directly. The images are then transferred to the libvirt host using virsh commands. All this could also be done using scp and a user directory on the host machine, but using pools allows us to take advantage of libvirt's policies and file permissions. CHANGE: when LIBVIRT_DEFAULT_URI is defined, the script will not check for the presence of the required PXE bridge. This will still be checked when the Fuel VM is started and the bridge not found, but this happens at a later point than it does today. CHANGE: before this patch, the file system image was named like the VM: vm_name.raw. This patch introduces a change and adds a timestamp suffix to the image: vm_name-timestamp.raw. This is so to avoid collisions with an image with the same name on the remote pool (two PODs may be using the same pool). It may also be useful to keep around old file system images. FIXME: This patch requires a pool named "jenkins" in the remote libvirt server, and it will fail if it is not present. This should be configurable. Notice though that we can still define LIBVIRT_DEFAULT_URI as "qemu:///system" to create the Fuel VM on the local host. [1] https://libvirt.org/remote.html#Remote_URI_reference Change-Id: I40925ed31337d3ad9cf505f284f5c3d14e9129a0 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15virtual_fuel: make vm_template an attributeJosep Puigdemont1-6/+5
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15virtual_fuel: factor out image creation into a methodJosep Puigdemont1-1/+6
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15VirtualFuel: Add temp_dir and vm_name attributesJosep Puigdemont1-6/+9
These two variables are defined in one of the methods right now. They will be useful to other methods too, so we add them as attributes to the object here. Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15ipmi_adapter: simplify, retry if command failsJosep Puigdemont1-59/+42
The method get_node_state has been added to the the IpmiAdapter class. In addition, now the power on/off methods will try several times to perform their IPMI command before giving up, instead of bailing out at the first error. After the power on/off command is completed, the method will wait until the node is in the desired state. NOTE: a command could potentially take several minutes if the defaults are used; each IPMI command can take up to 1 minute, and there can be 3 commands issued per operation, one of them may be retried 20 times with the current defaults. Ideally we would use eventlet or something similar to allow each command a limited time to execute, instead: with eventlet.timeout.Timeout(seconds) as t: power_on/off_command Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15ODL build: Allow customizing JAVA URLAlexandru Avadanii1-4/+4
For Armband, JAVA8_URL hardcode needs to be patched outside of the build system, so make related var overrideable. Change-Id: I308074a4ae0c5f8b22e5e5128965ce90fea3734e Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Signed-off-by: Stanislaw Kardach <Stanislaw.Kardach@cavium.com>
2016-06-15common.py: allow specifying number of attempts in exec_cmdJosep Puigdemont1-7/+17
Some commands executed by exec_cmd may fail because of a temporary cause, and it may be desirable to retry the same command several times until it succeeds. One example of this are the ipmitool commands, which may fail temorarily on some targets if they get too many requests simultaneously. In this patch three new optional parameters are introduced to the function signature, which do not break backward compatibility: attempts: which indicates how many times the command should be run if it returns a non-zero value*, and defaults to 1 (as today). delay: which indicates the delay in seconds between attempts, and defaults to 5 seconds. verbose: It will print the remaining attempts left for the current command if set to True. * It may be desirable to add yet another parameter to indicate what return value should be considered an error, but non-zero for now seems a reasonable default. Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-06-15Merge "repobuild: Allow customizing fuel-mirror repo URL"Jonas Bjurel1-1/+2
2016-06-15repobuild: Allow customizing fuel-mirror repo URLAlexandru Avadanii1-1/+2
For Armband, fuel-mirror code needs to be patched outside of the build system, so we factor out the repo URL into an overrideable variable (FUEL_MIRROR_URL). Change-Id: Icf26f1b84f5a653f541819a42980377f51c7f299 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Signed-off-by: Stanislaw Kardach <Stanislaw.Kardach@cavium.com>
2016-06-15Build: Allow customizing FUEL_MAIN_TAG (commit)Alexandru Avadanii1-1/+1
FUEL_MAIN_TAG is currently hard set to 9.0 (not overridable). While this is a sane assumption for the usual scenarios, Armband applies a series of patches on top of Fuel@OPNFV, hence requiring us to override this variable. WARNING: FUEL_MAIN_TAG is reused for fuel-mirror tag, so if you override this variable, make sure the same tag exists in fuel-mirror. Change-Id: Ided75cf0c3b5ad18cf7ef1ec88b5d2dc3aada511 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Signed-off-by: Stanislaw Kardach <Stanislaw.Kardach@cavium.com>
2016-06-15Merge "Build local mirrors for stable/mitaka"Michal Skalski7-30/+50
2016-06-15deploy: ipmi adapter: Add <port> config support.Alexandru Avadanii3-3/+8
Sometimes the IPMI lanplus protocol listens on a non-standard remote port, e.g. when target nodes are interfaced through a fake IPMI BMC application that listens on multiple ports on the same IP address. Therefore, allow setting IPMI port in the DHA using a new property named `ipmiPort`, and pass it along to `ipmitool` when set. CHANGE: get_access_info now also supports specifying the IPMI port to use with `ipmitool` by configuring the `ipmiPort` property in the DHA. hp_adapter.py: updated `get_access_info` return signature with the new (unused there) `ipmiport`. Change-Id: I620176bd7f466aa460518cf12d15ccbe86a22560 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-15build and deploy onos plugin for fuel9wuwb19896-14/+52
Change-Id: I04dd8b4bdddc5678b158d7287c6ffc52d1bce135 Signed-off-by: wuwb1989 <wuwenbin2@huawei.com>
2016-06-14Merge "Enable vsperf plugin in fuel 9.0"Jonas Bjurel2-2/+2
2016-06-14Merge "Update configuration for fuel 9 virtual deployment in Huawei-China."Jonas Bjurel2-77/+62
2016-06-14Enable vsperf plugin in fuel 9.0Guo Ruijing2-2/+2
Change-Id: I96b59e22fcc0269aa3ae0b04587c8ca7d0fab867 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2016-06-14Fixing erroneous hypervisor typeStefan K. Berg1-1/+1
A "qemu" snuck in instead of "kvm". Change-Id: Ibe704103cd1bab6e127a31d08d53f53518033539 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-14Build local mirrors for stable/mitakaMichal Skalski7-30/+50
Change-Id: I3128652aeb87cb2cfaa91ded1b8d9ebeeb70d33b Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-06-14Update configuration for fuel 9 virtual deployment in Huawei-China.wuwenbin22-77/+62
Change-Id: I9d2fc979886510c165af8dbac93ddcdc954727cf Signed-off-by: wuwenbin2 <wuwenbin2@huawei.com>
2016-06-13Updated devel-pipeline DEA overrides for Fuel 9.0Stefan K. Berg2-79/+63
Minor fix in the ELX version. Update to Fuel 9.0 in the default version. Change-Id: Ic084b86e7f6d2dfc3d15b10f0ef72e04ef2b7bf6 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-13Merge "Modification of deployment config for Fuel 9 and ELX lab"Stefan K. Berg3-169/+304
2016-06-13Merge "Revert "Temporary fix for PXE booting from the wrong NIC""Stefan Berg1-1/+1
2016-06-13Revert "Temporary fix for PXE booting from the wrong NIC"Stefan Berg1-1/+1
This reverts commit 5926bcddca0eca28a33ae43aadf90b9263ae6b84. Change-Id: Ibea4ca5d38ce2e10ab6d5bb1d7ccdf666ee149d5 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-13Merge "Temporary fix for PXE booting from the wrong NIC"Daniel Smith1-1/+1
2016-06-13Temporary fix for PXE booting from the wrong NICPeter Barabas1-1/+1
Change-Id: I1f6d38da24d5a4e66061b9bdfe576fbbda7fb624 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-13Modification of deployment config for Fuel 9 and ELX labStefan K. Berg3-169/+304
Change-Id: I380087889cda079a56c8cea3acc13145dcd49046 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-08Merge "ISO: Use --joliet-long names."Stefan Berg1-1/+2
2016-06-08Merge "Do not create files when check connectivity"Michal Skalski1-1/+1
2016-06-08Merge "Script to clean expired build cache items"Stefan K. Berg1-0/+38
2016-06-08Do not create files when check connectivityMichal Skalski1-1/+1
Change-Id: If0ab25ee843f9892510da3d3c8d1f10a54440545 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-06-08Fix for not reaping 'ssh_network'Peter Barabas1-1/+1
Change-Id: Ib225701a808211e50554c8f1762325aa75ecc33f Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-08Script to clean expired build cache itemsStefan K. Berg1-0/+38
Change-Id: I5e466c89c05eb4d637778218cfe03b88d569f331 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-06Merge "Build odl plugin for mitaka"Michal Skalski7-95/+298
2016-06-02Build odl plugin for mitakaMichal Skalski7-95/+298
Change-Id: I59b96a424a753f880b4ac16abd806851ad3f9533 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
2016-06-02Download deployment config after modificationPeter Barabas1-0/+6
Modified network or interface configurations were not reflected in the deployment config, resulting in faulty node configurations. Change-Id: I4ca20702c0171e7995f2b4f46317557ec9d5beac Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-06-02Merge "Auto deploy corrections for Fuel 9.0"Stefan K. Berg3-2/+3
2016-06-01Merge "docs: Mitaka Build req: Add p7zip-full."Jonas Bjurel1-0/+2
2016-06-01ISO: Use --joliet-long names.Alexandru Avadanii1-1/+2
Armband adds similar files, which tend to have long names and only differ in suffixes (e.g. DEBs for amd64 vs arm64). This works around ISO build error(s) like: "genisoimage: Error: ./ubuntu/pool/main/g/golang-gogoprotobuf/golang-gogoprotobuf\ -dev_0.0~git20150828.0.6cab0cc-1~u14.04+mos1_amd64.deb and ./ubuntu/pool/main/g/golang-gogoprotobuf/golang-gogoprotobuf\ -dev_0.0~git20150828.0.6cab0cc-1~u14.04+mos1_arm64.deb have the same Joliet name" Change-Id: I89d9816d86176d80bcc76f5f90c8391b0664ab82 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-01docs: Mitaka Build req: Add p7zip-full.Alexandru Avadanii1-0/+2
Build system uplift to Fuel 9.0/Mitaka now requires `7z` cmd utility also on the builder host (not only inside docker containers), so document this as a prereq in the build instructions. [1] https://gerrit.opnfv.org/gerrit/#/c/13919/ Change-Id: Icb57ac58c499272fce0a27bb2d25383e933c7814 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-01Auto deploy corrections for Fuel 9.0Stefan K. Berg3-2/+3
- The auto deployer's detection of nodes being up corrected as "fuel node" now returns "1" instead of "True" to denote that the node is up. - The location of bootstrap_admin_node.sh has changed so the detection of whether the Fuel node installation needed a correction for the deployer not to throw an exit code and terminate prematurely. - Small fix: deploy.py is now executable (just a chmod change). Change-Id: I8fed7bafe6912f8b4278619bbdaa16577a82737b Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-06-01Clean up after ourselvesPeter Barabas1-0/+2
Change-Id: Id7579ef618b8cd922de325d9dc1c0b7a6c5587a7 Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
2016-05-31A small edit for the uplift to Mitaka from LibertyDaiel Smith1-1/+1
Signed-off-by: Daiel Smith <daniel.smith@ericsson.com> JIRA:0
2016-05-31common.py: catch stderr in exec_cmdJosep Puigdemont1-6/+6
When running commands with exec_cmd(), the stderr of the command is sent to /dev/null and ignored, and only stdout is retrieved. Thus, when a command fails and check is enabled, only the output of stdout is presented to the user, which normally holds no information about the error. In this patch we retrieve stderr, and when an error occurs, an exception is raised with that message. Fixes https://jira.opnfv.org/browse/FUEL-142 Change-Id: I3940e1a43963a6abec362481b1d4ce7bd7cb816d Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-05-31Merge "Build system uplift to Fuel 9.0/Mitaka"Stefan K. Berg22-2438/+189
2016-05-30Merge "Remove residual Lab & configuration DEA and DHA from the unprotected ↵Jonas Bjurel28-9381/+0
Fuel repo"
2016-05-30Build system uplift to Fuel 9.0/MitakaStefan K. Berg22-2438/+189
Switching to Fuel 9.0/Mitaka for the build system. Overhaul of the patching mechanism. As bootstrap_admin_node.sh has been transitioned into an RPM (fuel-support), the lazy designer found it more simple to patch that script during the Fuel build phase than at the OPNFV ISO generation. The patch mechanism has been changed to a normal context diff instead of the orig/modified file tuples previously used. Hopefully this will require fewer manual rebases (may the fuzz be with us!). Also the ks.cfg patching has transitioned to a context based ordinary patch for the same reasons, but this is as before taking place during OPNFV ISO generation. Patch naming made more descriptive. The reaping mechanism has been slightly modified due to a change in the naming of the node files when these are generated by the Fuel CLI. IMPORTANT 1: The package cache mechanism is currently disabled, it is only possible to install Fuel with a direct internet connection. This will be fixed in a later change set! IMPORTANT 2: All plugins has been disabled! As you have re-certified your plugin with Fuel 9.0, please re-enable it in build/Makefile! Change-Id: Ia918d16a74b68f89d178e06befe6e8a7a9367bf9 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
2016-05-25Merge "More rigorous Fuel environment check"Jonas Bjurel1-2/+4