tests failing with :`Only volume-backed servers are allowed for flavors with zero disk on stein`

Bug #1841609 reported by Will Szumski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

  Traceback (most recent call last):
    File "tempest/api/compute/servers/test_create_server_multi_nic.py", line 107, in test_verify_duplicate_network_nics
      networks=networks, wait_until='ACTIVE')
    File "tempest/api/compute/base.py", line 246, in create_test_server
      **kwargs)
    File "tempest/common/compute.py", line 204, in create_test_server
      **kwargs)
    File "tempest/lib/services/compute/servers_client.py", line 101, in create_server
      resp, body = self.post('servers', post_body)
    File "tempest/lib/common/rest_client.py", line 283, in post
      return self.request('POST', url, extra_headers, headers, body, chunked)
    File "tempest/lib/services/compute/base_compute_client.py", line 48, in request
      method, url, extra_headers, headers, body, chunked)
    File "tempest/lib/common/rest_client.py", line 679, in request
      self._error_checker(resp, resp_body)
    File "tempest/lib/common/rest_client.py", line 780, in _error_checker
      raise exceptions.Forbidden(resp_body, resp=resp)
  tempest.lib.exceptions.Forbidden: Forbidden
  Details: {u'message': u'Only volume-backed servers are allowed for flavors with zero disk.', u'code': 403}

I believe the issue is that we are creating servers with a zero disk flavor:

https://github.com/openstack/rally-openstack/blob/25f17ce17f7e57060a94b5be1de4caf23632316f/rally_openstack/verification/tempest/context.py#L264

and the policy has changed in stein:

    The defalut value for policy rule
    ``os_compute_api:servers:create:zero_disk_flavor`` has changed from
    ``rule:admin_or_owner`` to ``rule:admin_api`` which means that by default,
    users without the admin role will not be allowed to create servers using
    a flavor with ``disk=0`` *unless* they are creating a volume-backed server.
    If you have these kinds of flavors, you may need to take action or
    temporarily override the policy rule. Refer to
    `bug 1739646 <https://launchpad.net/bugs/1739646>`_ for more details.

The question is what should we set the disk size to be for these auto generated flavors?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally-openstack (master)

Reviewed: https://review.opendev.org/678901
Committed: https://git.openstack.org/cgit/openstack/rally-openstack/commit/?id=824d8613235c52f9ec77b6698423f15dc1a8a086
Submitter: Zuul
Branch: master

commit 824d8613235c52f9ec77b6698423f15dc1a8a086
Author: Will Szumski <email address hidden>
Date: Tue Aug 27 17:28:23 2019 +0100

    Add option to configure flavor disk size

    Since stein, creating a instance with a zero disk flavor (and no volume)
    is an admin only operation (by default), see:

    https://review.opendev.org/#/c/603910/

    To support stein installations we should request some disk space.

    Change-Id: I185abfffb684666349a82b2c31bc885f87ef23d9
    Closes-Bug: #1841609

Changed in rally:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/rally-openstack 1.7.0

This issue was fixed in the openstack/rally-openstack 1.7.0 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.