Commit Graph

212 Commits

Author SHA1 Message Date
Kiran Pawar 558288e00a Add support for share/snapshot deferred deletion
Implements: bp/deferred-deletion
Change-Id: I9e55e1706fc0c3d9f65f73e13ba2a20f355c74f4
2024-03-12 14:22:25 +00:00
Takashi Kajinami 346ff0134c Drop upgrade scripts for old releases
These scripts are not used in recent releases.

Change-Id: I77db6f97d3f6226664e7b773d1d0b47db1a1dd5c
2024-01-17 03:03:40 +09:00
Takashi Kajinami 2c2788fa2d Drop logic for Ubuntu 14.04
... because support for Ubuntu Trusty was removed a long ago.

Change-Id: Ibab2c6e5154219c1dfbdf72326297ee5fd4fc406
2024-01-10 19:20:34 +09:00
Kiran Pawar 3a2d220f8a Update Share backup APIs and add api ref
- Follow up change to fix suggestions from earlier pull request i.e.
  https://review.opendev.org/c/openstack/manila/+/343980 .
- Add API-ref docs
- Rename column availability_zone to availability_zone_id in
  share_backups table.

Implement: blueprint share-backup
Closes-bug: #2031311
Change-Id: Ice01ab7892b1eb52b3202f2c79957977f73f3aca
2023-08-25 13:15:05 +00:00
Takashi Kajinami 5daf9bd6ca Stop overriding auth/identity options of tempest
... because these options are configured by devstack. This allows us to
honor some options which determine whether these accounts should be
used(eg. TEMPEST_HAS_ADMIN)

Also, this fixes the inconsistent default value of admin password (it
defaults to 'secret' in devstack).

Change-Id: I6221168ad400346bf1542ed7715c481295e42e04
2023-06-20 01:26:46 +00:00
Zuul fbd52a92e1 Merge "[devstack] Remove setting for tempest plugin" 2023-02-16 23:28:07 +00:00
Goutham Pacha Ravi e5cce5337e [devstack][RBAC] Update bootstrap user
We need an admin to setup share and group
types and per recent changes [1], this needs to
be a user with the "admin" role, operating
with "project" scope and not "system" scope.

Also remove a TODO in the code that was completed
with a prior SRBAC patch.

[1] https://review.opendev.org/c/openstack/manila/+/856394

Change-Id: I7bd2bca2bac6b892e7b8a07654d33a56d915e3bb
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-09-21 08:03:14 -07:00
Felipe Rodrigues 7ecc990686 Change to use iproute2 instead of brctl
brctl is being deprecated in some Linux distros, so
change container driver to start using iproute2 commands.

Closes-bug: #1877410
Change-Id: If679e79fa3242ee1cd8610b5525deca35b41c87e
2022-09-15 10:39:32 +00:00
Goutham Pacha Ravi 9fecc7a883 [devstack] Remove setting for tempest plugin
MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE is an
unused variable since 3b6ea36904.
This variable only makes sense in the stable/wallaby and
older branches and is recommended to be set to False;
the correct way of getting the tempest plugin installed
would be to use the "TEMPEST_PLUGINS" devstack setting.

Change-Id: I2d94d780d879053f0fa739ba61f77f956ec84cd4
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-08-23 07:05:54 -07:00
Felipe Rodrigues 79af79f07b Fix manila plugin.sh set backend_availability_zone
Manila plugin is setting the availability zone of the
backends without checking if it is set. As result, a CI
configuring that field will not be respected.

Fixed by only setting the field in case its value was
not set before. Otherwise, keep as it is.

Change-Id: I546e5f057f3b748417dcbcfe9c3f3ae4a5d51556
2022-06-27 11:20:32 -03:00
Takashi Kajinami 73b69fbd02 policy.json is no longer required
... because the policy rules are implemented in code. Also now Manila
uses policy.yaml instead of policy.json.

Change-Id: I4b03ec81a5a72491734ca1c76b50162399d5c370
2022-06-22 08:35:17 +09:00
silvacarloss aeb5fa0195 Increase RAM in manila flavor
Ubuntu Jammy was failing to spawn while using the manila flavor.
It was hitting kernel panic and complaining about memory. That
leads us to increase the flavor to be used in the manila service
image.

Depends-On: Id2d35ce592c73f0c731deb17a5d574f502fe64cb

Change-Id: Idd3e6a6fdb8cf13727cd674c76efd89b3aacfc52
2022-06-07 22:05:43 +00:00
Zuul 5e139f95b0 Merge "devstack: Support different ssh key format" 2022-05-27 04:38:52 +00:00
Takashi Kajinami 1a76b04936 devstack: Support different ssh key format
RSA key is no longer enabled by default in recent openssl library.
Because of this change, RSA key does not work in recent Fedora and
CentOS Stream 9 unless it is enabled somehow.

This introduces a new MANILA_KEY_FORMAT parameter to devstack plugin
so that a different ssh key format (eg. ecdsa) can be used.

Change-Id: Ibe60da0b06cade641002d5a1650c38aa57c2d131
2022-05-25 11:12:40 -03:00
Goutham Pacha Ravi 1674364fc3 Increase MANILA_SERVICE_VM_FLAVOR_DISK
To build the manila service image with
Ubuntu Jammy Jellyfish (22.04 LTS) we need
a slight bump in the storage allocated.

Change-Id: I1d60834c2045c069de25a1c8979c433d4dd50684
Related-bug: #1870412
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-05-12 12:15:59 +00:00
lkuchlan 466794964f Add enforce_scope setting support for Manila
Allow Manila for secure RBAC and set enforce_scope
for manila-tempest-plugin.

Change-Id: I3ae6efaa7d69690dca60e90b6d31dcdce9d9280d
2021-12-26 11:56:28 +02:00
Goutham Pacha Ravi 1caecc598e Set tempest api version config in devstack plugin
manila's tempest plugin is branchless and can at
any time add tests for API microversions incompatible
with stable branches.

We used to configure test API versions via the post test
hook when relying on devstack-gate. However, API version
config makes sense whenever we use devstack and have
tempest enabled. This will help us simplify default
job configuration in the manila-tempest-plugin repository.

Since the API version won't change on a stable branch,
hard-coding the versions (as other micro-versioned services
do in their devstack) doesn't pose any risk of failing
reality.

Change-Id: Ia671fa74c0ee338199bd92a1613882328d24c9e2
Related-Bug: #1928879
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-12-22 12:12:08 -08:00
Goutham Pacha Ravi 6943b31697 [devstack] Use OSC to set up share types
We used a workaround to solve the lack of legacy credentials
in our devstack plugin script by sourcing credentials early [1].

This workaround breaks when using the devstack-system-admin
persona from the /etc/openstack/clouds.yaml that devstack
sets up, because we'd be sourcing project credentials that aren't
popped off in time [2]. Cloud profiles work with OSC, we could
switch to that in the devstack plugin rather than rely on legacy
credential helpers from devstack. The only remaining piece is the
group type setup [3] which is expected to be complete soon.

[1] https://review.opendev.org/c/openstack/manila/+/818617
[2] https://review.opendev.org/c/openstack/devstack/+/817074
[3] https://review.opendev.org/c/openstack/python-manilaclient/+/805064

Change-Id: Icc15f427cc02054021fa23626ea14e6cd37b18fb
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-12-02 15:43:19 -08:00
Zuul 469e547b88 Merge "Modify docker instalation for fedora systems" 2021-11-23 12:33:08 +00:00
silvacarloss 792207100b Source admin credentials for manila setup
A change that stops loading credentials from userrc_early file [1]
was merged. Creating resources using the python-manilaclient
requires some parameters that were set while loading such file.

This change starts loading the credentials during the manila setup,
so the client can normally create the resources.

Change-Id: Id872f6e62b6464544a4edfbc2d3e7c954042f6e2
2021-11-19 15:03:10 -03:00
silvacarloss 7500d22bca Modify docker instalation for fedora systems
Use install_package instead of using a specific package manager
while installing docker on fedora systems. With DNF also a
possibility, the better option is to do not take a stand in chosing
which package manager will be used to install packages.

We have a install_package function that will use the appropriate
package manager to install the programs we need to install.

Change-Id: I0524554dae2d6970191ba3afa583480c391b5c3c
2021-11-11 18:59:40 -03:00
Takashi Kajinami 87382e1417 Replace deprecated scheduler filter module name
manila.scheduler.filter_scheduler.*Scheduler was deprecated long ago[1]
in favor of new manila.scheduler.drivers.filter.*Scheduler.

[1] 3ffb4979f3

Change-Id: I40349cbe106f688a67043a73f8563f87f069831b
2021-07-23 21:20:00 +09:00
Goutham Pacha Ravi 3b6ea36904 [devstack] Drop manila-tempest-plugin installation
This method of installing manila-tempest-plugin
was deprecated several releases ago, but compatibility
was maintained for third party CI jobs. Since sufficient
time has passed allowing third party CI to adopt,
lets drop this from the devstack plugin

Change-Id: I59ffe6ebe4b2e80be1e6ae97872cf4db6527da62
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-21 10:18:56 -07:00
Goutham Pacha Ravi 27f01aaa76 [devstack] Setup a "shared-file-system" service
A few releases ago, service types were standardized
across OpenStack [1] and manila's service type was
recommended as "shared-file-system" [2]. Tools were
meant to look at the service-types-authority [3]
and os-service-types repository [4] to find a list
of standard service type names for various first
party OpenStack services.

The openstacksdk currently relies on the service
type to be "shared-file-system" [5], so let's set
one up in devstack, to aid contributors working on
openstacksdk.

It is desirable to have all clients to initially
look for the standard service type name in the
cloud's service catalog, and fall back to the
legacy name ("sharev2") in environments that
call the v2 API that.

[1] https://specs.openstack.org/openstack/service-types-authority/
[2] https://service-types.openstack.org/service-types.json
[3] https://opendev.org/openstack/service-types-authority
[4] https://opendev.org/openstack/os-service-types
[5] f4dd6fe5fd/openstack/_services_mixin.py (L71-L72)

Change-Id: I6a1ada102a40f3e83fe8e5287856d01dd137ea95
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-02-04 23:44:11 -08:00
Goutham Pacha Ravi 9efcb475cf [devstack] create endpoint without project_id
As of API version 2.60, a project_id is no
longer needed in the API URLs. We can stop
devstack from setting up an endpoint with
project_id in it.

Create a "sharev2_legacy" endpoint that
contains the project_id for testing the
compatibility with the older style of URLs.

Change-Id: I25aeb1b6dd1a4150c6e542e29b7d43e18d9ad94c
Implements: bp remove-project-id-from-urls
Depends-On: I5127e150e8a71e621890f30dba6720b3932cf583
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-02-05 07:25:31 +00:00
liviacavalcanti be794fb168 Remove backend deprecated variables
MANILA_MULTI_BACKEND has been deprecated for five years now, we should remove
it from our code base.

This variable was removed from the settings scripts along with:
MANILA_BACKEND1_CONFIG_GROUP_NAME and MANILA_SHARE_BACKEND1_NAME;
MANILA_BACKEND2_CONFIG_GROUP_NAME and MANILA_SHARE_BACKEND2_NAME.
Because they work in the same context.

Instead of them, the already implemented and in use,
MANILA_ENABLED_BACKENDS variable was placed to garantee the successful
back-end setup. The same replacement was made in the contribution
samples scripts.

Apart from this, we avoid configuring generic1 and generic2 if
another backend/s are selected.

Closes-Bug: #1898791
Closes-Bug: #1878477

Change-Id: I67036a65da9255694a00a9c8d56cfdefbdf23c05
2021-01-27 10:14:42 +00:00
Victoria Martinez de la Cruz d7d83a3f3b Uses local variable with ipv4 gateway config
We were using an env var with the IPv4 gateway config
that is not always present. This was causing devstack to fail
in developer environment. Use the local variable instead.

Closes-Bug: #1910760
Change-Id: Iede8a9e59b96d0f21c117ab1464a0a9e3477c24b
2021-01-08 14:34:57 +00:00
Tom Barron 39734a70c5 Stop manila when unstacking
When you run unstack.sh from devstack, other devstack
services are stopped and disabled to provide a clean environment
for a restack, but manila services are left running.

This doesn't matter for CI where a new VM is stood up for each
devstack but it's inconvenient for local devstack and if you
restack without restarting the services manually the results you
see may not actually match the environment you intended.

Change-Id: I6761619042e4bc36ec2f1cab4be33cb1b39d00d7
2020-12-11 09:52:30 -05:00
Douglas Viroel 39efc2bde8 Add share server migration
This patch adds support for migration of share servers. This
migration is performed using a two-phase approach. Administrators
are now able to request the migration of a share server within and
across backends, with the possibility of chooosing a different share
network for the destination share server.

- A new field called `task_state` was added to the share server
  model in order to help the administrator to track the share server
  migration steps. A new field called `source_share_server_id` was
  added to link destination and source share servers.

- A new periodic task was added to track migration of share servers
  and its resources.

- Two new states were added: `server_migrating` and
  `server_migrating_to` to represent that share migration is in
  progress.

- When performing the server migration, manila will not go to the
  scheduler, instead it will provide a request spec to drivers
  during migration check driver call. It'll be up to the driver
  validate if there is free space to handle the share server.

- A new API called `share-server-migration-check' was added to
  check the feasibility of a migration, before actually triggering
  the start operation.

APIImpact
DocImpact
Partially Implements: bp share-server-migration

Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>
Co-Authored-By: Carlos Eduardo <ces.eduardo98@gmail.com>
Co-Authored-By: Felipe Rodrigues <felipefuty01@gmail.com>

Change-Id: Ic0751027d2c3f1ef7ab0f7836baff3070a230cfd
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2020-09-10 08:52:08 -03:00
Goutham Pacha Ravi 660355eb86 Zuulv3 native grenade job
The existing "manila-grenade" job relies on
devstack-gate, a deprecated project. The Grenade
project now has a native zuulv3 style job that
we can inherit and run manila's upgrade tests.

Manila's grenade tests are only going to run
API tests, and hence this grenade job doesn't
have to enable nova, cinder, glance, neutron
and swift. However, bug #1887835 prevents
us from disabling nova at the moment,
and nova requires glance, placement and neutron
to be deployed, so we'll be enabling these
services too until that bug is addressed.

Depends-On: Id5a9467247df1d8f0ec6dee3fae842ba673c34ed
Depends-On: Ieaf37ec10db9a8bdce6bb195b76335fea9b2b52f
Change-Id: I1636c612ac2475f7a00c0888ef62daa6c516eef2
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-07-28 01:07:00 +00:00
Goutham Pacha Ravi 8cccb73f46 Add verify-noapi testcase to grenade
Switch to using the LVM driver in the grenade
job that allows us to add a minor data
path test to prove that upgrading manila
has no impact on data path connectivity
to resources created by manila.

Change-Id: I8588e8f988d85dc64e19e7a44a25c3dd0b776892
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-07-23 14:40:34 -07:00
Goutham Pacha Ravi 9906359829 Add plugin name to devstack/settings
Needed for zuulv3 jobs that use two
devstack plugins that need to be invoked
in a pre-defined order [1]

[1] https://docs.openstack.org/devstack/latest/plugins.html#plugin-interface

Change-Id: I44117debfc5b7cdef6acb706786963ec81f59db7
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-07-16 15:43:04 -07:00
junboli 1982b90c07 Fix NFS/CIFS share creation failure issue
When the image count is over 25, there might not get
manila-service-image, because current manila shares
creation is using novaclient to get image info, but
novaclient can only get 25 images due to pagination
of glance server, So this change is to switch to use
glanceclient instead of novaclient to get image info,
because glanceclient can iter all image info, while
novaclient is rarely maintained with stuff of image
API.

Change-Id: Id1715d0b9cb3a4aeedeb23d9b1d9924a78d18dc6
Closes-Bug: #1741425
2020-06-30 12:46:28 -04:00
Douglas Viroel fbcabd2c03 Fix uwsgi path location
After fixing the uwsgi installation from source that was broken[1][2],
Manila jobs started to fail since no uwsgi wasn't found in the
expected path. This fix now uses 'which' command to search for
uwsgi pathnames in the system.

[1] https://bugs.launchpad.net/devstack/+bug/1883468
[2] https://review.opendev.org/#/c/577955/

Related-Bug: #1883468
Closes-Bug: #1883715
Change-Id: I8d8b2fe07d86899c694cb73a81087d25311d30a5
2020-06-16 11:27:22 -03:00
Goutham Pacha Ravi 341b5777b2 [devstack] Allow cephfs daemon port access
If the cephfs protocol is enabled, clients
need to access the ceph daemons.

We also don't need to enable access to NFS
ports when not using NFS.

Change-Id: I077d12785f94c940716f0e479d43dbb29ddc3c3c
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-05-27 12:46:55 -07:00
Zuul ec6e48588a Merge "[devstack][ci] Fix floatingip allocation" 2020-05-18 21:44:26 +00:00
Zuul 79784bac42 Merge "[devstack][ci] Set public network ID in tempest.conf" 2020-05-07 01:51:42 +00:00
Goutham Pacha Ravi 47c8debfeb [devstack][ci] Set public network ID in tempest.conf
When running IPv6 tests, we disable the creation of
the public network in devstack, and handle it in the
devstack plugin. So, we'll need to configure it
in tempest in the plugin.

Change-Id: Icf5f26397e16d7fbfae77aa246ac5e35581f441e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-05-04 22:25:48 -07:00
Goutham Pacha Ravi 3b509399e3 [ci][devstack] Install bridge-utils for Container driver
Devstack no longer installs this package after [1]. The driver
needs to replace the use of brctl to completely remove this
package from our test environments.

[1] https://review.opendev.org/724443/
Partial-Bug: #1876820

Change-Id: Id6094827341bf6ef8856cd4e7af11b36e9afb560
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-05-04 14:48:52 -07:00
Goutham Pacha Ravi 2277c20c02 [devstack][ci] Move bgp setup to plugin
We currently use a legacy devstack-gate script
to create the bgp speaker, and peer required
to communicate to and from the tenant private
IPv6 networks.

Move this logic to the devstack plugin so that
we can invoke it automatically with the existing
devstack variable MANILA_SETUP_IPV6.

Change-Id: Iea90e3f04ae05e5783c3163bbf2d2dabd128c7b5
2020-05-01 16:51:45 +00:00
Zuul 8530f07406 Merge "[devstack][ci] Modify firewall in ds-plugin" 2020-05-01 11:14:05 +00:00
Goutham Pacha Ravi 5998d04e79 [devstack][ci] Fix floatingip allocation
A fix was committed [1] to the python-openstackclient
project to handle VMs with multiple ports. We can
drop the workaround of setting a floating IP to the
VM's port.

[1] 013c9a4f3a

Change-Id: I67c38b4e6695c05a8272a86448ed248b492a279d
Closes-Bug: #1747721
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-30 11:19:40 -07:00
Goutham Pacha Ravi 36b1715e86 [devstack][ci] Modify firewall in ds-plugin
To set up some first party backends such as
ZFSOnLinux, CephFS via NFS gateway, Container
(where the NAS server is containerized) and LVM,
manila's devstack plugin creates a NAS server
on the devstack host.

On test machines, access to this NAS server is
firewalled from networks outside of the host's
internal network namespace (including from private
project networks that are in different network
namespaces, on the same devstack host).

We currently use a legacy devstack-gate script
to disable firewall on NFS ports; however,
anyone that installs devstack with LVM, Container,
ZFSOnLinux, CephFS-NFS drivers will need these
firewall ports to be opened to be able to mount
shares exported off their devstack host machines.

Move these firewall commands to the devstack plugin.
These commands can be invoked by setting the localrc
variable MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST to True.
The value of this variable is False by default,
to preserve existing behavior.

Change-Id: Ic9cad47662f1edf2e5c710dbe64d580bc5f01d44
2020-04-29 21:15:21 +00:00
Goutham Pacha Ravi ffb283a04a [devstack][ci] Stop requiring g-reg service
When using manila's devstack plugin, we pull down
the latest manila testing image created with the
manila-image-elements project, and upload it to the
stack's Glance/Image service.

Glance's V2 API no longer needs g-reg which was a
legacy database proxy service for the older glance
API. Our devstack plugin should not have a hard
dependency on this service.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-May/094773.html
[2] https://specs.openstack.org/openstack/glance-specs/specs/newton/approved/glance/deprecate-registry.html

Change-Id: I58603032fb215ac0be2f76c8cd9fbce775be41dd
Closes-Bug: #1859847
2020-04-28 16:44:59 -07:00
Goutham Pacha Ravi 52cbbcb04e [grenade] Switch base version
Grenade jobs need to test Ussuri-->Victoria (dev)
upgrades in the master branch.

Change-Id: I95d1efb35f1c3c311071448117406bc275281e43
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-26 23:50:29 +00:00
Goutham Pacha Ravi e0da21fe8d [CI] Fix grenade share networks test
This job fails because it's expecting network subnet
details to be in a format that was revised in API version
2.51.

This change can be backported to stable/ussuri
and only impacts the CI.

Change-Id: I3731e6acffccd2ecb398f3b5cf81a5f294c51f45
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-26 23:50:23 +00:00
Zuul 10d5cbf639 Merge "Enable the use scheduler creating share from snapshot flag" 2020-04-14 19:01:00 +00:00
Tom Barron c0ee00f2c7 Increase MANILA_SERVICE_VM_FLAVOR_DISK
The manila service image was recently rebuilt and is
now bigger than 2 Gibibytes so increase it to 3, which
should last us for a while.

Closes-bug: #1870412

Change-Id: Ia03e48a3f0ff352b94a0224f76f278ef45acad93
2020-04-02 21:03:27 +00:00
Goutham Pacha Ravi 6f79bb6c89 Fix URLs in code and documentation
TrivialFix

Change-Id: I21863f7fdad2bdd5dee226a3f6872d25b1c4f8ad
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-03-18 18:59:27 -07:00
andrebeltrami 5088177006 Enable the use scheduler creating share from snapshot flag
This patch enables the use scheduler creating share from
snapshot flag in order to run properly the manila tempest tests.

Partially-implements: bp create-share-from-snapshot-in-another-pool-or-backend

Change-Id: I15311089c45be1574857d46caa073e89424e716d
2020-03-11 17:38:21 +00:00