Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenNebula 3PAR Backup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FeldHost Public Projects
OpenNebula 3PAR Backup
Commits
6bf955b2
Commit
6bf955b2
authored
Oct 22, 2019
by
Kristian Feldsam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3PAR - delete snapshot
Signed-off-by:
Kristián Feldsam
<
feldsam@gmail.com
>
parent
45083330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
drivers/_3par.py
drivers/_3par.py
+8
-2
No files found.
drivers/_3par.py
View file @
6bf955b2
...
...
@@ -76,7 +76,7 @@ def backup_live(one, image, data_store, vm, vm_disk_id, verbose):
snap_id
=
one
.
vm
.
disksnapshotcreate
(
vm
.
ID
,
vm_disk_id
,
'Automatic Backup'
)
if
snap_id
is
False
:
raise
Exception
(
'Error creating snapshot!'
)
raise
Exception
(
'Error creating snapshot!
Check VM logs.
'
)
# get source name and create snap name
name
=
vv_name
(
image
.
SOURCE
)
...
...
@@ -95,7 +95,7 @@ def backup_live(one, image, data_store, vm, vm_disk_id, verbose):
except
exceptions
.
HTTPNotFound
:
# failed after 60s
if
i
>
11
:
raise
Exception
(
'Looks like snapshot is not created.
Investigate VM logs
'
)
raise
Exception
(
'Looks like snapshot is not created.
Check VM logs.
'
)
i
+=
1
time
.
sleep
(
5
)
...
...
@@ -133,4 +133,10 @@ def backup_live(one, image, data_store, vm, vm_disk_id, verbose):
print
'Unexporting snapshot from backup server...'
unexport_vv
(
snap_name
,
config
.
EXPORT_HOST
)
# delete snapshot
if
verbose
:
print
'Deleting snapshot...'
if
not
one
.
vm
.
disksnapshotdelete
(
vm
.
ID
,
vm_disk_id
,
snap_id
):
raise
Exception
(
'Can not delete snapshot! Check VM logs.'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment