Test case 1:- Nova-cloud-controller charm upgrade +++++++++++++++++++++++++++++++++++++++++++++++++ 1. Deploy OpenStack Train release using stsstack ------------------------------------------------ $ juju status Model Controller Cloud/Region Version SLA Timestamp bionic-train hemanth-n stsstack/stsstack 2.7.5 unsupported 03:40:19Z App Version Status Scale Charm Store Rev OS Notes cinder 15.0.1 active 1 cinder jujucharms 405 ubuntu glance 19.0.0 active 1 glance jujucharms 405 ubuntu keystone 16.0.0 active 1 keystone jujucharms 489 ubuntu mysql 5.7.20 active 1 percona-cluster jujucharms 364 ubuntu neutron-api 15.0.1 active 1 neutron-api jujucharms 440 ubuntu neutron-gateway 15.0.1 active 1 neutron-gateway jujucharms 411 ubuntu neutron-openvswitch 15.0.1 active 1 neutron-openvswitch jujucharms 397 ubuntu nova-cloud-controller 20.0.1 active 1 nova-cloud-controller jujucharms 479 ubuntu nova-compute 20.0.1 active 1 nova-compute jujucharms 489 ubuntu placement 2.0.0 active 1 placement jujucharms 11 ubuntu rabbitmq-server 3.6.10 active 1 rabbitmq-server jujucharms 364 ubuntu Unit Workload Agent Machine Public address Ports Message cinder/0* active idle 0 10.5.0.67 8776/tcp Unit is ready glance/0* active idle 1 10.5.0.24 9292/tcp Unit is ready keystone/0* active idle 2 10.5.0.64 5000/tcp Unit is ready mysql/0* active idle 3 10.5.0.38 3306/tcp Unit is ready neutron-api/0* active idle 4 10.5.0.54 9696/tcp Unit is ready neutron-gateway/0* active idle 5 10.5.0.51 Unit is ready nova-cloud-controller/0* active idle 6 10.5.0.17 8774/tcp,8775/tcp Unit is ready nova-compute/0* active idle 7 10.5.0.14 Unit is ready neutron-openvswitch/0* active idle 10.5.0.14 Unit is ready placement/0* active idle 8 10.5.0.34 8778/tcp Unit is ready rabbitmq-server/0* active idle 9 10.5.0.45 5672/tcp Unit is ready Machine State DNS Inst id Series AZ Message 0 started 10.5.0.67 2a60995f-0c7b-405c-98f3-d078d68e9208 bionic nova ACTIVE 1 started 10.5.0.24 1fcee0c2-9101-403e-95e1-d6f617e14122 bionic nova ACTIVE 2 started 10.5.0.64 2d23ab1b-c1f3-4e1e-8b11-89a3ed599b1d bionic nova ACTIVE 3 started 10.5.0.38 0f0e9f04-2553-4a00-b124-1f7d1e052a83 bionic nova ACTIVE 4 started 10.5.0.54 f4883f43-b1a2-4fe3-bcf4-26f65d84a89e bionic nova ACTIVE 5 started 10.5.0.51 5029fefe-511d-4f1c-8c95-0165978df6ee bionic nova ACTIVE 6 started 10.5.0.17 530b6c35-0956-4280-aff4-b0b2819781ac bionic nova ACTIVE 7 started 10.5.0.14 760c18c8-53b7-4902-8a93-35e24467add8 bionic nova ACTIVE 8 started 10.5.0.34 36ed4d7f-edd9-431d-a5cc-11a016e3f86d bionic nova ACTIVE 9 started 10.5.0.45 0b59045b-b892-42fb-b476-6c194955499e bionic nova ACTIVE 2. Upgrade nova-cloud-controller charm ( to commit https://review.opendev.org/#/c/715182/ ) ------------------------------------------------------------------------------------------- $ juju upgrade-charm nova-cloud-controller --debug --show-log --verbose --path /home/ubuntu/charms/layers/nova-cloud-controller 03:41:34 INFO juju.cmd supercommand.go:83 running juju [2.7.5 gc go1.10.4] 03:41:34 DEBUG juju.cmd supercommand.go:84 args: []string{"/snap/juju/11125/bin/juju", "upgrade-charm", "nova-cloud-controller", "--debug", "--show-log", "--verbose", "--path", "/home/ubuntu/charms/layers/nova-cloud-controller"} 03:41:34 INFO juju.juju api.go:67 connecting to API addresses: [10.5.0.22:17070 252.0.22.1:17070] 03:41:34 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://10.5.0.22:17070/model/87f22be6-0524-4dad-8ed8-f23a7abe2782/api" 03:41:34 INFO juju.api apiclient.go:624 connection established to "wss://10.5.0.22:17070/model/87f22be6-0524-4dad-8ed8-f23a7abe2782/api" 03:41:34 INFO juju.juju api.go:302 API endpoints changed from [252.0.22.1:17070 10.5.0.22:17070] to [10.5.0.22:17070 252.0.22.1:17070] 03:41:34 INFO juju.juju api.go:67 connecting to API addresses: [10.5.0.22:17070 252.0.22.1:17070] 03:41:34 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://10.5.0.22:17070/api" 03:41:34 INFO juju.api apiclient.go:624 connection established to "wss://10.5.0.22:17070/api" 03:41:34 INFO juju.juju api.go:302 API endpoints changed from [252.0.22.1:17070 10.5.0.22:17070] to [10.5.0.22:17070 252.0.22.1:17070] 03:41:35 DEBUG httpbakery client.go:243 client do POST https://10.5.0.22:17070/model/87f22be6-0524-4dad-8ed8-f23a7abe2782/charms?revision=501&schema=local&series=bionic { 03:41:44 DEBUG httpbakery client.go:245 } -> error 03:41:44 INFO cmd upgradecharm.go:377 Added charm "local:bionic/nova-cloud-controller-501" to the model. 03:41:44 INFO cmd upgradecharm.go:438 Leaving endpoints in "alpha": admin, amqp, amqp-cell, certificates, cinder-volume-service, cloud-compute, cloud-controller, cluster, ha, identity-service, image-service, internal, memcache, neutron-api, nova-cell-api, nova-vmware, nrpe-external-master, placement, public, quantum-network-service, shared-db, shared-db-cell 03:41:44 DEBUG juju.api monitor.go:35 RPC connection died 03:41:44 INFO cmd supercommand.go:525 command finished $ juju status nova-cloud-controller Model Controller Cloud/Region Version SLA Timestamp bionic-train hemanth-n stsstack/stsstack 2.7.5 unsupported 03:47:34Z App Version Status Scale Charm Store Rev OS Notes nova-cloud-controller 20.0.1 active 1 nova-cloud-controller local 501 ubuntu Unit Workload Agent Machine Public address Ports Message nova-cloud-controller/0* active idle 6 10.5.0.17 8774/tcp,8775/tcp Unit is ready Machine State DNS Inst id Series AZ Message 6 started 10.5.0.17 530b6c35-0956-4280-aff4-b0b2819781ac bionic nova ACTIVE 3. Launch an instance and verify Quota usage -------------------------------------------- $ ./tools/instance_launch.sh 1 bionic + openstack server create --wait --image bionic --flavor m1.small --key-name testkey --nic net-id=24e822c0-95cd-4606-834d-87d59e88a321 --min 1 --max 1 bionic-035116 $ openstack server list +--------------------------------------+---------------+--------+------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------+--------+------------------------+--------+----------+ | efc8f7d5-cad9-413e-b68e-0b4d9125f212 | bionic-035116 | ACTIVE | private=192.168.21.161 | bionic | m1.small | +--------------------------------------+---------------+--------+------------------------+--------+----------+ $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 1 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 2048 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ 4. Shelve the instance and observe quota usage. There should not be any change in quota usage. ---------------------------------------------------------------------------------------------- $ openstack server shelve bionic-035116 $ openstack server list +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ | efc8f7d5-cad9-413e-b68e-0b4d9125f212 | bionic-035116 | SHELVED_OFFLOADED | private=192.168.21.161 | bionic | m1.small | +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 1 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 2048 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ 5. Enable nova-cloud-controller parameter quota-count-usage-from-placement -------------------------------------------------------------------------- $ juju config nova-cloud-controller quota-count-usage-from-placement=True $ juju status nova-cloud-controller Model Controller Cloud/Region Version SLA Timestamp bionic-train hemanth-n stsstack/stsstack 2.7.5 unsupported 04:01:00Z App Version Status Scale Charm Store Rev OS Notes nova-cloud-controller 20.0.1 active 1 nova-cloud-controller local 501 ubuntu Unit Workload Agent Machine Public address Ports Message nova-cloud-controller/0* active idle 6 10.5.0.17 8774/tcp,8775/tcp Unit is ready Machine State DNS Inst id Series AZ Message 6 started 10.5.0.17 530b6c35-0956-4280-aff4-b0b2819781ac bionic nova ACTIVE 6. Now observe Quota usage. Shelved instances are not considered in the calculation ----------------------------------------------------------------------------------- $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 0 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 0 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ 7. Unshelve the instance and observe quota usage is updated ----------------------------------------------------------- $ openstack server unshelve bionic-035116 $ openstack server list +--------------------------------------+---------------+--------+------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------+--------+------------------------+--------+----------+ | efc8f7d5-cad9-413e-b68e-0b4d9125f212 | bionic-035116 | ACTIVE | private=192.168.21.161 | bionic | m1.small | +--------------------------------------+---------------+--------+------------------------+--------+----------+ $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 1 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 2048 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ Test Case 2:- OpenStack Upgrade from Stein to Train +++++++++++++++++++++++++++++++++++++++++++++++++++ 1. Deploy OpenStack stein release using stsstack with quota-count-usage-from-placement set to True -------------------------------------------------------------------------------------------------- $ juju status Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 11:19:52Z App Version Status Scale Charm Store Rev OS Notes cinder 14.0.3 active 1 cinder jujucharms 405 ubuntu glance 18.0.0 active 1 glance jujucharms 405 ubuntu keystone 15.0.0 active 1 keystone jujucharms 489 ubuntu mysql 5.7.20 active 1 percona-cluster jujucharms 364 ubuntu neutron-api 14.0.4 active 1 neutron-api jujucharms 440 ubuntu neutron-gateway 14.0.4 active 1 neutron-gateway jujucharms 411 ubuntu neutron-openvswitch 14.0.4 active 1 neutron-openvswitch jujucharms 397 ubuntu nova-cloud-controller 19.0.3 blocked 1 nova-cloud-controller local 501 ubuntu nova-compute 19.0.3 active 1 nova-compute jujucharms 489 ubuntu rabbitmq-server 3.6.10 active 1 rabbitmq-server jujucharms 364 ubuntu Unit Workload Agent Machine Public address Ports Message cinder/0* active idle 0 10.5.0.38 8776/tcp Unit is ready glance/0* active idle 1 10.5.0.42 9292/tcp Unit is ready keystone/0* active idle 2 10.5.0.13 5000/tcp Unit is ready mysql/0* active idle 3 10.5.0.53 3306/tcp Unit is ready neutron-api/0* active idle 4 10.5.0.34 9696/tcp Unit is ready neutron-gateway/0* active idle 5 10.5.0.21 Unit is ready nova-cloud-controller/0* blocked idle 6 10.5.0.45 8774/tcp,8775/tcp,8778/tcp Incorrect configuration quota-count-usage-from-placement: Not supported in this openstack release, reset the parameter to false nova-compute/0* active idle 7 10.5.0.69 Unit is ready neutron-openvswitch/0* active idle 10.5.0.69 Unit is ready rabbitmq-server/0* active idle 8 10.5.0.64 5672/tcp Unit is ready Machine State DNS Inst id Series AZ Message 0 started 10.5.0.38 a37a3042-f42c-4865-aaf7-503918bbfaff bionic nova ACTIVE 1 started 10.5.0.42 718a98fa-98cf-4801-88a3-9282800aef24 bionic nova ACTIVE 2 started 10.5.0.13 d442d9b4-13fe-4bff-a4a5-2ec77dbfeed9 bionic nova ACTIVE 3 started 10.5.0.53 07f22f74-096b-4b66-8ce4-2cb5ca377b4a bionic nova ACTIVE 4 started 10.5.0.34 17e1471b-0725-46bf-87e2-21350ce37a9b bionic nova ACTIVE 5 started 10.5.0.21 6fc80827-c840-472a-9fb2-cdb49279f5d0 bionic nova ACTIVE 6 started 10.5.0.45 2edb6fd5-d81d-452f-bb4a-e8395e1ac214 bionic nova ACTIVE 7 started 10.5.0.69 286ba65d-f2d6-4b09-bec4-6d9539ebc7b8 bionic nova ACTIVE 8 started 10.5.0.64 24302d47-d9f1-419f-85d5-cd9bbf148b3a bionic nova ACTIVE 2. Reset quota-count-usage-from-placement parameter to False ------------------------------------------------------------ $ juju config nova-cloud-controller quota-count-usage-from-placement=False $ juju status Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 11:22:57Z App Version Status Scale Charm Store Rev OS Notes cinder 14.0.3 active 1 cinder jujucharms 405 ubuntu glance 18.0.0 active 1 glance jujucharms 405 ubuntu keystone 15.0.0 active 1 keystone jujucharms 489 ubuntu mysql 5.7.20 active 1 percona-cluster jujucharms 364 ubuntu neutron-api 14.0.4 active 1 neutron-api jujucharms 440 ubuntu neutron-gateway 14.0.4 active 1 neutron-gateway jujucharms 411 ubuntu neutron-openvswitch 14.0.4 active 1 neutron-openvswitch jujucharms 397 ubuntu nova-cloud-controller 19.0.3 active 1 nova-cloud-controller local 501 ubuntu nova-compute 19.0.3 active 1 nova-compute jujucharms 489 ubuntu rabbitmq-server 3.6.10 active 1 rabbitmq-server jujucharms 364 ubuntu Unit Workload Agent Machine Public address Ports Message cinder/0* active idle 0 10.5.0.38 8776/tcp Unit is ready glance/0* active idle 1 10.5.0.42 9292/tcp Unit is ready keystone/0* active idle 2 10.5.0.13 5000/tcp Unit is ready mysql/0* active idle 3 10.5.0.53 3306/tcp Unit is ready neutron-api/0* active idle 4 10.5.0.34 9696/tcp Unit is ready neutron-gateway/0* active idle 5 10.5.0.21 Unit is ready nova-cloud-controller/0* active idle 6 10.5.0.45 8774/tcp,8775/tcp,8778/tcp Unit is ready nova-compute/0* active idle 7 10.5.0.69 Unit is ready neutron-openvswitch/0* active idle 10.5.0.69 Unit is ready rabbitmq-server/0* active idle 8 10.5.0.64 5672/tcp Unit is ready Machine State DNS Inst id Series AZ Message 0 started 10.5.0.38 a37a3042-f42c-4865-aaf7-503918bbfaff bionic nova ACTIVE 1 started 10.5.0.42 718a98fa-98cf-4801-88a3-9282800aef24 bionic nova ACTIVE 2 started 10.5.0.13 d442d9b4-13fe-4bff-a4a5-2ec77dbfeed9 bionic nova ACTIVE 3 started 10.5.0.53 07f22f74-096b-4b66-8ce4-2cb5ca377b4a bionic nova ACTIVE 4 started 10.5.0.34 17e1471b-0725-46bf-87e2-21350ce37a9b bionic nova ACTIVE 5 started 10.5.0.21 6fc80827-c840-472a-9fb2-cdb49279f5d0 bionic nova ACTIVE 6 started 10.5.0.45 2edb6fd5-d81d-452f-bb4a-e8395e1ac214 bionic nova ACTIVE 7 started 10.5.0.69 286ba65d-f2d6-4b09-bec4-6d9539ebc7b8 bionic nova ACTIVE 8 started 10.5.0.64 24302d47-d9f1-419f-85d5-cd9bbf148b3a bionic nova ACTIVE 3. Upgrade OpenStack release to Train ------------------------------------- $ juju config keystone action-managed-upgrade=True $ juju config keystone openstack-origin=cloud:bionic-train $ #juju run-action keystone-hacluster/1 --wait pause $ #juju run-action keystone/2 --wait pause $ #juju run-action keystone/2 --wait openstack-upgrade $ #juju run-action keystone/2 --wait resume $ #juju run-action keystone-hacluster/1 --wait resume $ juju run-action keystone/0 --wait openstack-upgrade $ juju status keystone Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 11:51:12Z App Version Status Scale Charm Store Rev OS Notes keystone 16.0.0 active 1 keystone jujucharms 489 ubuntu Unit Workload Agent Machine Public address Ports Message keystone/0* active idle 2 10.5.0.13 5000/tcp Unit is ready Machine State DNS Inst id Series AZ Message 2 started 10.5.0.13 d442d9b4-13fe-4bff-a4a5-2ec77dbfeed9 bionic nova ACTIVE $ juju config cinder openstack-origin=cloud:bionic-train $ juju status cinder Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 11:55:39Z App Version Status Scale Charm Store Rev OS Notes cinder 15.0.1 active 1 cinder jujucharms 405 ubuntu Unit Workload Agent Machine Public address Ports Message cinder/0* active idle 0 10.5.0.38 8776/tcp Unit is ready Machine State DNS Inst id Series AZ Message 0 started 10.5.0.38 a37a3042-f42c-4865-aaf7-503918bbfaff bionic nova ACTIVE $ juju config glance openstack-origin=cloud:bionic-train $ juju status glance Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 11:58:58Z App Version Status Scale Charm Store Rev OS Notes glance 19.0.0 active 1 glance jujucharms 405 ubuntu Unit Workload Agent Machine Public address Ports Message glance/0* active idle 1 10.5.0.42 9292/tcp Unit is ready Machine State DNS Inst id Series AZ Message 1 started 10.5.0.42 718a98fa-98cf-4801-88a3-9282800aef24 bionic nova ACTIVE $ juju config neutron-api openstack-origin=cloud:bionic-train $ juju status neutron-api Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:02:18Z App Version Status Scale Charm Store Rev OS Notes neutron-api 15.0.1 active 1 neutron-api jujucharms 440 ubuntu Unit Workload Agent Machine Public address Ports Message neutron-api/0* active idle 4 10.5.0.34 9696/tcp Unit is ready Machine State DNS Inst id Series AZ Message 4 started 10.5.0.34 17e1471b-0725-46bf-87e2-21350ce37a9b bionic nova ACTIVE $ juju config neutron-gateway openstack-origin=cloud:bionic-train $ juju status neutron-gateway Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:07:03Z App Version Status Scale Charm Store Rev OS Notes neutron-gateway 15.0.1 active 1 neutron-gateway jujucharms 411 ubuntu Unit Workload Agent Machine Public address Ports Message neutron-gateway/0* active idle 5 10.5.0.21 Unit is ready Machine State DNS Inst id Series AZ Message 5 started 10.5.0.21 6fc80827-c840-472a-9fb2-cdb49279f5d0 bionic nova ACTIVE $ juju deploy --series bionic --config openstack-origin=cloud:bionic-train cs:placement $ juju run-action nova-cloud-controller/0 pause $ juju add-relation placement mysql $ juju add-relation placement keystone $ juju add-relation placement nova-cloud-controller $ juju run-action nova-cloud-controller/0 resume $ juju config nova-cloud-controller openstack-origin=cloud:bionic-train $ juju status placement nova-cloud-controller Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:24:18Z App Version Status Scale Charm Store Rev OS Notes nova-cloud-controller 20.0.1 active 1 nova-cloud-controller local 501 ubuntu placement 2.0.0 active 1 placement jujucharms 7 ubuntu Unit Workload Agent Machine Public address Ports Message nova-cloud-controller/0* active idle 6 10.5.0.45 8774/tcp,8775/tcp,8778/tcp Unit is ready placement/0* active idle 9 10.5.0.87 8778/tcp Unit is ready Machine State DNS Inst id Series AZ Message 6 started 10.5.0.45 2edb6fd5-d81d-452f-bb4a-e8395e1ac214 bionic nova ACTIVE 9 started 10.5.0.87 f6d62fe1-299b-4130-b2db-2c61f6e3b273 bionic nova ACTIVE $ juju config nova-compute openstack-origin=cloud:bionic-train $ juju status nova-compute Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:29:50Z App Version Status Scale Charm Store Rev OS Notes neutron-openvswitch 15.0.1 active 1 neutron-openvswitch jujucharms 397 ubuntu nova-compute 20.0.1 active 1 nova-compute jujucharms 489 ubuntu Unit Workload Agent Machine Public address Ports Message nova-compute/0* active idle 7 10.5.0.69 Unit is ready neutron-openvswitch/0* active idle 10.5.0.69 Unit is ready Machine State DNS Inst id Series AZ Message 7 started 10.5.0.69 286ba65d-f2d6-4b09-bec4-6d9539ebc7b8 bionic nova ACTIVE $ juju status Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:30:07Z App Version Status Scale Charm Store Rev OS Notes cinder 15.0.1 active 1 cinder jujucharms 405 ubuntu glance 19.0.0 active 1 glance jujucharms 405 ubuntu keystone 16.0.0 active 1 keystone jujucharms 489 ubuntu mysql 5.7.20 active 1 percona-cluster jujucharms 364 ubuntu neutron-api 15.0.1 active 1 neutron-api jujucharms 440 ubuntu neutron-gateway 15.0.1 active 1 neutron-gateway jujucharms 411 ubuntu neutron-openvswitch 15.0.1 active 1 neutron-openvswitch jujucharms 397 ubuntu nova-cloud-controller 20.0.1 active 1 nova-cloud-controller local 501 ubuntu nova-compute 20.0.1 active 1 nova-compute jujucharms 489 ubuntu placement 2.0.0 active 1 placement jujucharms 7 ubuntu rabbitmq-server 3.6.10 active 1 rabbitmq-server jujucharms 364 ubuntu Unit Workload Agent Machine Public address Ports Message cinder/0* active idle 0 10.5.0.38 8776/tcp Unit is ready glance/0* active idle 1 10.5.0.42 9292/tcp Unit is ready keystone/0* active idle 2 10.5.0.13 5000/tcp Unit is ready mysql/0* active idle 3 10.5.0.53 3306/tcp Unit is ready neutron-api/0* active idle 4 10.5.0.34 9696/tcp Unit is ready neutron-gateway/0* active idle 5 10.5.0.21 Unit is ready nova-cloud-controller/0* active idle 6 10.5.0.45 8774/tcp,8775/tcp,8778/tcp Unit is ready nova-compute/0* active idle 7 10.5.0.69 Unit is ready neutron-openvswitch/0* active idle 10.5.0.69 Unit is ready placement/0* active idle 9 10.5.0.87 8778/tcp Unit is ready rabbitmq-server/0* active idle 8 10.5.0.64 5672/tcp Unit is ready Machine State DNS Inst id Series AZ Message 0 started 10.5.0.38 a37a3042-f42c-4865-aaf7-503918bbfaff bionic nova ACTIVE 1 started 10.5.0.42 718a98fa-98cf-4801-88a3-9282800aef24 bionic nova ACTIVE 2 started 10.5.0.13 d442d9b4-13fe-4bff-a4a5-2ec77dbfeed9 bionic nova ACTIVE 3 started 10.5.0.53 07f22f74-096b-4b66-8ce4-2cb5ca377b4a bionic nova ACTIVE 4 started 10.5.0.34 17e1471b-0725-46bf-87e2-21350ce37a9b bionic nova ACTIVE 5 started 10.5.0.21 6fc80827-c840-472a-9fb2-cdb49279f5d0 bionic nova ACTIVE 6 started 10.5.0.45 2edb6fd5-d81d-452f-bb4a-e8395e1ac214 bionic nova ACTIVE 7 started 10.5.0.69 286ba65d-f2d6-4b09-bec4-6d9539ebc7b8 bionic nova ACTIVE 8 started 10.5.0.64 24302d47-d9f1-419f-85d5-cd9bbf148b3a bionic nova ACTIVE 9 started 10.5.0.87 f6d62fe1-299b-4130-b2db-2c61f6e3b273 bionic nova ACTIVE 4. Launch an instance and observe quota usage --------------------------------------------- $ ./tools/instance_launch.sh 1 bionic + openstack server create --wait --image bionic --flavor m1.small --key-name testkey --nic net-id=b6ab5945-1d89-44f8-ace1-23fa37909f64 --min 1 --max 1 bionic-123411 $ openstack server list +--------------------------------------+---------------+--------+------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------+--------+------------------------+--------+----------+ | dfd7f01a-e65b-42b8-b7f9-43b7fff95056 | bionic-123411 | ACTIVE | private=192.168.21.223 | bionic | m1.small | +--------------------------------------+---------------+--------+------------------------+--------+----------+ $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 1 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 2048 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ 5. Shelve the instance and observe quota usage ---------------------------------------------- $ openstack server shelve bionic-123411 $ openstack server list --long +--------------------------------------+---------------+--------+-------------------------------+-------------+------------------------+------------+--------------------------------------+-------------+-----------+-------------------+--------------------------------------+------------+ | ID | Name | Status | Task State | Power State | Networks | Image Name | Image ID | Flavor Name | Flavor ID | Availability Zone | Host | Properties | +--------------------------------------+---------------+--------+-------------------------------+-------------+------------------------+------------+--------------------------------------+-------------+-----------+-------------------+--------------------------------------+------------+ | dfd7f01a-e65b-42b8-b7f9-43b7fff95056 | bionic-123411 | ACTIVE | shelving_image_pending_upload | Running | private=192.168.21.223 | bionic | 02b084d6-e76d-4e5e-bd2b-72f842ddd3c2 | m1.small | 2 | nova | juju-778d71-bionic-stein-7.cloud.sts | | +--------------------------------------+---------------+--------+-------------------------------+-------------+------------------------+------------+--------------------------------------+-------------+-----------+-------------------+--------------------------------------+------------+ $ openstack server list +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ | dfd7f01a-e65b-42b8-b7f9-43b7fff95056 | bionic-123411 | SHELVED_OFFLOADED | private=192.168.21.223 | bionic | m1.small | +--------------------------------------+---------------+-------------------+------------------------+--------+----------+ $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 1 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 2048 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+ 6. Change the quota-count-usage-from-placement to True ------------------------------------------------------ $ juju config nova-cloud-controller quota-count-usage-from-placement=True $ juju status nova-cloud-controller Model Controller Cloud/Region Version SLA Timestamp bionic-stein hemanth-n stsstack/stsstack 2.7.5 unsupported 12:43:41Z App Version Status Scale Charm Store Rev OS Notes nova-cloud-controller 20.0.1 active 1 nova-cloud-controller local 501 ubuntu Unit Workload Agent Machine Public address Ports Message nova-cloud-controller/0* active idle 6 10.5.0.45 8774/tcp,8775/tcp,8778/tcp Unit is ready Machine State DNS Inst id Series AZ Message 6 started 10.5.0.45 2edb6fd5-d81d-452f-bb4a-e8395e1ac214 bionic nova ACTIVE 7. Now check the quota usage, shelved instances should not be counted --------------------------------------------------------------------- $ nova limits +------+-----+-------+--------+------+----------------+ | Verb | URI | Value | Remain | Unit | Next_Available | +------+-----+-------+--------+------+----------------+ +------+-----+-------+--------+------+----------------+ +--------------------+------+-------+ | Name | Used | Max | +--------------------+------+-------+ | Cores | 0 | 20 | | Instances | 1 | 10 | | Keypairs | - | 100 | | Personality | - | 5 | | Personality Size | - | 10240 | | RAM | 0 | 51200 | | Server Meta | - | 128 | | ServerGroupMembers | - | 10 | | ServerGroups | 0 | 10 | +--------------------+------+-------+