Comment 2 for bug 1841128

Revision history for this message
Mitsuhiro Tanino (mitsuhiro-tanino) wrote :

Side effect of this bug is that once inconsistent quota configuration happens, user can exceed project quota(=20) even if user quota(=5) is smaller value. So the point is that once inconsistency happens both project and user quota doesn’t work properly.

❯❯❯ ./quota_show2.sh test1-project test1 test2
tenant_id=8da232c294f44ea186f9e1547bf87f71
user_id1=c828df4a8d01484a830b7c001fe70acb
user_id2=2fa464790ce24178b38e5735a4c0ca50
tenant
| instances | 10 |
user1
| instances | 10 |
user2
| instances | 10 |
❯❯❯ ./prj_inst_quota_update.sh test1-project -1
tenant_id=8da232c294f44ea186f9e1547bf87f71
Update project quota.
❯❯❯ ./usr_inst_quota_update.sh test1-project test2 5
tenant_id=8da232c294f44ea186f9e1547bf87f71
user_id=2fa464790ce24178b38e5735a4c0ca50
Update user quota.
❯❯❯ ./usr_inst_quota_update.sh test1-project test1 5
tenant_id=8da232c294f44ea186f9e1547bf87f71
user_id=c828df4a8d01484a830b7c001fe70acb
Update user quota.
❯❯❯ ./quota_show2.sh test1-project test1 test2
tenant_id=8da232c294f44ea186f9e1547bf87f71
user_id1=c828df4a8d01484a830b7c001fe70acb
user_id2=2fa464790ce24178b38e5735a4c0ca50
tenant
| instances | -1 |
user1
| instances | 5 |
user2
| instances | 5 |
 ~ ❯❯❯ ./prj_inst_quota_update.sh test1-project 2
tenant_id=8da232c294f44ea186f9e1547bstack001-upstream-jp2v-dev ~ ❯❯❯ ./quota_show2.sh test1-project test1 test2
tenant_id=8da232c294f44ea186f9e1547b001fe70acb
user_id2=2fa464790ce24178b38e5735a4c0ca50
tenant
| instances | 2 |
user1
| instances | 5 |
user2
| instances | 5 |
 ~ ❯❯❯ source openrc-test1
 ~ ❯❯❯ openstack server server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test
Quota exceeded for instances: Requested 5, but already used 0 of 2 instances (HTTP 403) (Request-ID: req-dc3ca7b3-3c55-459c-8c97-198c9692593a)
 ~ ❯❯❯ source openrc-admin
 ~ ❯❯❯ ./prj_inst_quota_update.sh test1-project 20
tenant_id=8da232c294f44ea186f9e1547
tenant_id=8da232c294f44ea186f9e1547b001fe70acb
user_id2=2fa464790ce24178b38e5735a4c0ca50
~ ❯❯❯ ./quota_show2.sh test1-project test1 test2
tenant
| instances | 20 |
user1
| instances | 5 |
user2
| instances | 5 |
 ~ ❯❯❯ source openrc-test1
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
      5 5 185
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
     10 10 370
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
     15 15 555
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
     20 20 740
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
     25 25 925
 ~ ❯❯❯ openstack server create --image cirros_3.5 --flavor m1.tiny --nic net-id=$(openue) --min 5 --max 5 test 2>&1 > /dev/null
 ~ ❯❯❯ openstack server list -c ID -f value | wc
     30 30 1110
❯❯❯ ./quota_show2.sh test1-project test1 test2
tenant_id=8da232c294f44ea186f9e1547bf87f71
user_id1=c828df4a8d01484a830b7c001fe70acb
user_id2=2fa464790ce24178b38e5735a4c0ca50
tenant
| instances | 20 |
user1
| instances | 5 |
user2
| instances | 5 |