60 Commits

Author SHA1 Message Date
Julia Kreger
cd93f3c222 devstack: Ignore error with file existing on restack
When re-stacking locally, my restack failed because .hushlogin already
existed in the folder. :\

Change-Id: I45b5d676d7f008cf8c4f110cfa22a7c96d4db7e1
Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
2026-02-02 08:20:00 -08:00
Zuul
7c85618833 Merge "tox: Enable codespell by default and limit it to relevant files" 2025-12-01 21:23:47 +00:00
Zuul
4454b4bcfc Merge "devstack: Drop explicit etcd api version" 2025-11-19 01:43:17 +00:00
Takashi Kajinami
e3e6cc5e25 Drop remaining logic for linuxbridge-agent
... because it's gone.

Change-Id: I005f6ba8369b1a4d7681a3edd674e956a3524638
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-29 01:06:25 +09:00
Baptiste Jonglez
96198e70bc tox: Enable codespell by default and limit it to relevant files
This makes sure that developers perform a good default set of checks when
simply running "tox": unit tests, pep8, code spelling.

Fix the two small spelling issues in current codebase.

Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
Signed-off-by: Baptiste Jonglez <baptiste.jonglez@inria.fr>
Change-Id: I1e128c395530dab7b12701d3c3dd6a31d4f1dd73
2025-10-14 11:56:31 -07:00
Takashi Kajinami
74629183e9 devstack: Drop explicit etcd api version
... because it can be now automatically discovered.

Change-Id: I4e36e242a80f4dbe45607e1369ff8b4d237c9db7
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-13 16:49:12 +09:00
Jay Faulkner
c77674475b Make devstack runs slightly more deterministic
This eliminates one of the two implied ordering things we're relying on.
We should now be OK if networking_generic_switch is configured before
neutron. We are still relying on implied behavior of neutron services
restarting sometime after our work in the post-config phase.

Change-Id: I5a763b74ea349a74c66feca38ded46cda91d82a4
2025-05-27 12:55:59 -07:00
Julia Kreger
1c61066a47 ci: workaround neutron's move to uwsgi only
When neutron changed to using uwsgi only, it automatically excluded
configuration parameters needed to supply configuration to launch ML2
plugins in the standard style of devstack, because the pattern only
allowed for auto-configuration which only loads two files, or from
a files in a single directory pattern, or a list of files supplied
by environment variable.

Ideally, we'd be able to restart neutron as well. We can't due to when
things happen upstream; the post-config phase is not always late enough
since neutron does some configuration there, the extra phase is too late
as Ironic will be setting up nodes there. For now, we're relying on a
race condition that we reliably win.

Change-Id: I5cfd1fc247043ede9b71252ee681ce2ca413ede6
Signed-off-by: Jay Faulkner <jay@jvf.cc>
2025-05-27 08:45:46 -07:00
Steve Baker
dc96c86c44 Correctly set use_keys when key_file is set
use_keys needs to be True for netmiko to attempt public key
authentication with the specified key_file.

Change-Id: Ic0b2c921af91e667dd95fa174a3e47ddaf37f438
2025-05-05 15:44:31 +12:00
Julia Kreger
18db751262 CI: Fix trunks enabled by default
Cardoe reported that networking-baremetal jobs were failing regardless
of the change. Upon investigation, we could see that n-g-s's devstack
plugin was automatically turning on the the test feature flag.

By default, this should be assumed to be false, and as such the
developer has moved to using a setting flag, I'll take a similar
approach with the the ngs devstack plugin so we don't inadvertently
turn on the feature flag for tempest.

see: https://review.opendev.org/c/openstack/ironic/+/940611
Change-Id: I7f80a33382e163478a65e6acb1f478f610f6b488
2025-04-04 12:09:07 -07:00
Zuul
f6744c3e39 Merge "Allow config of simulated switch" 2025-03-18 10:32:03 +00:00
Vasyl Saienko
ff0085a03a Add vlan aware VMs support
With this patch ngs starts supporting attaching of trunk port to
baremetal server. Only VLAN Neutron network is supported.

Closes-Bug: #1653968

Co-Authored-By: Vasyl Saienko <vsaienko@mirantis.com>
Co-Authored-By: Will Szumski <will@stackhpc.com>
Co-Authored-By: Mark Goddard <mark@stackhpc.com>
Co-Authored-By: Seunghun Lee <seunghun@stackhpc.com>

Depends-On: https://review.opendev.org/c/openstack/ironic/+/941023

Change-Id: I978cb6b1ea8c049b40aaf1b305d0d0f033282299
2025-03-10 15:41:59 +00:00
Julia Kreger
81b32edfc6 Allow config of simulated switch
To enable switch testing with NGS, we need to be able to configure
something *aside* from the OVS support in NGS.

This functionally disables some of the plugin's interactions, so
devstack can be used to help facilitate the complex network
integration testing.

Change-Id: I61d7e80fddac7d046bd461d4487f0e3e233ffd2d
2025-03-03 12:14:35 -08:00
Jay Faulkner
7edd1734a3 CI fix: Use the un-deprecated v3 etcd API
Tooz defaults no longer work with the etcd version we're using.

Change-Id: I400f0dcfff839d17319b03b81a8bf3f7de0787a4
2023-09-20 13:14:09 -07:00
Sławek Kapłoński
bf831396d0 Remove lib/neutron-legacy leftovers
In [1] we finally got rid of the unfinished lib/neutron module and kept
only lib/neutron-legacy. It's renamed to lib/neutron now and it's the
only neutron related module in Devstack.
So this patch removes leftovers related to the old lib/neutron-legacy.

[1] https://review.opendev.org/c/openstack/devstack/+/865014

Change-Id: I1c61f2184bf3485e985b0165ea472816a7a7c097
2022-12-20 11:20:28 +01:00
Julia Kreger
2e201a0db5 CI: use pre-existing ssh key on multinode jobs
In initially fixing the multinode key access to the
subnode, we inadvertently now broke ssh access
post-upgrade to the controller local host as it is
attempting to generate and leverage an ssh key locally
which can't really work. So instead, used the provided
keys if present.

Change-Id: I930f034c47bd1d2729ce43cd07c28cc7c1126402
2022-05-11 14:00:08 -07:00
Zuul
58b953499f Merge "CI: Alternate logic for multinode key replacement" 2022-05-06 01:39:32 +00:00
Julia Kreger
f469dc1397 CI: Alternate logic for multinode key replacement
For some reason, the conditional is not matching... and because these
jobs require the change to be merged for it to be tested in grenade,
this is difficult to spot. Hopefully this works...

What was happening as reported in job logs:

configure_generic_switch:151 :   '[' -f /opt/stack/.ssh/id_rsa ']'
configure_generic_switch:154 :   local cnt=0
configure_generic_switch:155 :   local section

Change-Id: I34c33bb5b67561eb90997549317f0fd5333e18db
2022-05-04 10:17:28 -07:00
Julia Kreger
6a0f213815 Trivial: Remove legacy devstack CI call
++ [TRIM]/devstack/plugin.sh:source:26 :   enable_python3_package networking-generic-switch
It is no longer necessary to call enable_python3_package().

Removes entry according to the notice the logging output.

Change-Id: Id271c5f3d122b9f7486f675c8995512a8f682913
2022-05-04 09:37:24 -07:00
Julia Kreger
c6c10a12a8 CI: Fix Multinode ssh key/hostname for unit tests
In multinode, the devstack plugin for networking-generic-switch can't
really work as intended. But, the authorized keys is copied on all
nodes, and zuul puts a consistent key in place, so it doesn't
really need to do what it is doing, but we need to use the stack
user's pre-existing keys to access the remote host.

This will allow Ironic's multinode grenade job to work without
errors about accessing the key file, which is a red herring for
when the connection fails.

Additionally, the underlying ngs code is suseptible to a race on
configuration loading as configuration is loaded separately.

We can't really force it to load the option. We also can't
explicitly add it, so the best thing to do is to wrap it and
rely upon a mock to facilitate the unit test.

Change-Id: Ia8550c124f2ef1cce620a4fb28c35700d34aa027
2022-04-28 13:39:22 -07:00
Iury Gregory Melo Ferreira
2411ff78e1 Generate key on PEM format
paramiko complains if the key doesn't start with
`-----BEGIN RSA PRIVATE KEY-----`, the key we generate starts
with `-----BEGIN OPENSSH PRIVATE KEY-----`.
The need for this is only in our multinode grenade job since we
do the upgrade.

Change-Id: I4aa760c013a1b15d3339cf7b2ff5823e45d404f1
2020-08-06 17:17:38 +02:00
Zuul
a2620d2b5e Merge "Fix ngs" 2020-04-06 12:10:53 +00:00
Iury Gregory Melo Ferreira
cfce2b1bea Fix ngs
Fixed the netmiko exception `Timed-out reading channel, data not available.`
Change ngs config to use `::1` instead of `localhost` so instances can
boot without problems.
Change ironic-tempest-ipa-wholedisk-direct-tinyipa-multinode to voting.

Co-Authored-By: Harald Jensås <hjensas@redhat.com>
Change-Id: If5aa586a41c51a996ed0c27b4edf67a30de939ee
Story: #2007500
Task: #39272
2020-04-03 18:56:42 +02:00
Harald Jensås
7de612db2a Add netmiko_session_logging
Adds new configuration option to enable netmiko session
logging.

Also disable the login banner for the ovs user.

Change-Id: I20d8d1d184cabaf276c345d7d567caf9eab9613c
2020-04-03 16:40:11 +02:00
Zuul
28e6c91dca Merge "Directly source ML2 plugin for devstack" 2019-01-09 17:28:34 +00:00
Julia Kreger
82d4cf6f88 Directly source ML2 plugin for devstack
Source the plugin so we can directly invoke the ml2 helper methods
without loading neutron-legacy devstack code which we do by using
the q-* service names.

This enables migration to the neutron-* service names to occur.

Change-Id: Ia10839f36a240a503eb4b673a4e39105f1c6abb5
2019-01-08 14:02:09 -08:00
Julia Kreger
7636cac1f6 Migrate n-g-s jobs to Zuulv3
Sets up jobs for Zuulv3, and marks the python3 jobs as n-g-s's
use of tooz seems to be incompatible with python3.

Change-Id: Ic3f4980125a2be8e63a3596c28979b8df015afd5
2018-12-14 14:39:24 +01:00
Derek Higgins
d2a653da30 Set config filename for neutron-metering
Required now for the grenade jobs as they have switched
over to using this script since rocky has been released.
Task: #26593

Story: #2003808
Change-Id: Ib7d68d1360e3cdbfdc2ff185a9760461e75ac8c4
2018-09-21 10:12:13 +01:00
Harald Jensas
a521529c62 Use userdel/groupdel instead of deluser/delgroup
The deluser and delgroup commands is not available on CentOS.

Change-Id: I1f66bbe2dacfe3d10e0c5f4ce6acd82ad203eb27
2018-01-05 10:23:28 +01:00
Vasyl Saienko
e43e35bc7d Do not restart n-cpu in devstack plugin
doing this currently fails ironic multinode partial grenade job
as restarted 'old' n-cpu picks up new, incompatible dependencies
installed by other, upgraded services.

To somewhat guard against such failures, this patch also adds
ironic's multinode partial grenade job as voting to n-g-s too,
which is fair given ironic depends on n-g-s on upgrade testing.

Change-Id: I0acf834e2ea5b5ac0271762178662eb129b492bd
Closes-Bug: #1733604
2017-11-21 14:18:40 +00:00
Mathieu Mitchell
dfee8641a0 Fix various typos in devstack scripts
Change-Id: Iaff023c7013482b98e69d23b4240a7cf3880f49b
2017-11-05 15:34:34 -05:00
Vladyslav Drok
00616c5bc3 Get rid of nomulticell flag in upgrade script
It was removed in favor of CELLSV2_SETUP variable, that gets set
in ironic settings.

Change-Id: I0c2a5cbb3ec235c883e3fea2fa471e72b7a2638a
2017-07-27 18:01:43 +03:00
Hironori Shiina
4e7c7313e0 Set nomulticell flag for starting nova-compute in upgrade
This patch set nomulitcell flag when starting nova-compute because
multi-cell rabbit setup is not supported in Grenade.

Closes-Bug: 1700548

Change-Id: I4462b88dde778f316896013d4098936cdeec6b76
2017-06-26 14:47:01 +00:00
Pavlo Shchelokovskyy
c9b607724f Add tempest test for DLM functionality
If configured in the devstack plugin, will:
- setup 2x extra ports as max allowed session for n-g-s user
- configure tempest plugin to use that number of extra ports to
  concurrently run the new test below
- execute a test that cuncurrently run the ngs basic ops test
  with the same 2x max sessions

Test is using futurist.ThreadPoll in a single test method to not depend
on concurrency of the test runner itself.

If ngs.port_dlm_concurrency is not set in tempest.conf,
this new test is skipped.

Change-Id: Ib28a4c803fca06bab16c233d98434dc4b3f97a02
Related-Bug: #1674324
2017-06-16 11:11:27 +00:00
Pavlo Shchelokovskyy
d9ec0c5bfd Setup DLM in devstack plugin
This patch allows to set up n-g-s under DevStack to use and enforce DLM
for netmiko connections.

A new devstack variable GENERIC_SWITCH_USER_MAX_SESSIONS is added
(default 0).

If it is non-zero:

- a new system user 'ngs_ovs_manager' with password-less sudo permissions
  and appropriate authorized SSH keys will be created by devstack plugin,
  and maximum number of sessions for this user will be hard-limited to
  the value of GENERIC_SWITCH_USER_MAX_SESSIONS in /etc/security/limits.d/
  to simulate a switch with limited number of allowed SSH connections;
- n-g-s will be configured to use this user for SSH connections, and
  netmiko OVS switches will be configured with ngs_netmiko_max_sessions
  set accordingly.
- n-g-s will be configured to use DLM via etcd3 that is now generally
  installed in DevStack by default (and fail if etcd3 is not enabled)

Change-Id: I53971e613c3804de255dda5fc0fb164f9bc335ff
Related-Bug: #1674324
2017-06-16 09:39:36 +00:00
Vasyl Saienko
5832c860cc Restart n-cpu during upgrade
The rase between starting n-cpu and neutron is possible. That will cause
n-cpu to stuck on start. This patch restart n-cpu after neutron has been started.

Change-Id: I171f0209ede85b3405e58f46640ee74c2cddfd22
2017-04-19 22:17:41 +03:00
Vasyl Saienko
e718293c93 Fix generic_switch upgrade
Fix install_service name to apply upgrades

Change-Id: Ie7f5e658303a3a4488c7bf1ea4aa5ec2b8f4e30f
2017-04-04 00:57:26 +03:00
Vasyl Saienko
f5963a9d7d Add ability to get device by mac_address
switch_info key in local_link_information is optional, and ironic-inspector
doesn't set this field by default. Whith this patch it is possible to
pick device based on 'switch_id' key. For this device in ngs config must
have option 'ngs_mac_address' set. If 'switch_id' is set it will take
precedence over switch_info.

Change-Id: I0a03501701d2fd199af1df570e36a6d2a9df1250
2017-04-03 16:29:37 +03:00
John L. Villalovos
ee16329328 Do not 'enable_plugin networking-generic-switch' in grenade
We don't want to 'enable_plugin networking-generic-switch' in grenade as
it won't work for multi-node jobs.

Change-Id: I30b2088e8e50f697157dcff2841925b75e3f3672
2017-03-14 05:55:59 -07:00
Vasyl Saienko
3f323f53ad Enable ngs plugin in upgrade/settings
enable ngs service through devstack/upgrade/settings to support ironic
multinode grenade job.

Change-Id: I2a3f0f53804d35d4baa1c6458adb2d7e217ed1c6
2017-02-22 20:17:12 +00:00
Vasyl Saienko
d870d91568 Add grenade plugin
Initial setup of grenade plugin for networking-generic-switch as we
are going to have ironic + multitenancy job.

Change-Id: Ic880baecc12d13cf1ea7c7810585b63eecd2fc04
2017-02-07 22:04:23 +00:00
Pavlo Shchelokovskyy
d0e18c438b Remove workaround for deprecated Q_PLUGIN_EXTRA_*
Corresponding patch If9690cb44d235d97948574c01a3b64019aed0623
was merged to project-config.

Change-Id: If227ce843a669394c4fc8bf26e74cdcb4c4c269c
2017-01-12 12:25:49 +02:00
Pavlo Shchelokovskyy
a656b25d03 Remove deprecated Q_PLUGIN_EXTRA_CONF_* vars
Change-Id: I175dae2324cd1e486077edc5dd4b93989f4d7b02
2017-01-10 22:35:35 +00:00
Vasyl Saienko
0cdb42af9f Setup multinode aware config
When multinode topology is used we need to add information about all
subnode switches to the neutron config on the primary node.

Change-Id: I7187f190d7a8fb39aa151dc2d3174ae5d6d04ca6
2016-10-06 11:54:06 +00:00
Vasyl Saienko
6b01deca09 Remove duplicate SSH keys
After we added networking-generic-switch key, ensure that authorized
file doesn't contain duplicate keys.

Change-Id: Ieb06bea8227bf02411bad03c9b91963be8fc94ea
2016-09-02 13:48:58 +03:00
Vasyl Saienko
d49a73d30c Update devstack configure_generic_switch_ssh_keypair
When authorized_file doesn't contain new-line character at the end,
configure_generic_switch_ssh_keypair() just append new key to the
existed line, as result both keys becomes corrupted. The patch adds
a check for last character in the authorized_key file, if new-line
is missed add it.

Change-Id: I20e84c13db1db65e37b9be35991bd42792be5636
2016-08-18 14:36:11 +00:00
Serge Kovaleff
66387ed9c6 Add Tempest plugin
Change-Id: Iea2c32ca349312dc82a5928a43818d4a0719a92d
2016-08-08 15:40:11 +03:00
Zhenguo Niu
f3f8e7cdaa Add support for setting ovs ssh port in devstack
Change-Id: I74ac487b866243a9a29dfe96ccb6e049f3a49e52
Closes-Bug: #1584463
2016-06-03 16:37:55 +08:00
vsaienko
ef3fd6bd26 Preparing to release
* Add LICENSE
 * Add author-email
 * Add description-file

Depends-On: I33f0f5a6174d1d170bc2ac1c2e3a096d88d17cc1
Change-Id: I9d3895614d5c8db831080155a9add7a42f01e5f6
2016-05-13 10:45:17 +00:00
vsaienko
abef02b80d Add wait_for_openwswitch_agent function
Sometimes neutron opnwsitch agent can't start in time.
As result port can't be bound because of missing agent.
This patch adds wait_for_openwswitch_agent function that
allows to wait for openvswitch agent to start before
executing actual test.

Change-Id: Id99157a1db4f134b45eb68bbfeb1708ba5df9ddc
Closes-Bug: #1572531
2016-04-20 15:24:11 +03:00