SM: R3.1.1 build 40: monitory and inventory data not populated and throws errors

Bug #1640485 reported by sundarkh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
High
Nitish Krishna Kaveri
R3.2
Fix Committed
High
Nitish Krishna Kaveri
Trunk
Fix Committed
High
Nitish Krishna Kaveri

Bug Description

SM: R3.1.1 build 40: monitory and inventory data not populated and throws errors

After successfully provisioning a ubuntu mitaka R3.1.1 build 40 target with SM , issue show monitoring

root@nodeg19:~# server-manager show monitoring
<type 'exceptions.AttributeError'>
Python 2.7.6: /usr/bin/python
Wed Nov 9 18:43:53 2016

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/bin/server-manager in <module>()
   79 import cgitb
   80 cgitb.enable(format='text')
   81
   82 server_manager(sys.argv[1:])
   83 # End if __name__
server_manager = <function server_manager>
sys = <module 'sys' (built-in)>
sys.argv = ['/usr/bin/server-manager', 'show', 'monitoring']

 /usr/bin/server-manager in server_manager(args_str=['show', 'monitoring'])
   73 args = parser.parse_args(sys.argv[1:2])
   74 argv = sys.argv[2:]
   75 commands_dict[args.command](argv)
   76 # End of server_manager
   77
global commands_dict = {'add': <function add_config>, 'delete': <function delete_config>, 'provision': <function provision_server>, 'reimage': <function reimage_server>, 'restart': <function restart_server>, 'run_inventory': <function run_inventory>, 'show': <function show_config>, 'status': <function show_server_status>, 'upload_image': <function upload_image>}
args = Namespace(command='show', config_file=None)
args.command = 'show'
argv = ['monitoring']

 /opt/contrail/server_manager/client/smgr_show.py in show_config(args_str=['monitoring'])
  311 sys.exit("Exception: %s : Error reading config file %s" %(e.message, config_file))
  312 # end except
  313 rest_api_params = args.func(args)
  314 resp = send_REST_request(smgr_ip, smgr_port, rest_api_params, detail)
  315 smgr_client_def.print_rest_response(resp)
rest_api_params undefined
args = Namespace(cluster_id=None, config_file=None, fun...35b91cf8>>, server_id=None, tag=None, where=None)
args.func = <bound method ServerMgrIPMIQuerying.show_mon_det...<smgr_monitoring.ServerMgrIPMIQuerying instance>>

 /opt/contrail/server_manager/client/smgr_monitoring.py in show_mon_details(self=<smgr_monitoring.ServerMgrIPMIQuerying instance>, args=Namespace(cluster_id=None, config_file=None, fun...35b91cf8>>, server_id=None, tag=None, where=None))
   73 rest_api_params['match_key'] = None
   74 rest_api_params['match_value'] = None
   75 if args.type:
   76 rest_api_params['select'] = args.type
   77 if args.type == "status":
args = Namespace(cluster_id=None, config_file=None, fun...35b91cf8>>, server_id=None, tag=None, where=None)
args.type undefined
<type 'exceptions.AttributeError'>: 'Namespace' object has no attribute 'type'
    __class__ = <type 'exceptions.AttributeError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.AttributeError object>
    __dict__ = {}
    __doc__ = 'Attribute not found.'
    __format__ = <built-in method __format__ of exceptions.AttributeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.AttributeError object>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.AttributeError object>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.AttributeError object>
    __hash__ = <method-wrapper '__hash__' of exceptions.AttributeError object>
    __init__ = <method-wrapper '__init__' of exceptions.AttributeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of exceptions.AttributeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.AttributeError object>
    __repr__ = <method-wrapper '__repr__' of exceptions.AttributeError object>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.AttributeError object>
    __setstate__ = <built-in method __setstate__ of exceptions.AttributeError object>
    __sizeof__ = <built-in method __sizeof__ of exceptions.AttributeError object>
    __str__ = <method-wrapper '__str__' of exceptions.AttributeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of exceptions.AttributeError object>
    args = ("'Namespace' object has no attribute 'type'",)
    message = "'Namespace' object has no attribute 'type'"

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/bin/server-manager", line 82, in <module>
    server_manager(sys.argv[1:])
  File "/usr/bin/server-manager", line 75, in server_manager
    commands_dict[args.command](argv)
  File "/opt/contrail/server_manager/client/smgr_show.py", line 313, in show_config
    rest_api_params = args.func(args)
  File "/opt/contrail/server_manager/client/smgr_monitoring.py", line 75, in show_mon_details
    if args.type:
AttributeError: 'Namespace' object has no attribute 'type'

SM config.ini
-------------
[SERVER-MANAGER]
listen_ip_addr = 10.204.217.59
listen_port = 9001
database_name = smgr_data.db
server_manager_base_dir = /etc/contrail_smgr/
html_root_dir = /var/www/html/
cobbler = true
monitoring = true
cobbler_ip_address = 10.204.217.59
cobbler_port =
cobbler_username = testing
cobbler_password = testing
ipmi_username = ADMIN
ipmi_password = ADMIN
ipmi_interface =
ipmi_type = ipmilan
puppet_dir = /etc/puppet/
puppet_agent_retry_count = 10
puppet_agent_retry_poll_interval_seconds = 20
collectors = ['10.204.217.59:8086']
http_introspect_port = 8107
sandesh_log_level = SYS_ERR

[CLUSTER]

[SERVER]

[IMAGE]

[MONITORING]
monitoring_frequency = 300
monitoring_plugin = server_mgr_ipmi_monitoring.ServerMgrIPMIMonitoring

[INVENTORY]
inventory_plugin = server_mgr_inventory.ServerMgrInventory
~
~

Please find attachment in SM UI also

Revision history for this message
sundarkh (sundar-kh) wrote :

Error in Monitoring

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

Review in progress for https://review.opencontrail.org/25892
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/25892
Committed: http://github.org/Juniper/contrail-server-manager/commit/2afb8913253af51f46b2feb9ffc790c4e121fc64
Submitter: Zuul
Branch: R3.1

commit 2afb8913253af51f46b2feb9ffc790c4e121fc64
Author: nitishkrishna <email address hidden>
Date: Wed Nov 9 10:36:25 2016 -0800

Closes-Bug: #1640485 - Monitoring and Inventory data show fails (type missing)

Had removed the type options as part of bug 1559975 to bring old client in line with cliff
Need to remove the display options of type also
Related-Bug: #1559975

Change-Id: I77756cb5a05343eaa12c4869b0185a7228da31a9

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

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

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

Review in progress for https://review.opencontrail.org/25955
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/25954
Committed: http://github.org/Juniper/contrail-server-manager/commit/224e31f0d3f64816000e0d55752561615968f254
Submitter: Zuul
Branch: master

commit 224e31f0d3f64816000e0d55752561615968f254
Author: nitishkrishna <email address hidden>
Date: Wed Nov 9 10:36:25 2016 -0800

Closes-Bug: #1640485 - Monitoring and Inventory data show fails (type missing)

Had removed the type options as part of bug 1559975 to bring old client in line with cliff
Need to remove the display options of type also
Related-Bug: #1559975

Change-Id: I77756cb5a05343eaa12c4869b0185a7228da31a9

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

Reviewed: https://review.opencontrail.org/25955
Committed: http://github.org/Juniper/contrail-server-manager/commit/e96b3602bd260291c02017be318221aa9d696201
Submitter: Zuul
Branch: R3.2

commit e96b3602bd260291c02017be318221aa9d696201
Author: nitishkrishna <email address hidden>
Date: Wed Nov 9 10:36:25 2016 -0800

Closes-Bug: #1640485 - Monitoring and Inventory data show fails (type missing)

Had removed the type options as part of bug 1559975 to bring old client in line with cliff
Need to remove the display options of type also
Related-Bug: #1559975

Change-Id: I77756cb5a05343eaa12c4869b0185a7228da31a9

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.