[R4.0 ocata]Nova conf is not getting updated in single node

Bug #1714164 reported by aswani kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
Nitish Krishna Kaveri
Trunk
Fix Committed
Critical
Nitish Krishna Kaveri

Bug Description

R4.0 ocata ubuntu16 singlenode

vm launch failing saying apiservers not found
File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1780, in _do_build_and_run_instance
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] filter_properties)
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1890, in _build_and_run_instance
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] extra_usage_info={'image_name': image_name})
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1650, in _notify_about_instance_usage
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] extra_usage_info=extra_usage_info, fault=fault)
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/compute/utils.py", line 312, in notify_about_instance_usage
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] network_info, system_metadata, **extra_usage_info)
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/notifications/base.py", line 424, in info_from_instance
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] image_ref_url = glance.generate_image_url(instance.image_ref)
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 60, in generate_image_url
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] return "%s/images/%s" % (generate_glance_url(), image_ref)
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 55, in generate_glance_url
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] return next(get_api_servers())
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 114, in get_api_servers
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] for api_server in CONF.glance.api_servers:
2017-08-31 10:15:29.732 2332 ERROR nova.compute.manager [instance: f8f04bbd-9bdd-43d1-9753-ec44f2f89bf3] TypeError: 'NoneType' object is not iterable

/etc/nova/nova.conf missing the apiserver configuration

[glance]
# Configuration options for the Image service

#
# From nova.conf
#

#
# List of glance api servers endpoints available to nova.
#
# https is used for ssl-based glance api servers.
#
# Possible values:
#
# * A list of any fully qualified url of the form
# "scheme://hostname:port[/path]"
# (i.e. "http://10.0.1.0:9292" or "https://my.glance.server/image").
# (list value)
#api_servers=<None>

under conditions in the /etc/contrail/ctrl-details file, the nova.conf is not being updated with this variable

etc/contrail/ctrl-details

export AUTH_PROTOCOL=http
export QUANTUM_PROTOCOL=http
export ADMIN_TOKEN=c0ntrail123
export CONTROLLER=10.204.216.94
export AMQP_SERVER=10.204.216.94
export HYPERVISOR=libvirt
export NOVA_PASSWORD=c0ntrail123
export NEUTRON_PASSWORD=c0ntrail123
export SERVICE_TENANT_NAME=services
export KEYSTONE_VERSION=v2.0
export KEYSTONE_SERVER=10.204.216.94
export REGION_NAME=RegionOne
export QUANTUM=10.204.216.94
export QUANTUM_PORT=9696
export COMPUTE=10.204.216.94
export SELF_MGMT_IP=10.204.216.94
export CONTROLLER_MGMT=10.204.216.94
export INTERNAL_VIP=10.204.216.94
export CONTRAIL_INTERNAL_VIP=
export EXTERNAL_VIP=10.204.216.94
export SRIOV_INTERFACES=
export SRIOV_PHYSNETS=
export DPDK_MODE=False
export DPDK_INTERFACE=

tags: added: vrouter
tags: removed: vrouter
Revision history for this message
aswani kumar (aswanikumar90) wrote :

in /opt/contrail/bin/compute-server-setup.sh we are not handling single node to setup glance api-servers.
The below code missing for single node

    166 if [ $newton_or_above -eq 1 ]; then
    167 openstack-config --del /etc/nova/nova.conf glance host
    168 openstack-config --set /etc/nova/nova.conf glance api_servershttp://$CONTROLLER:9292

Revision history for this message
Nitish Krishna Kaveri (nitishk) wrote :

This is already there for case COMPUTE != CONTROLLER:
https://github.com/Juniper/contrail-provisioning/blob/R4.0/contrail_provisioning/compute/scripts/compute-server-setup.sh#L166

Will add for case where CONTROLLER == COMPUTE also

Jeba Paulaiyan (jebap)
tags: added: sanity server-manager
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/35153
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/35154
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/35153
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/35154
Submitter: Nitish Krishna Kaveri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/35154
Committed: http://github.com/Juniper/contrail-provisioning/commit/d904cc616c22b871d7c10af5e16b33e93be66983
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit d904cc616c22b871d7c10af5e16b33e93be66983
Author: nitishkrishna <email address hidden>
Date: Thu Aug 31 13:38:46 2017 -0700

Closes-Bug: #1714164 - Compute setup script needs to explicitly set Glance API servers

This was previously set in nova API provisioning but with nova-api containerized in Ocata,
This is now explicitly needed on the bare metal nova compute config

Patch 2:
SKU calculation for Ubuntu is independent of whether Controller and Compute are on same node or not

Change-Id: I02570206001b44985ac3591b15a8b42012fe7ba6

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/35153
Committed: http://github.com/Juniper/contrail-provisioning/commit/bb4df96e500917621828b4258a4f195885d226d6
Submitter: Zuul (<email address hidden>)
Branch: master

commit bb4df96e500917621828b4258a4f195885d226d6
Author: nitishkrishna <email address hidden>
Date: Thu Aug 31 13:38:46 2017 -0700

Closes-Bug: #1714164 - Compute setup script needs to explicitly set Glance API servers

This was previously set in nova API provisioning but with nova-api containerized in Ocata,
This is now explicitly needed on the bare metal nova compute config

Patch 2:
SKU calculation for Ubuntu is independent of whether Controller and Compute are on same node or not

Change-Id: I02570206001b44985ac3591b15a8b42012fe7ba6

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.