Commit Graph

21 Commits (master)

Author SHA1 Message Date
jiaqi07 0cd55eae06 remove unicode from code
Change-Id: I561bca72d8395db2a3714180aa228978542eb178
2022-08-12 00:34:37 +00:00
Mark Goddard e47ff6bd82 Use jinja2.pass_context instead of contextfilter
Jinja2 3.0.0 deprecated contextfilter in favour of pass_context. 3.1.0
dropped contextfilter.

Fall back to contextfilter for Jinja2 2.x.

This change also fixes some issues caused by Ansible lint 6.0. Issues
found by the yaml plugin are fixed, while the FQCN for builtin actions
plugin is skipped.

Change-Id: I97b25551eb26da2c9100120bcd646c88fdb33ba6
2022-03-29 12:36:52 +01:00
Mark Goddard fc1b42c60d Support UEFI boot mode
Adds support for using UEFI boot mode for nodes. This is done via node
capabilities, as it is in Ironic.

The default boot mode is now configurable via the default_boot_mode
variable. The default boot mode remains legacy BIOS for now, although
this may change.

Updates the existing CI jobs, with the OVS jobs using BIOS boot mode,
and the linuxbridge jobs using UEFI boot mode.


Change-Id: Ifaf95ecfd4f6e925d3c69d4b324fdf2cd6b0ca52
2022-02-08 10:52:28 +00:00
Pierre Riteau f34bb772a0 Fix virtualbmc installation after release of cryptography 3.4
Installing virtualbmc system-wide on CentOS 8 fails with:

    ModuleNotFoundError: No module named 'setuptools_rust'

This error appeared following the release of cryptography 3.4, which now
includes Rust code. It can be installed without Rust using a Python
wheel, but only with more recent pip than version 9.0.3 available as RPM
on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1.

Also ignore PyYAML when installing system-wide to avoid conflicts with
an existing RPM package installation.


Change-Id: Ibd61e090611b3b7a7e0670c854362b512454bf3c
Story: 2008607
Task: 41788
2021-02-08 15:54:17 +01:00
Andreas Jaeger 288d663912 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also

Change-Id: Iccb449e20174b973f83924659e1ee2db592a326f
2020-05-21 20:35:05 +02:00
OpenStack Release Bot 53246242e9 Update master for stable/1.0
Add file to the reno documentation build to show release notes for

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on

Change-Id: I575f18ecafa512d79956d60fa7a454b80aca72d5
Sem-Ver: feature
2020-04-07 20:37:15 +00:00
Mark Goddard 75273302ed Refactor virtualbmc-domain tasks into a module
Virtualbmc domain creation can be unreliable, in particular when domains
already exist. This is in part due to the vbmc stop command not functioning
properly [1]. By moving the domain management into a Python module we can
better control the process of creation, and improve performance.


Change-Id: I52cb08cd0d300630cb6341f50eb0484c1d16daa4
2020-04-03 09:34:12 +01:00
Zuul d8f380a975 Merge "Ensure veth pairs are uniquely named" 2020-04-02 22:17:48 +00:00
Mark Goddard eb34860069 Ensure veth pairs are uniquely named
We name veth pairs using up to the first 6 characters from the nodes names. If
the node name prefixes are longer than this then the node index will not be
included, and the interface names will not be unique.

e.g. prefix compute, 2 nodes: compute0 & compute1

Link names are all p-comput-0-tap

Note that the 0 here is the index of the physnet, node the node.

This patch includes any trailing digits to keep link names unique, e.g.

Change-Id: I35c3da1d00030d8a270ac1a09e88e22098594f20
Story: 2007431
Task: 39058
2020-04-02 18:01:50 +00:00
Mark Goddard 8df4a68fb1 Fix node scheduling with pipe in hostvars
If Ansible hostvars contain a pipe (|) character, this can cause
problems during scheduling as Ansible fails during Jinja templating.
This is probably a bug in Ansible/Jinja.

The particular case where this was hit was when using screen, the
TERMCAP environment variable gets set to something beginning with

This change addresses the issue by moving the capture of hostvars inside
the tenks_update_state action plugin rather than evaluating them in a

Change-Id: Ibef91d9ef499c8741b61a170672a23f530a600bb
2020-03-20 10:59:30 +00:00
Mark Goddard 512174a828 Bump ansible version constraints to >=2.7,<2.10
This means that ansible 2.9 is typically used, and causes ansible-lint
to fail. Two workarounds have been added to address this:

* Use .get() to avoid passing an undefined object through to_nice_yaml
* Create a dummy module to avoid ansible-lint
  being confused about our action plugin.

Change-Id: I54388f713e17a47601be2db63a26fc43ca7ac6c8
2020-03-11 16:55:09 +00:00
Mark Goddard 13de0edd6c Install virtualbmc to system when SELinux is enabled
CentOS 8 nodepool images come with SELinux enabled, and prevent systemd
from accessing files in users' home directories. This prevents vbmcd
from starting.

To resolve this, install virtualbmc to the system when SELinux is

Change-Id: I5d30aca2b1e1ae897568f6e11fceda39e0b06e17
2020-02-27 15:47:44 +00:00
Iury Gregory Melo Ferreira 6af7c38564 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

tenks is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in

Ussuri Communtiy-wide goal -

Change-Id: I2b133661a4986d715513d5629b247f1086b0ddbc
2019-11-25 15:23:59 +01:00
Will Szumski 9c126332be Do not install Open vSwitch
Open vSwitch packages are no longer present in the default, or EPEL
repoistories. This means there is no clean way to install Open vSwitch
on CentOS. Instead, we should leave it up the user to decide how to
install it.

Change-Id: Ie56296230c9840e542ac70d96dc68c285d198ad6
2019-10-21 16:59:06 +01:00
Mark Goddard c58a22a2b1 Default Ironic node properties are bogus
Unless you add a 'properties' field under the 'ironic_config' for a node spec,
ironic nodes are registered with silly default properties (originating in the
os_ironic module) which cause validation to fail:

cpus:1, memory_mb: 1, local_gb: 1

We have enough info to add sensible defaults based on the VM configuration, so
let's do that.

Change-Id: I43fbe726d1d787d96be811f3ecd4234ea3b6bac3
Story: 2004908
Task: 29258
2019-01-31 15:00:51 +00:00
Mark Goddard 7ad354c2af Use node state rather than 'cmd'
There are two cases when we may want to delete things:

1. if a desired node configuration or spec changes, we delete existing node
2. if we use the teardown.yml playbook, cmd == teardown, delete
   everything, including global state.

In both cases, Tenks state (state.yml), all nodes to be deleted are given a
'state' of absent'. We should therefore use this rather than the 'cmd' variable
which only works in the latter case.

Change-Id: Icc033340c7fd882e61d90e3d086f7ba4a5b673bf
Story: 2004907
Task: 29257
2019-01-31 14:59:47 +00:00
Mark Goddard dcc25d8524 Configure VM interfaces in macvtap passthrough mode
Tenks currently uses macvtap interfaces in 'VEPA' mode for the VMs. If the VMs
run any virtual networking internally, typically this will use a different MAC
address, which will not be reachable from outside due to the macvtap MAC

This change uses macvtap 'passthrough' mode, such that all traffic is passed.

Change-Id: I0077c7001b2b419a94ea420833fa6dd3e8a3a967
Story: 2004906
Task: 29256
2019-01-31 14:57:34 +00:00
Mark Goddard c5c18ce04f Allow setting node and volume name prefixes per-spec
Adds support for setting node and volume name prefixes on a per-spec
basis.  This allows for different node specifications to use different
names, e.g.  'controller' vs 'compute'.

This change also fixes an issue where node names were not globally unique, only
unique on a given hypervisor. This could cause issues if used with multiple

This has been done by rewriting the scheduling logic, replacing the 'node
index' concept with a more concrete reservation of IPMI ports (which are
allocated per hypervisor), and decoupling this from generation of node names
(which are allocated globally).

Change-Id: I929b18918c2886f42c4d05b37c81f3e63c69a92f
Story: 2004894
Task: 29201
Story: 31d2681
Task: 29248
2019-01-31 11:24:58 +00:00
Mark Goddard d28635d2cf Changes to support standalone ironic
For standalone ironic deployments, such as those deployed using bifrost, there
is typically no keystone or placement service running. Use of the ironic API is
without authentication. We use clouds.yaml in this case.

Change-Id: I61ed791d019e43f6dfc632fa185f079b385c290c
Story: 2004425
Task: 28077
2018-12-20 09:48:21 +00:00
Will Szumski ffcdee61dd Add support for setting the libvirt connection uri
This, for example, allows you to run libvirt with non-default
socket path.

Change-Id: Ia01f39f425cccc6acebd31f77b46b1948e24d215
Story: 2004344
Task: 27935
2018-11-19 17:41:01 +00:00
Will Szumski 4f20ed32f6 Add support for generating release notes
This adds the configuration necessary to build the release notes.
The templates are based off the ones used in Kayobe.

Change-Id: Ia57ac4acaf40cb5e35407fd6e0a5375dbab51522
2018-11-14 09:07:51 +00:00