fab setup_all fails in mount_glance_images in HA topology with only TSN nodes

Bug #1470653 reported by tom murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
New
Medium
Vedamurthy Joshi
R3.0
New
Medium
Vedamurthy Joshi
R3.1
New
Medium
Vedamurthy Joshi
Trunk
New
Medium
Vedamurthy Joshi

Bug Description

This is with Contrail Openstack 2.20/64 juno in a HA toplogy

The fab_setup_all fails with:

2015-06-30 23:42:35:499116: Traceback (most recent call last):
2015-06-30 23:42:35:980784: File "/usr/local/lib/python2.7/dist-packages/fabric/main.py", line 743, in main
2015-06-30 23:42:35:980858: *args, **kwargs
2015-06-30 23:42:35:981132: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 375, in execute
2015-06-30 23:42:35:981191: multiprocessing
2015-06-30 23:42:35:981356: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 271, in _execute
2015-06-30 23:42:35:981387: return task.run(*args, **kwargs)
2015-06-30 23:42:35:981503: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
2015-06-30 23:42:35:981534: return self.wrapped(*args, **kwargs)
2015-06-30 23:42:35:981619: File "/usr/local/lib/python2.7/dist-packages/fabric/decorators.py", line 53, in inner_decorator
2015-06-30 23:42:35:981647: return func(*args, **kwargs)
2015-06-30 23:42:35:981709: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 168, in __call__
2015-06-30 23:42:35:981736: return self.run(*args, **kwargs)
2015-06-30 23:42:35:981822: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
2015-06-30 23:42:35:981851: return self.wrapped(*args, **kwargs)
2015-06-30 23:42:35:981944: File "/opt/contrail/utils/fabfile/tasks/provision.py", line 2110, in setup_all
2015-06-30 23:42:35:981988: execute('setup_ha')
2015-06-30 23:42:35:982725: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 375, in execute
2015-06-30 23:42:35:982759: multiprocessing
2015-06-30 23:42:35:982915: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 271, in _execute
2015-06-30 23:42:35:982942: return task.run(*args, **kwargs)
2015-06-30 23:42:35:983058: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
2015-06-30 23:42:35:983088: return self.wrapped(*args, **kwargs)
2015-06-30 23:42:35:983176: File "/usr/local/lib/python2.7/dist-packages/fabric/decorators.py", line 53, in inner_decorator
2015-06-30 23:42:35:983205: return func(*args, **kwargs)
2015-06-30 23:42:35:983273: File "/opt/contrail/utils/fabfile/tasks/ha.py", line 565, in setup_ha
2015-06-30 23:42:35:983305: execute('setup_glance_images_loc')
2015-06-30 23:42:35:983552: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 415, in execute
2015-06-30 23:42:35:983579: results['<local-only>'] = task.run(*args, **new_kwargs)
2015-06-30 23:42:35:983735: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 171, in run
2015-06-30 23:42:35:983869: return self.wrapped(*args, **kwargs)
2015-06-30 23:42:35:984039: File "/opt/contrail/utils/fabfile/tasks/ha.py", line 105, in setup_glance_images_loc
2015-06-30 23:42:35:984073: nfs_server = get_nfs_server()
2015-06-30 23:42:35:984165: File "/opt/contrail/utils/fabfile/tasks/ha.py", line 85, in get_nfs_server
2015-06-30 23:42:35:984192: raise RuntimeError("Please specifiy a NFS Server, No computes can be used as NFS server.")
2015-06-30 23:42:35:984272: RuntimeError: Please specifiy a NFS Server, No computes can be used as NFS server.

This is with a testbed.py like:

#Role definition of the hosts.
env.roledefs = {
    'all': [host0, host1, host2, host3, host4],
    'cfgm': [host0, host1, host2],
    'openstack': [host0, host1, host2],
    'control': [host0, host1, host2],
    'compute': [host3, host4],
    'collector': [host0, host1, host2],
    'webui': [host0, host1, host2],
    'database': [host0, host1, host2],
    'build': [host_build],
    'storage-master': [host0, host1, host2],
    'storage-compute': [host3, host4],
    'tsn': [host3, host4],
    'toragent': [host3, host4]
}

...
env.ha = {
    'internal_vip' : '172.26.10.242', #Internal Virtual IP of the openstack HA Nodes.
    'external_vip' : '10.33.5.242', #External Virtual IP of the openstack HA Nodes.
    #'contrail_internal_vip' : '172.26.10.242', #Internal Virtual IP of the contrail HA Nodes.
    #'contrail_external_vip' : '10.33.5.242', #External Virtual IP of the contrail HA Nodes.
    'nfs_server' : '10.33.5.204', #IP address of the NFS Server which will be mounted to /var/lib/glance/images of openstack Node, Defaults to env.roledefs['compute'][0]
# 'nfs_glance_path' : '/var/tmp/images/', #NFS Server path to save images, Defaults to /var/tmp/glance-images/
}

The reason that this fails is because every compute node is also a TSN node. There is a bug in the fabfile/tasks/ha.py where an exception is raised in the get_nfs_server() function that causes the mount_glance_images() and setup_glance_images_loc() functions to abort. The env.ha[ 'nfs_server' ] never gets used. when there are not non-TSN computes.

Changed in juniperopenstack:
assignee: nobody → Vedamurthy Joshi (vedujoshi)
milestone: none → r2.30-fcs
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Bug update]

bug update...

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.