Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
* 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
|
|
* changes:
ipmi_adapter: simplify, retry if command fails
common.py: allow specifying number of attempts in exec_cmd
|
|
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>
|
|
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
|
|
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
Change-Id: I04dd8b4bdddc5678b158d7287c6ffc52d1bce135
Signed-off-by: wuwb1989 <wuwenbin2@huawei.com>
|
|
|
|
|
|
Change-Id: I96b59e22fcc0269aa3ae0b04587c8ca7d0fab867
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
|
|
A "qemu" snuck in instead of "kvm".
Change-Id: Ibe704103cd1bab6e127a31d08d53f53518033539
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
|
|
Change-Id: I3128652aeb87cb2cfaa91ded1b8d9ebeeb70d33b
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
|
|
Change-Id: I9d2fc979886510c165af8dbac93ddcdc954727cf
Signed-off-by: wuwenbin2 <wuwenbin2@huawei.com>
|
|
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>
|
|
|
|
|
|
This reverts commit 5926bcddca0eca28a33ae43aadf90b9263ae6b84.
Change-Id: Ibea4ca5d38ce2e10ab6d5bb1d7ccdf666ee149d5
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
|
|
|
|
Change-Id: I1f6d38da24d5a4e66061b9bdfe576fbbda7fb624
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
|
|
Change-Id: I380087889cda079a56c8cea3acc13145dcd49046
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
|
|
|
|
|
|
|
|
Change-Id: If0ab25ee843f9892510da3d3c8d1f10a54440545
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
|
|
Change-Id: Ib225701a808211e50554c8f1762325aa75ecc33f
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
|
|
Change-Id: I5e466c89c05eb4d637778218cfe03b88d569f331
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
|
|
|
|
Change-Id: I59b96a424a753f880b4ac16abd806851ad3f9533
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
|
|
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>
|
|
|
|
|
|
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>
|
|
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>
|
|
- 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>
|
|
Change-Id: Id7579ef618b8cd922de325d9dc1c0b7a6c5587a7
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
|
|
Signed-off-by: Daiel Smith <daniel.smith@ericsson.com>
JIRA:0
|
|
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>
|
|
|
|
Fuel repo"
|
|
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>
|
|
|