[RFE] add user message for share creation failure because of no share-type

Bug #1870280 reported by Liron Kuchlani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Ashley Rodriguez
python-manilaclient
New
Undecided
Unassigned

Bug Description

Description of problem:
Although 'share type' is a mandatory argument while creating a share it is
displayed as an optional argument in the command description.

Version-Release number of selected component (if applicable):
python2-manilaclient-1.24.1-0.20180809180957.316bd21.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
# create a share without specifying share type.

(overcloud) [stack@undercloud-0 ~]$ manila create NFS 1 --name share1
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| status | creating |
| share_type_name | None |
| description | None |
| availability_zone | None |
| share_network_id | None |
| share_server_id | None |
| share_group_id | None |
| host | |
| revert_to_snapshot_support | False |
| access_rules_status | active |
| snapshot_id | None |
| create_share_from_snapshot_support | False |
| is_public | False |
| task_state | None |
| snapshot_support | False |
| id | 4c95b542-46c5-4200-a1f1-80a374bd9139 |
| size | 1 |
| source_share_group_snapshot_member_id | None |
| user_id | ceee86a910d54af1bc1a629022033da2 |
| name | share1 |
| share_type | None |
| has_replicas | False |
| replication_type | None |
| created_at | 2019-02-18T13:46:27.000000 |
| share_proto | NFS |
| mount_snapshot_support | False |
| project_id | fd808698c9c34580a92266ff52b11b0d |
| metadata | {} |
+---------------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+--------+------+-------------+--------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+--------+-----------+-----------------+------+-------------------+
| 4c95b542-46c5-4200-a1f1-80a374bd9139 | share1 | 1 | NFS | error | False | None | | None |
+--------------------------------------+--------+------+-------------+--------+-----------+-----------------+------+-------------------+

Actual results:
Share type is displayed as an optional argument in manila create command.

overcloud) [stack@undercloud-0 ~]$ manila help create
usage: manila create [--snapshot-id <snapshot-id>] [--name <name>]
                     [--metadata [<key=value> [<key=value> ...]]]
                     [--share-network <network-info>]
                     [--description <description>] [--share-type <share-type>]
                     [--public] [--availability-zone <availability-zone>]
                     [--share-group <share-group>]
                     <share_protocol> <size>

Creates a new share (NFS, CIFS, CephFS, GlusterFS, HDFS or MAPRFS).

Positional arguments:
  <share_protocol> Share protocol (NFS, CIFS, CephFS, GlusterFS, HDFS or
                        MAPRFS).
  <size> Share size in GiB.

Optional arguments:
  --snapshot-id <snapshot-id>, --snapshot_id <snapshot-id>
                        Optional snapshot ID to create the share from.
                        (Default=None)
  --name <name> Optional share name. (Default=None)
  --metadata [<key=value> [<key=value> ...]]
                        Metadata key=value pairs (Optional, Default=None).
  --share-network <network-info>, --share_network <network-info>
                        Optional network info ID or name.
  --description <description>
                        Optional share description. (Default=None)
############################
  --share-type <share-type>, --share_type <share-type>, --volume-type <share-type>, --volume_type <share-type>
                        Optional share type. Use of optional volume type is
                        deprecated. (Default=None)
############################
  --public Level of visibility for share. Defines whether other
                        tenants are able to see it or not.
  --availability-zone <availability-zone>, --availability_zone <availability-zone>, --az <availability-zone>
                        Availability zone in which share should be created.
  --share-group <share-group>, --share_group <share-group>, --group <share-group>
                        Optional share group name or ID in which to create the
                        share (Experimental, Default=None).

Expected results:
Share type should be displayed as a positional argument in manila create command.

Additional info:

manila-scheduler.log:
=====================
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/scheduler/manager.py", line 121, in create_share_instance
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server context, ex, request_spec)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server self.force_reraise()
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/scheduler/manager.py", line 111, in create_share_instance
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server filter_properties)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/scheduler/drivers/filter.py", line 84, in schedule_create_share
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server filter_properties)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/scheduler/drivers/filter.py", line 202, in _schedule_share
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server context, filter_properties, request_spec)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/scheduler/drivers/filter.py", line 145, in _format_filter_properties
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server raise exception.InvalidParameterValue(err=msg)
2019-02-18 13:46:28.090 1 ERROR oslo_messaging.rpc.server InvalidParameterValue: You must create a share type in advance, and specify in request body or set default_share_type in manila.conf.

Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
milestone: none → wallaby-3
Changed in manila:
milestone: wallaby-3 → none
milestone: none → xena-1
Changed in manila:
milestone: xena-1 → xena-2
assignee: Goutham Pacha Ravi (gouthamr) → nobody
Vida Haririan (vhariria)
Changed in manila:
assignee: nobody → Nahim Alves de Souza (nahimsouza)
milestone: xena-2 → xena-3
Vida Haririan (vhariria)
Changed in manila:
milestone: xena-3 → xena-2
assignee: Nahim Alves de Souza (nahimsouza) → nobody
importance: Medium → Undecided
Changed in manila:
assignee: nobody → Ashley Rodriguez (ashrod98)
Changed in manila:
importance: Undecided → Medium
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/800561
Committed: https://opendev.org/openstack/manila/commit/657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3
Submitter: "Zuul (22348)"
Branch: master

commit 657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3
Author: ashrod98 <email address hidden>
Date: Mon Jul 12 20:44:28 2021 +0000

    Add missing share-type user message

    Attempting to create a share without identifying a share type results in an
    error.This adds a user message informing the user that no default share type
    was identified while attempting to create a share.

    Closes-Bug: #1870280

    Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/manila/+/807941

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/manila/+/807941
Committed: https://opendev.org/openstack/manila/commit/7eca10bcb56574cd11fd6a929d87458b0aba20be
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 7eca10bcb56574cd11fd6a929d87458b0aba20be
Author: ashrod98 <email address hidden>
Date: Mon Jul 12 20:44:28 2021 +0000

    Add missing share-type user message

    Attempting to create a share without identifying a share type results in an
    error.This adds a user message informing the user that no default share type
    was identified while attempting to create a share.

    Closes-Bug: #1870280

    Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
    (cherry picked from commit 657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/manila/+/808820

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/manila/+/808820
Committed: https://opendev.org/openstack/manila/commit/faec95deac14ba295da54d2e49af7328700974cf
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit faec95deac14ba295da54d2e49af7328700974cf
Author: ashrod98 <email address hidden>
Date: Mon Jul 12 20:44:28 2021 +0000

    Add missing share-type user message

    Attempting to create a share without identifying a share type results in an
    error.This adds a user message informing the user that no default share type
    was identified while attempting to create a share.

    Closes-Bug: #1870280

    Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
    (cherry picked from commit 657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3)
    (cherry picked from commit 7eca10bcb56574cd11fd6a929d87458b0aba20be)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 13.0.0.0rc1

This issue was fixed in the openstack/manila 13.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/manila/+/809896

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/manila/+/809896
Committed: https://opendev.org/openstack/manila/commit/10473b8139c3f3576d79e4c614bbb477f9366190
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 10473b8139c3f3576d79e4c614bbb477f9366190
Author: ashrod98 <email address hidden>
Date: Mon Jul 12 20:44:28 2021 +0000

    Add missing share-type user message

    Attempting to create a share without identifying a share type results in an
    error.This adds a user message informing the user that no default share type
    was identified while attempting to create a share.

    Closes-Bug: #1870280

    Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
    (cherry picked from commit 657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3)
    (cherry picked from commit 7eca10bcb56574cd11fd6a929d87458b0aba20be)
    (cherry picked from commit faec95deac14ba295da54d2e49af7328700974cf)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/manila/+/810511

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/train)

Reviewed: https://review.opendev.org/c/openstack/manila/+/810511
Committed: https://opendev.org/openstack/manila/commit/dce33fe9c37f78b585d7453ef03e007c7e595278
Submitter: "Zuul (22348)"
Branch: stable/train

commit dce33fe9c37f78b585d7453ef03e007c7e595278
Author: ashrod98 <email address hidden>
Date: Mon Jul 12 20:44:28 2021 +0000

    Add missing share-type user message

    Attempting to create a share without identifying a share type results in an
    error.This adds a user message informing the user that no default share type
    was identified while attempting to create a share.

    Closes-Bug: #1870280

    Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
    (cherry picked from commit 657fa5b113ce1c0cd35a21d7eac4d446af9ce2d3)
    (cherry picked from commit 7eca10bcb56574cd11fd6a929d87458b0aba20be)
    (cherry picked from commit faec95deac14ba295da54d2e49af7328700974cf)
    (cherry picked from commit 10473b8139c3f3576d79e4c614bbb477f9366190)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 12.1.0

This issue was fixed in the openstack/manila 12.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 11.1.0

This issue was fixed in the openstack/manila 11.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 10.2.0

This issue was fixed in the openstack/manila 10.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila train-eol

This issue was fixed in the openstack/manila train-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.