map_instances does not need to be run for pike+

Bug #1743357 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
High
Liam Young

Bug Description

The map_instances nova-manage command is currently being run for every release that is >=Ocata. However, this only needs to be run for the transition from Newton to Ocata. Once the cloud is at Ocata all new instances will have an entry in the mapping table. The map_instances command is slow and will needlessly slow down upgrades to pike+.

Below is some testing done at Newton and Ocata:

*** Newton ***

⟫ nova boot --flavor m1.tiny --image cb240fa4-8256-4a7c-95a5-5ecad4ee7ed1 --nic net-id=78924e5e-634f-4fa7-b2f0-a7edd2600841 test-newton

⟫ nova list
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| afd4d459-851e-4ae6-a8ec-9c3fcafe8680 | test-newton | ACTIVE | - | Running | private=192.168.21.6 |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+

# dpkg -l | grep nova-common
ii nova-common
                      2:14.0.10-0ubuntu1~cloud0 all OpenStack Compute - common files

# mysql -u nova -p -D nova_api -h10.5.0.42 -e "select * from instance_mappings;"
Enter password:
#

juju config nova-cloud-controller openstack-origin=cloud:xenial-ocata

*** Ocata ***

# dpkg -l | grep nova-common
ii nova-common 2:15.0.8-0ubuntu1~cloud0 all OpenStack Compute - common files

⟫ nova list
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| afd4d459-851e-4ae6-a8ec-9c3fcafe8680 | test-newton | ACTIVE | - | Running | private=192.168.21.6 |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+

# mysql -u nova -p -D nova_api -h10.5.0.42 -e "select * from instance_mappings;"
Enter password:
+---------------------+------------+----+--------------------------------------+---------+----------------------------------+
| created_at | updated_at | id | instance_uuid | cell_id | project_id |
+---------------------+------------+----+--------------------------------------+---------+----------------------------------+
| 2018-01-15 10:57:27 | NULL | 4 | afd4d459-851e-4ae6-a8ec-9c3fcafe8680 | 2 | 263e5c5e8ee847c49f4357a163812992 |
+---------------------+------------+----+--------------------------------------+---------+----------------------------------+

⟫ nova boot --flavor m1.tiny --image cb240fa4-8256-4a7c-95a5-5ecad4ee7ed1 --nic net-id=78924e5e-634f-4fa7-b2f0-a7edd2600841 test-ocata

⟫ nova list
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+
| afd4d459-851e-4ae6-a8ec-9c3fcafe8680 | test-newton | ACTIVE | - | Running | private=192.168.21.6 |
| 5f856db3-5851-44a9-9fe1-c3e4a03f5bbe | test-ocata | ACTIVE | - | Running | private=192.168.21.7 |
+--------------------------------------+--------------+--------+------------+-------------+----------------------+

# mysql -u nova -p -D nova_api -h10.5.0.42 -e "select * from instance_mappings;"
Enter password:
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
| created_at | updated_at | id | instance_uuid | cell_id | project_id |
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
| 2018-01-15 10:57:27 | NULL | 4 | afd4d459-851e-4ae6-a8ec-9c3fcafe8680 | 2 | 263e5c5e8ee847c49f4357a163812992 |
| 2018-01-15 11:00:49 | 2018-01-15 11:00:50 | 5 | 5f856db3-5851-44a9-9fe1-c3e4a03f5bbe | 2 | 263e5c5e8ee847c49f4357a163812992 |
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+

Tags: upgrade
Liam Young (gnuoy)
Changed in charm-nova-cloud-controller:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Liam Young (gnuoy)
tags: added: upgrade
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)

Fix proposed to branch: master
Review: https://review.openstack.org/533630

Changed in charm-nova-cloud-controller:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/533630
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=a0778a5304871a8c22e48d2d1fd0f59209ae792c
Submitter: Zuul
Branch: master

commit a0778a5304871a8c22e48d2d1fd0f59209ae792c
Author: Liam Young <email address hidden>
Date: Mon Jan 15 12:04:00 2018 +0000

    Only run map_instances for Ocata

    map_instances only needs to be run during the transition from
    Newton to Ocata to map existing instances into a cell. All
    new Ocata instances will be automatically mapped to a call.
    This change limits the slow running map_instances command to
    just run for upgrades to Ocata

    Change-Id: Ic2e2df530504284d28cfcab26a71d211342203fa
    Closes-Bug: #1743357

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (stable/17.11)

Fix proposed to branch: stable/17.11
Review: https://review.openstack.org/541212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (stable/17.11)

Reviewed: https://review.openstack.org/541212
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=48514b0736aa86789c8b9c764a2a657bd41fde8a
Submitter: Zuul
Branch: stable/17.11

commit 48514b0736aa86789c8b9c764a2a657bd41fde8a
Author: Liam Young <email address hidden>
Date: Mon Jan 15 12:04:00 2018 +0000

    Only run map_instances for Ocata

    map_instances only needs to be run during the transition from
    Newton to Ocata to map existing instances into a cell. All
    new Ocata instances will be automatically mapped to a call.
    This change limits the slow running map_instances command to
    just run for upgrades to Ocata

    Change-Id: Ic2e2df530504284d28cfcab26a71d211342203fa
    Closes-Bug: #1743357
    (cherry picked from commit a0778a5304871a8c22e48d2d1fd0f59209ae792c)

James Page (james-page)
Changed in charm-nova-cloud-controller:
milestone: none → 18.02
James Page (james-page)
Changed in charm-nova-cloud-controller:
status: Fix Committed → Fix Released
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.