Skip to content

Commit

Permalink
fix to get correct glance images directory
Browse files Browse the repository at this point in the history
Change-Id: Ie9d3bba593694138e40743c65a83c8263d98a3de
Closes-Bug: #1640445
  • Loading branch information
aswanikumar90 committed Nov 9, 2016
1 parent f4d1fc2 commit b93cce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabfile/tasks/backup_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def backup_instance_image(db_datas, store_db='local'):
msg = "Processing glance image Backup and puting glance image backup into remote host:({HOST}) and default path is ~/contrail_bkup_data/hostname/images or backup path is defined as per testbed.py file \n"
remote_host = env.roledefs['backup'][0]
print (msg.format(HOST=remote_host))
images_path = sudo("grep 'filesystem_store_datadir' /etc/glance/glance-api.conf")
images_path = sudo("grep 'filesystem_store_datadir' /etc/glance/glance-api.conf | grep -v '#' ")
images_path = images_path.split('=')
images_path = images_path[-1]
images_path=images_path.strip()
Expand Down Expand Up @@ -852,7 +852,7 @@ def restore_instance_image(backup_data_path, store_db='local'):
msg = "Restoring backed-up images data in ({HOST}).\n"
with settings(host_string=host):
host_name = sudo('hostname')
images_path = sudo("grep 'filesystem_store_datadir' /etc/glance/glance-api.conf")
images_path = sudo("grep 'filesystem_store_datadir' /etc/glance/glance-api.conf | grep -v '#' ")
images_path = images_path.split('=')
images_path = images_path[-1]
images_path=images_path.strip()
Expand Down

0 comments on commit b93cce1

Please sign in to comment.