HNAS: Fix the wrong parameter to set username

This change fixes the wrong parameter to set username of HNAS share
driver. The hitachi_hnas_username parameter has never been implemneted
and should be ``hitachi_hnas_user`` instead.

The user parameter is required by the driver, and the driver can't
start with the current wrong settings.

Because the configuration has been 'broken' since 2016, it'd be fair to
assume no user is using this actually. So the parameter is directly
renamed without deprecation step.

Closes-Bug: #1968514
Change-Id: I247dac538afc85544cc9e41d37a029806321e009
This commit is contained in:
Takashi Kajinami 2022-04-11 11:02:14 +09:00
parent b101d43812
commit 69bdd9e018
5 changed files with 32 additions and 25 deletions

View File

@ -5,7 +5,7 @@
#
# === Parameters
#
# [*hitachi_hnas_username*]
# [*hitachi_hnas_user*]
# (required) Denotes the username credential used to manage HNAS through
# management interface.
#
@ -48,7 +48,7 @@
#
# manila::backend::hitachi_hnas { 'HITACHI1':
# driver_handles_share_servers => false,
# hitachi_hnas_username => 'supervisor',
# hitachi_hnas_user => 'supervisor',
# hitachi_hnas_password => 'supervisor',
# hitachi_hnas_ip => '172.24.44.15',
# hitachi_hnas_evs_id => '1',
@ -57,7 +57,7 @@
# }
define manila::backend::hitachi_hnas (
$hitachi_hnas_username,
$hitachi_hnas_user,
$hitachi_hnas_password,
$hitachi_hnas_ip,
$hitachi_hnas_evs_id,
@ -77,15 +77,15 @@ define manila::backend::hitachi_hnas (
$hitachi_share_driver = 'manila.share.drivers.hitachi.hds_hnas.HDSHNASDriver'
manila_config {
"${share_backend_name}/share_driver": value => $hitachi_share_driver;
"${share_backend_name}/driver_handles_share_servers": value => $driver_handles_share_servers;
"${share_backend_name}/backend_availability_zone": value => $backend_availability_zone;
"${share_backend_name}/hitachi_hnas_username": value => $hitachi_hnas_username;
"${share_backend_name}/hitachi_hnas_password": value => $hitachi_hnas_password, secret => true;
"${share_backend_name}/hitachi_hnas_ip": value => $hitachi_hnas_ip;
"${share_backend_name}/hitachi_hnas_evs_id": value => $hitachi_hnas_evs_id;
"${share_backend_name}/hitachi_hnas_evs_ip": value => $hitachi_hnas_evs_ip;
"${share_backend_name}/hitachi_hnas_file_system_name": value => $hitachi_hnas_file_system_name;
"${share_backend_name}/share_driver": value => $hitachi_share_driver;
"${share_backend_name}/driver_handles_share_servers": value => $driver_handles_share_servers;
"${share_backend_name}/backend_availability_zone": value => $backend_availability_zone;
"${share_backend_name}/hitachi_hnas_user": value => $hitachi_hnas_user;
"${share_backend_name}/hitachi_hnas_password": value => $hitachi_hnas_password, secret => true;
"${share_backend_name}/hitachi_hnas_ip": value => $hitachi_hnas_ip;
"${share_backend_name}/hitachi_hnas_evs_id": value => $hitachi_hnas_evs_id;
"${share_backend_name}/hitachi_hnas_evs_ip": value => $hitachi_hnas_evs_ip;
"${share_backend_name}/hitachi_hnas_file_system_name": value => $hitachi_hnas_file_system_name;
}
ensure_packages('nfs-client', {

View File

@ -7,7 +7,7 @@
# (required) Denotes whether the driver should handle the responsibility of
# managing share servers. This must be set to false.
#
# [*hitachi_hnas_username*]
# [*hitachi_hnas_user*]
# (required) Denotes the username credential used to manage HNAS through
# management interface.
#
@ -36,7 +36,7 @@
#
# manila::backend::hds_hnas { 'HITACHI1':
# driver_handles_share_servers => false,
# hitachi_hnas_username => 'supervisor',
# hitachi_hnas_user => 'supervisor',
# hitachi_hnas_password => 'supervisor',
# hitachi_hnas_ip => '172.24.44.15',
# hitachi_hnas_evs_id => '1',
@ -45,7 +45,7 @@
# }
#
class manila::share::hitachi_hnas (
$hitachi_hnas_username,
$hitachi_hnas_user,
$hitachi_hnas_password,
$hitachi_hnas_ip,
$hitachi_hnas_evs_id,
@ -57,7 +57,7 @@ class manila::share::hitachi_hnas (
manila::backend::hitachi_hnas { 'DEFAULT':
driver_handles_share_servers => $driver_handles_share_servers,
hitachi_hnas_username => $hitachi_hnas_username,
hitachi_hnas_user => $hitachi_hnas_user,
hitachi_hnas_password => $hitachi_hnas_password,
hitachi_hnas_ip => $hitachi_hnas_ip,
hitachi_hnas_evs_id => $hitachi_hnas_evs_id,

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixed the wrong user name parameter of HNAS share driver. Because of this
fix, the ``hitachi_hnas_username`` parameters was renamed to
``hitachi_hnas_user``. See `Launchpad bug 1968514
<https://launchpad.net/bugs/1968514>`_ for more details.

View File

@ -6,7 +6,7 @@ describe 'manila::share::hitachi_hnas' do
{
:driver_handles_share_servers => false,
:hitachi_hnas_ip => '172.24.44.15',
:hitachi_hnas_username => 'supervisor',
:hitachi_hnas_user => 'supervisor',
:hitachi_hnas_password => 'supervisor',
:hitachi_hnas_evs_id => '1',
:hitachi_hnas_evs_ip => ' 172.24.53.1',

View File

@ -6,14 +6,14 @@ describe 'manila::backend::hitachi_hnas' do
let :params do
{
:driver_handles_share_servers => false,
:hitachi_hnas_ip => '172.24.44.15',
:hitachi_hnas_username => 'supervisor',
:hitachi_hnas_password => 'supervisor',
:hitachi_hnas_evs_id => '1',
:hitachi_hnas_evs_ip => ' 172.24.53.1',
:hitachi_hnas_file_system_name => 'FS-Manila',
:backend_availability_zone => 'my_zone',
:driver_handles_share_servers => false,
:hitachi_hnas_ip => '172.24.44.15',
:hitachi_hnas_user => 'supervisor',
:hitachi_hnas_password => 'supervisor',
:hitachi_hnas_evs_id => '1',
:hitachi_hnas_evs_ip => ' 172.24.53.1',
:hitachi_hnas_file_system_name => 'FS-Manila',
:backend_availability_zone => 'my_zone',
}
end