restoring databases using fab , not setting the owner of zookeeper directory properly

Bug #1557798 reported by Vinoth Kannan Ganapathy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
aswani kumar
R2.22.x
Fix Committed
High
aswani kumar
R3.0
Fix Committed
High
aswani kumar
Trunk
Fix Committed
High
aswani kumar

Bug Description

After restoring the databases, zookeeper went down and other services failed to connect to zookeeper.
later found that the ownership of the /var/lib/zookeeper set to ntp..
changing ownership brings back all the service up and running

also the nova instances directory..

root@contrail-node7:/opt/contrail/utils# ls -altr /var/lib/ | grep zookeeper
drwxr-xr-x 3 ntp ntp 4096 Feb 2 22:29 zookeeper
root@contrail-node7:/opt/contrail/utils# ls -altr /var/lib/zookeeper
total 12
lrwxrwxrwx 1 root root 24 Jun 10 2013 myid -> /etc/zookeeper/conf/myid
drwxr-xr-x 3 ntp ntp 4096 Feb 2 22:29 .
drwxr-xr-x 2 ntp ntp 4096 Mar 5 04:42 version-2
drwxr-xr-x 61 root root 4096 Mar 15 14:40 ..
root@contrail-node7:/opt/contrail/utils# ls -altr /var/lib/ | grep cass
drwxr-xr-x 5 cassandra cassandra 4096 Mar 15 11:45 cassandra
root@contrail-node7:/opt/contrail/utils# ls -altr /var/lib/ | grep my
drwxr-xr-x 10 mysql mysql 4096 Mar 15 11:57 mysql
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils# fab -R database -- "chown -R zookeeper:zookeeper /var/lib/zookeeper/"
[root@10.102.44.41] Executing task '<remainder>'
2016-03-15 16:07:16:463172: [root@10.102.44.41] run: chown -R zookeeper:zookeeper /var/lib/zookeeper/
2016-03-15 16:07:16:463317: [root@10.102.44.42] Executing task '<remainder>'
2016-03-15 16:07:16:707813: [root@10.102.44.42] run: chown -R zookeeper:zookeeper /var/lib/zookeeper/
2016-03-15 16:07:16:707939: [root@10.102.44.43] Executing task '<remainder>'
2016-03-15 16:07:16:951495: [root@10.102.44.43] run: chown -R zookeeper:zookeeper /var/lib/zookeeper/
2016-03-15 16:07:16:951745:
2016-03-15 16:07:17:206137: Done.
2016-03-15 16:07:17:206190: Disconnecting from 10.102.44.43... done.
2016-03-15 16:07:17:319913: Disconnecting from 10.102.44.41... done.
2016-03-15 16:07:17:351463: Disconnecting from 10.102.44.42... done.
2016-03-15 16:07:17:465336: root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils# ls -altr /var/lib/ | grep zookeeper
drwxr-xr-x 3 zookeeper zookeeper 4096 Feb 2 22:29 zookeeper
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils#
root@contrail-node7:/opt/contrail/utils# ps -ef | grep Zoo
root 12815 30324 0 16:07 pts/3 00:00:00 grep --color=auto Zoo
root@contrail-node7:/opt/contrail/utils# ps -ef | grep zoo
zookeep+ 12888 1 0 16:07 ? 00:00:00 /usr/bin/java -cp /etc/zookeeper/conf:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE,ROLLINGFILE org.apache.zookeeper.server.quorum.QuorumPeerMain /etc/zookeeper/conf/zoo.cfg
root 12907 30324 0 16:07 pts/3 00:00:00 grep --color=auto zoo
root@contrail-node7:/opt/contrail/utils# contrail-status
== Contrail vRouter ==
supervisor-vrouter: active

Tags: provisioning
description: updated
Revision history for this message
aswani kumar (aswanikumar90) wrote :

Fix has done already in R2.21.x
I will add changes to remaining branches

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

Review in progress for https://review.opencontrail.org/18557
Submitter: aswani kumar (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/18558
Submitter: aswani kumar (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/18559
Submitter: aswani kumar (<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/18560
Submitter: aswani kumar (<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/18557
Submitter: aswani kumar (<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/18560
Submitter: aswani kumar (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/18559
Submitter: aswani kumar (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/18558
Submitter: aswani kumar (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/18557
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/a0db237596c0f620ea3c6bc101c805afb5625b6d
Submitter: Zuul
Branch: R3.0

commit a0db237596c0f620ea3c6bc101c805afb5625b6d
Author: Aswani Kumar Reddy G <email address hidden>
Date: Sat Mar 19 13:27:59 2016 +0530

Fix added to change zookeeper file permissions after restore

1)Skipping backup_instances if there are any TOR or TSN nodes
2)Changes to backup_MYSQL to skip_add_locks during mysql_dump

Change-Id: Ib2161d94b00327d4e74351c4d31933bbf6c39e30
Closes-Bug: #1557798

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

Reviewed: https://review.opencontrail.org/18559
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/19b0fc3920e2b1d5a033dedd6e8105a6d5c6a02e
Submitter: Zuul
Branch: R2.20

commit 19b0fc3920e2b1d5a033dedd6e8105a6d5c6a02e
Author: Aswani Kumar Reddy G <email address hidden>
Date: Sat Mar 19 13:27:59 2016 +0530

Fix added to change zookeeper file permissions after restore

1)Skipping backup_instances if there are any TOR or TSN nodes
2)Changes to backup_MYSQL to skip_add_locks during mysql_dump

Change-Id: Ib2161d94b00327d4e74351c4d31933bbf6c39e30
Closes-Bug: #1557798

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

Reviewed: https://review.opencontrail.org/18560
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/b60b46b649cb4c2e6ecc79a3b4f15d6928a224cf
Submitter: Zuul
Branch: master

commit b60b46b649cb4c2e6ecc79a3b4f15d6928a224cf
Author: Aswani Kumar Reddy G <email address hidden>
Date: Sat Mar 19 13:27:59 2016 +0530

Fix added to change zookeeper file permissions after restore

1)Skipping backup_instances if there are any TOR or TSN nodes
2)Changes to backup_MYSQL to skip_add_locks during mysql_dump

Change-Id: Ia5480e7233264b67f2cf1e9f8dedac03ccdba924
Closes-Bug: #1557798

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

Reviewed: https://review.opencontrail.org/18558
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/07e721b0f4c60c5d6376d95c0f0774cbaaa83783
Submitter: Zuul
Branch: R2.22.x

commit 07e721b0f4c60c5d6376d95c0f0774cbaaa83783
Author: Aswani Kumar Reddy G <email address hidden>
Date: Sat Mar 19 13:27:59 2016 +0530

Fix added to change zookeeper file permissions after restore

1)Skipping backup_instances if there are any TOR or TSN nodes
2)Changes to backup_MYSQL to skip_add_locks during mysql_dump

Change-Id: Ib2161d94b00327d4e74351c4d31933bbf6c39e30
Closes-Bug: #1557798

information type: Proprietary → Public
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.