backup_restore: cassandra backup location needs to be consistent

Bug #1566022 reported by Ignatious Johnson Christopher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
Medium
aswani kumar
R2.21.x
Fix Committed
Medium
aswani kumar
R2.22.x
Fix Committed
Medium
aswani kumar
R3.0
Fix Committed
Medium
aswani kumar
Trunk
Fix Committed
Medium
aswani kumar

Bug Description

cassandra backup location needs to be consistent even in case of the custom data_file_directories configured in cassandra.yaml.

If customers choose to keep data dir in a custom partition, The backup_cassandra_data task backs up the data at
<hostname>/<customdir>/data/, however the restore_cassandra_data tries to restore from <hostname>/data/

Fix is to consistently backup at <hostname>/data/

Tags: provisioning
Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Fix:
===
(devenv)ijohnson@ijohnsondev1404:~/github/R2.21.x/contrail-fabric-utils$ diff fabfile/tasks/backup_restore.py fabfile/tasks/backup_restore.py.orig
216,219c216
< path_to_cassandra, data_dir = os.path.split(db_path)
< while data_dir == '':
< path_to_cassandra, data_dir = os.path.split(path_to_cassandra)
< path_to_cassandra += '/'
---
> path_to_cassandra = re.search('.*/cassandra/',db_path).group(0)
(devenv)ijohnson@ijohnsondev1404:~/github/R2.21.x/contrail-fabric-utils$

tags: added: provisioning
Changed in juniperopenstack:
assignee: nobody → aswani kumar (aswanikumar90)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

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

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

Review in progress for https://review.opencontrail.org/19097
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/19098
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/19092
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/0cc083e5765227da57daed1835de556a9d4b9c70
Submitter: Zuul
Branch: master

commit 0cc083e5765227da57daed1835de556a9d4b9c70
Author: Aswani Kumar Reddy G <email address hidden>
Date: Wed Apr 6 10:04:20 2016 +0530

Fix is to consistently backup at <hostname>/data/

1)cassandra backup location needs to be consistent even in case of the custom
data_file_directories configured in cassandra.yaml

Change-Id: If0e90ac0ce248b06b7748a568ede3fcc13ac264e
Closes-Bug: #1566022

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

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

commit c37608880b4cba3e9b895422f8dce3d6a614d041
Author: Aswani Kumar Reddy G <email address hidden>
Date: Wed Apr 6 10:04:20 2016 +0530

Fix is to consistently backup at <hostname>/data/

1)cassandra backup location needs to be consistent even in case of the custom
data_file_directories configured in cassandra.yaml

Change-Id: If0e90ac0ce248b06b7748a568ede3fcc13ac264e
Closes-Bug: #1566022

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

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

commit 50b129f4b48e4a4da1ef1d8ac02eca1146401c9e
Author: Aswani Kumar Reddy G <email address hidden>
Date: Wed Apr 6 10:04:20 2016 +0530

Fix is to consistently backup at <hostname>/data/

1)cassandra backup location needs to be consistent even in case of the custom
data_file_directories configured in cassandra.yaml

Change-Id: If0e90ac0ce248b06b7748a568ede3fcc13ac264e
Closes-Bug: #1566022

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

Review in progress for https://review.opencontrail.org/19097
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/19098
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/19098
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/b5453c4bcf9898199a9cec37f2084e1ba4fcd9a7
Submitter: Zuul
Branch: R2.22.x

commit b5453c4bcf9898199a9cec37f2084e1ba4fcd9a7
Author: Aswani Kumar Reddy G <email address hidden>
Date: Wed Apr 6 10:04:20 2016 +0530

Fix is to consistently backup at <hostname>/data/

1)cassandra backup location needs to be consistent even in case of the custom
data_file_directories configured in cassandra.yaml
2)replace_key routine was replacing all the matches of the skip_key
3)fix added to replace only the exact match

Change-Id: If0e90ac0ce248b06b7748a568ede3fcc13ac264e
Closes-Bug: #1566022
Closes-Bug: #1567067

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

Reviewed: https://review.opencontrail.org/19097
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/486ace9fbdd9560af296df0475b2ab122636c0c6
Submitter: Zuul
Branch: R2.21.x

commit 486ace9fbdd9560af296df0475b2ab122636c0c6
Author: Aswani Kumar Reddy G <email address hidden>
Date: Wed Apr 6 10:04:20 2016 +0530

Fix is to consistently backup at <hostname>/data/

1)cassandra backup location needs to be consistent even in case of the custom
data_file_directories configured in cassandra.yaml
2)replace_key routine was replacing all the matches of the skip_key
3)fix added to replace only the exact match

Change-Id: If0e90ac0ce248b06b7748a568ede3fcc13ac264e
Closes-Bug: #1566022
Closes-Bug: #1567067

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.