Comment 1 for bug 1693701

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

I can't reproduce this bug with the steps indicated in the bug report:

# Add a new rule that's valid:
stack@openstack2:/opt/stack/python-manilaclient$ manila access-allow be096291-27ea-47bc-a5a2-8b48884269a9 ip 1.1.1.0/24
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| access_key | None |
| share_id | be096291-27ea-47bc-a5a2-8b48884269a9 |
| created_at | 2017-08-02T14:23:03.000000 |
| updated_at | None |
| access_type | ip |
| access_to | 1.1.1.0/24 |
| access_level | rw |
| state | queued_to_apply |
| id | 9549a577-266f-4200-aab5-b6a5516febf2 |
+--------------+--------------------------------------+

# Add an invalid rule:
stack@openstack2:/opt/stack/python-manilaclient$ manila access-allow be096291-27ea-47bc-a5a2-8b48884269a9 user test
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| access_key | None |
| share_id | be096291-27ea-47bc-a5a2-8b48884269a9 |
| created_at | 2017-08-02T14:23:10.000000 |
| updated_at | None |
| access_type | user |
| access_to | test |
| access_level | rw |
| state | queued_to_apply |
| id | b093c1b0-f479-4b54-857a-b791bbb89a36 |
+--------------+--------------------------------------+

# Check access rules on the share:
stack@openstack2:/opt/stack/python-manilaclient$ manila access-list be096291-27ea-47bc-a5a2-8b48884269a9
+--------------------------------------+-------------+------------+--------------+--------+------------+----------------------------+------------+
| id | access_type | access_to | access_level | state | access_key | created_at | updated_at |
+--------------------------------------+-------------+------------+--------------+--------+------------+----------------------------+------------+
| 9549a577-266f-4200-aab5-b6a5516febf2 | ip | 1.1.1.0/24 | rw | active | None | 2017-08-02T14:23:03.000000 | None |
| b093c1b0-f479-4b54-857a-b791bbb89a36 | user | test | rw | error | None | 2017-08-02T14:23:10.000000 | None |
+--------------------------------------+-------------+------------+--------------+--------+------------+----------------------------+------------+

# Check access_rules_status on the share:
stack@openstack2:/opt/stack/python-manilaclient$ manila list --columns id,status,access_rules_status
+--------------------------------------+-----------+---------------------+
| Id | Status | Access_Rules_Status |
+--------------------------------------+-----------+---------------------+
| be096291-27ea-47bc-a5a2-8b48884269a9 | available | error |
+--------------------------------------+-----------+---------------------+

# Deny the correct rule:
stack@openstack2:/opt/stack/python-manilaclient$ manila access-deny be096291-27ea-47bc-a5a2-8b48884269a9 9549a577-266f-4200-aab5-b6a5516febf2

# Check rules on the share
stack@openstack2:/opt/stack/python-manilaclient$ manila access-list be096291-27ea-47bc-a5a2-8b48884269a9
+--------------------------------------+-------------+-----------+--------------+-------+------------+----------------------------+------------+
| id | access_type | access_to | access_level | state | access_key | created_at | updated_at |
+--------------------------------------+-------------+-----------+--------------+-------+------------+----------------------------+------------+
| b093c1b0-f479-4b54-857a-b791bbb89a36 | user | test | rw | error | None | 2017-08-02T14:23:10.000000 | None |
+--------------------------------------+-------------+-----------+--------------+-------+------------+----------------------------+------------+

# Check the access rules status:
stack@openstack2:/opt/stack/python-manilaclient$ manila list --columns id,status,access_rules_status
+--------------------------------------+-----------+---------------------+
| Id | Status | Access_Rules_Status |
+--------------------------------------+-----------+---------------------+
| be096291-27ea-47bc-a5a2-8b48884269a9 | available | error |
+--------------------------------------+-----------+---------------------+