Tor-agent remain on Web GUI even after it was deleted using fab command
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R2.20 |
Fix Committed
|
Undecided
|
RAVI KIRAN | |||
R2.21.x |
Fix Committed
|
Undecided
|
RAVI KIRAN | |||
R2.22.x |
Fix Committed
|
Undecided
|
RAVI KIRAN | |||
R3.0 |
Fix Committed
|
Undecided
|
RAVI KIRAN | |||
Trunk |
Fix Committed
|
Undecided
|
RAVI KIRAN |
Bug Description
Customer deleted a tor-agent with running delete_
Even after the completion of the task, the deleted tor-agent remain on Web GUI:
Monitor > Infrastructure > Virtual Routers pane with the status of "System
Information unavailable,
Customer restarted supervisor-vrouter service, and it was recovered.
In order to delete this, they had to restart one of the remaining services except
contrail-
through TSN.
When they restarted contrail-
vrouter-agent or tor-agent become "Process States unavailable" and the situation
got worse.
I am able to reproduce this issue in my lab 2.21 setup
#######
Troubleshooting & Recovery Steps
#######
Currently, delete_
firstly stops and delete the service of tor-agent, then delete
the definition of physical router and virtual router through Config API.
I think this is the cause of the issue.
If we firstly remove the definition of physical rotuer and virtual router
and then stop and delete the service, the deleted object doesn't remain
on Web GUI.
Here is a temporal fix for delete_
-------
@task
def delete_
'''Disable tor agent functionality in particular node.
USAGE: fab delete_
'''
i = int(index)
host_string = node_info
with settings(
if not host_string in toragent_dict:
print 'tor-agent entry for %s does not exist in testbed file' \
return
if not i < len(toragent_
print 'tor-agent entry for host %s and index %d does not exist in '\
return
# Populate the argument to pass for setup-vnc-tor-agent
tor_id = int(get_
if tor_id == -1:
return
tor_name= toragent_
# Default agent name
agent_name = tgt_hostname + '-' + str(tor_id)
# If tor_agent_name is not specified or if its value is not
# specified use default agent name
if 'tor_agent_name' in toragent_
if tor_agent_name != None:
if tor_agent_name == None or not tor_agent_name:
cfgm_host = get_control_
cfgm_ip = get_contrail_
cfgm_user = env.roledefs[
cfgm_passwd = get_env_
(tgt_ip, tgt_gw) = get_data_
admin_user, admin_password = get_authserver_
prov_args = "--host_name %s --host_ip %s --api_server_ip %s --oper del " \
pr_args = "--device_name %s --vendor_name %s --api_server_ip %s\
with settings(
# Stop tor-agent process
cmd = 'service ' + tor_process_name + ' stop'
sudo(cmd)
# Remove tor-agent config file
if exists(
# Remove tor-agent INI file used by supervisord
if exists(
# Remove tor-agent init file
if exists(
# If SSL files generated for tor-agent exists, remove them
cert_file = "/etc/contrail/
if exists(cert_file, use_sudo=True):
if exists(
if exists(
if restart:
=> Steps to Reproduce
1. Delete tor-agent with delete_
2. Check the status of tor-agent in Monitor pane of Virtual Routers on Web GUI.
information type: | Proprietary → Public |
tags: | added: analytics |
Changed in juniperopenstack: | |
assignee: | nobody → Raj Reddy (rajreddy) |
Changed in juniperopenstack: | |
assignee: | Raj Reddy (rajreddy) → Hari Prasad Killi (haripk) |
tags: | added: vrouter |
Changed in juniperopenstack: | |
assignee: | Hari Prasad Killi (haripk) → RAVI KIRAN (ravibk) |
tags: | removed: analytics |
i think mechanism to dynamically create .ini file was added by the vrouter team, please take an initial look.