Wrong socket file path in tor-agent init script after the upgrade

Bug #1666218 reported by mehul
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Undecided
Kumar Harsh
R3.1
Fix Committed
Undecided
Kumar Harsh
R3.2
Fix Committed
Undecided
Kumar Harsh
Trunk
Fix Committed
Undecided
Kumar Harsh

Bug Description

Hi Team,

Before upgrade:

OS:Ubuntu 14.04
Contrail: 2.21.2-36

After upgrade:

OS:Ubuntu 14:04
Contrail: 3.1.2.0-62(Mitaka)

After upgrading TSN from 2.21.2-36 to 3.1.2.0-62(Mitaka), most of the configuration files are properly updated, however /etc/init.d/contrail-tor-agent-* are not since these files are not contained in the vrouter package.

Note: In BUG 1582116,now socket files of supervisord are created under /var/run. Detail is mentioned in https://bugs.launchpad.net/juniperopenstack/+bug/1582116. They upgrade the TSN node which does not have this fix.

Customer thinks that, fabric utils or provisioning script should update these files during the upgrade of tor-agent, but currently they don't.

https://github.com/Juniper/contrail-fabric-utils/blob/master/fabfile/tasks/upgrade.py#L189
https://github.com/Juniper/contrail-provisioning/blob/master/contrail_provisioning/compute/upgrade.py

Below is the output from customer LAB

tor_upgrade_after.log : line 178, 207
------------------------------------------------------------------------------------------------------------------------------
2017-02-10 13:43:50:227323: root@sv-54:/opt/contrail/utils# fab sudo_cmd:"grep /tmp/supervisord_vrouter.sock -r /etc" -w -R compute
[root@10.0.0.205] Executing task 'sudo_cmd'
(snip)
2017-02-10 13:44:59:280492: [root@10.0.0.205] out: /etc/init.d/contrail-tor-agent-1:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}` <<<
(snip)
2017-02-10 13:45:01:577469: [root@10.0.0.209] out: /etc/init.d/contrail-tor-agent-1:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}` <<<<
------------------------------------------------------------------------------------------------------------------------------

As a result, service command fails to start/stop/restart tor-agent services.

tor_upgrade_after.log : line 217
------------------------------------------------------------------------------------------------------------------------------
2017-02-10 13:45:02:010753: root@sv-54:/opt/contrail/utils# fab sudo_cmd:"service contrail-tor-agent-1 restart" -w -R toragent
[root@10.0.0.205] Executing task 'sudo_cmd'
2017-02-10 13:45:58:311079: [root@10.0.0.205] sudo: service contrail-tor-agent-1 restart
2017-02-10 13:45:58:311326: [root@10.0.0.205] out: unix:///tmp/supervisord_vrouter.sock no such file
2017-02-10 13:45:58:955964: [root@10.0.0.205] out:
2017-02-10 13:45:58:957674:
2017-02-10 13:45:58:965296: [root@10.0.0.209] Executing task 'sudo_cmd'
2017-02-10 13:45:58:965549: [root@10.0.0.209] sudo: service contrail-tor-agent-1 restart
2017-02-10 13:45:58:967506: [root@10.0.0.209] out: unix:///tmp/supervisord_vrouter.sock no such file
2017-02-10 13:45:59:562263: [root@10.0.0.209] out:
------------------------------------------------------------------------------------------------------------------------------

I have replicated this issue in my LAB and below is the output from my LAB

2017-02-17 16:51:29:502536: root@control:/opt/contrail/utils# fab sudo_cmd:"service contrail-tor-agent-1 restart" -w -R toragent
[root@10.204.74.153] Executing task 'sudo_cmd'
2017-02-17 16:53:26:239855: [root@10.204.74.153] sudo: service contrail-tor-agent-1 restart
2017-02-17 16:53:26:240316: [root@10.204.74.153] out: unix:///tmp/supervisord_vrouter.sock no such file
2017-02-17 16:53:26:648801: [root@10.204.74.153] out:
2017-02-17 16:53:26:649273:
2017-02-17 16:53:26:649527: [root@10.204.74.154] Executing task 'sudo_cmd'
2017-02-17 16:53:26:649710: [root@10.204.74.154] sudo: service contrail-tor-agent-1 restart
2017-02-17 16:53:26:649925: [root@10.204.74.154] out: contrail-tor-agent-1: stopped
2017-02-17 16:53:27:974255: [root@10.204.74.154] out: contrail-tor-agent-1: started
2017-02-17 16:53:32:988460: [root@10.204.74.154] out:
2017-02-17 16:53:32:988930:
2017-02-17 16:53:32:989732:
2017-02-17 16:53:32:989967: Done.
2017-02-17 16:53:32:990017: Disconnecting from 10.204.74.154... done.
2017-02-17 16:53:33:106025: Disconnecting from 10.204.74.153... done.

root@control:/opt/contrail/utils# fab sudo_cmd:"grep /tmp/supervisord_vrouter.sock -r /etc" -w -R compute
[root@10.204.74.152] Executing task 'sudo_cmd'
2017-02-17 16:51:24:786157: [root@10.204.74.152] sudo: grep /tmp/supervisord_vrouter.sock -r /etc
2017-02-17 16:51:24:786859: [root@10.204.74.152] out: /etc/contrail/supervisord_vrouter.conf:file=/tmp/supervisord_vrouter.sock ; (the path to the socket file)
2017-02-17 16:51:25:553896: [root@10.204.74.152] out: /etc/contrail/supervisord_vrouter.conf:serverurl=unix:///tmp/supervisord_vrouter.sock ; use a unix:// URL for a unix socket
2017-02-17 16:51:25:554100: [root@10.204.74.152] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock stop all
2017-02-17 16:51:26:056471: [root@10.204.74.152] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock shutdown
2017-02-17 16:51:26:056977: [root@10.204.74.152] out: /etc/init.d/contrail-vrouter-agent:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}`
2017-02-17 16:51:26:322492: [root@10.204.74.152] out:
2017-02-17 16:51:26:623981:
2017-02-17 16:51:26:624621: [root@10.204.74.153] Executing task 'sudo_cmd'
2017-02-17 16:51:26:624987: [root@10.204.74.153] sudo: grep /tmp/supervisord_vrouter.sock -r /etc
2017-02-17 16:51:26:625407: [root@10.204.74.153] out: /etc/init/supervisor-vrouter.conf: if [ -e /tmp/supervisord_vrouter.sock ]; then
2017-02-17 16:51:27:071328: [root@10.204.74.153] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock stop all
2017-02-17 16:51:27:071455: [root@10.204.74.153] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock shutdown
2017-02-17 16:51:27:071552: [root@10.204.74.153] out: /etc/init.d/contrail-tor-agent-1:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}`
2017-02-17 16:51:27:905905: [root@10.204.74.153] out:
2017-02-17 16:51:27:906472:
2017-02-17 16:51:27:911818: [root@10.204.74.154] Executing task 'sudo_cmd'
2017-02-17 16:51:27:912106: [root@10.204.74.154] sudo: grep /tmp/supervisord_vrouter.sock -r /etc
2017-02-17 16:51:27:912377: [root@10.204.74.154] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock stop all
2017-02-17 16:51:28:520533: [root@10.204.74.154] out: /etc/init/supervisor-vrouter.conf: supervisorctl -s unix:///tmp/supervisord_vrouter.sock shutdown
2017-02-17 16:51:28:520714: [root@10.204.74.154] out: /etc/init.d/contrail-tor-agent-1:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}`
2017-02-17 16:51:28:528532: [root@10.204.74.154] out: /etc/init.d/contrail-vrouter-agent:supervisorctl -s unix:///tmp/supervisord_vrouter.sock ${1} `basename ${0}`
2017-02-17 16:51:28:561607: [root@10.204.74.154] out: /etc/contrail/supervisord_vrouter.conf:file=/tmp/supervisord_vrouter.sock ; (the path to the socket file)
2017-02-17 16:51:29:070640: [root@10.204.74.154] out: /etc/contrail/supervisord_vrouter.conf:serverurl=unix:///tmp/supervisord_vrouter.sock ; use a unix:// URL for a unix socket
2017-02-17 16:51:29:070924: [root@10.204.74.154] out:
2017-02-17 16:51:29:235084:
2017-02-17 16:51:29:258547:
2017-02-17 16:51:29:258882: Done.
2017-02-17 16:51:29:258937: Disconnecting from 10.204.74.154... done.
2017-02-17 16:51:29:373707: Disconnecting from 10.204.74.152... done.
2017-02-17 16:51:29:438032: Disconnecting from 10.204.74.153... done.
2017-02-17 16:51:29:502536: root@control:/opt/contrail/utils#

-Regards,
Mehul Patel

Tags: vrouter
mehul (pmehul)
information type: Proprietary → Public
tags: added: analytics
Changed in juniperopenstack:
assignee: nobody → Raj Reddy (rajreddy)
Revision history for this message
Raj Reddy (rajreddy) wrote :

Hari, please assign someone.. the files that are created should have if..else.. like the rest of the .ini files -- Nikhil can give more details in this regard..

tags: added: vrouter
Changed in juniperopenstack:
assignee: Raj Reddy (rajreddy) → Hari Prasad Killi (haripk)
Revision history for this message
Hari Prasad Killi (haripk) wrote :

The files /etc/init.d/contrail-tor-agent-1 etc are setup during provisioning and these are copied from contrail-vrouter-agent. Similar thing needs to be done for upgrade.

Raj Reddy (rajreddy)
tags: removed: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/29289
Submitter: Kumar Harsh (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/29302
Submitter: Kumar Harsh (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/29304
Submitter: Kumar Harsh (<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/29289
Submitter: Kumar Harsh (<email address hidden>)

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

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

commit 74a9d41989dac282451a9e5edd250ac026d99b86
Author: Kumar Harsh <email address hidden>
Date: Fri Mar 3 11:15:06 2017 +0530

From R3.0 socket files are moved to /var/run from /tmp
Hence for upgrade to releases 3.0 or greater edit correct path in toragent
init script .

Change-Id: If255df7ee9c8e747c9878ee630fdb4ddfd0fa25a
Closes-Bug: #1666218

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

Review in progress for https://review.opencontrail.org/29332
Submitter: Kumar Harsh (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/29332
Committed: http://github.org/Juniper/contrail-provisioning/commit/ecd95cdbf02d66d0baf7b03bb404ef5cf2d45dc4
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit ecd95cdbf02d66d0baf7b03bb404ef5cf2d45dc4
Author: Kumar Harsh <email address hidden>
Date: Sun Mar 5 17:03:03 2017 +0530

From R3.0 socket files are moved to /var/run from /tmp
Hence for upgrade to releases 3.0 or greater edit correct path in toragent
init script .

Change-Id: Ia5bfe11073c47b8d3de9e58c7da22485efe8161e
Closes-Bug: #1666218

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

Reviewed: https://review.opencontrail.org/29302
Committed: http://github.org/Juniper/contrail-provisioning/commit/5ed6732b1d757a5103ecfe79629f965c30e13236
Submitter: Zuul (<email address hidden>)
Branch: R3.0

commit 5ed6732b1d757a5103ecfe79629f965c30e13236
Author: Kumar Harsh <email address hidden>
Date: Fri Mar 3 11:15:06 2017 +0530

From R3.0 socket files are moved to /var/run from /tmp
Hence for upgrade to releases 3.0 or greater edit correct path in toragent
init script .

Change-Id: If255df7ee9c8e747c9878ee630fdb4ddfd0fa25a
Closes-Bug: #1666218

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

Reviewed: https://review.opencontrail.org/29304
Committed: http://github.org/Juniper/contrail-provisioning/commit/635fb7368a2af0c695f827843723612a8678afd6
Submitter: Zuul (<email address hidden>)
Branch: R3.1

commit 635fb7368a2af0c695f827843723612a8678afd6
Author: Kumar Harsh <email address hidden>
Date: Fri Mar 3 17:03:00 2017 +0530

From R3.0 socket files are moved to /var/run from /tmp
Hence for upgrade to releases 3.0 or greater edit correct path in toragent
init script .

Change-Id: Ifa8125a0fb9a95f5713902faf8dc908305533cad
Closes-Bug: #1666218

Revision history for this message
mehul (pmehul) wrote :

Hi Harsh,

In version 3.1.2.0, in which build we are going to fix this issue?

-Regards,
Mehul Patel

Revision history for this message
Kumar Harsh (hkumar) wrote :

Please ask Hari (<email address hidden>) for exact details.

Thanks,
Harsh

Revision history for this message
Kumar Harsh (hkumar) wrote :

Hi Mehul,

This fix will be included in next R3.1 build .

-Regards,

 Harsh

Revision history for this message
mehul (pmehul) wrote :

Hi Hari,

Could you tell me the exact build ID in which this issue will be fixed ?

-Regards,
Mehul Patel

Revision history for this message
Kumar Harsh (hkumar) wrote :

The build Id will be 67 for R3.1 branch.

Regards,
Harsh

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.