Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lvm-snapshots
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
lvm-snapshots
Commits
dfe7a860
Commit
dfe7a860
authored
5 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Use logging.warning instead of logging.warn
parent
1ea7d159
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lvmsnapshot.py
+4
-4
4 additions, 4 deletions
lvmsnapshot.py
with
4 additions
and
4 deletions
lvmsnapshot.py
+
4
−
4
View file @
dfe7a860
...
...
@@ -86,7 +86,7 @@ def run_process(command, check=True):
if
result
.
stdout
:
logging
.
info
(
result
.
stdout
.
decode
(
"
utf-8
"
).
strip
())
if
result
.
stderr
:
logging
.
warn
(
result
.
stderr
.
decode
(
"
utf-8
"
).
strip
())
logging
.
warn
ing
(
result
.
stderr
.
decode
(
"
utf-8
"
).
strip
())
return
result
@contextmanager
...
...
@@ -272,7 +272,7 @@ class Snapshot:
]
run_process
(
remove_command
,
check
=
True
)
except
sp
.
CalledProcessError
:
logging
.
warn
(
"
Removing {} failed
"
.
format
(
self
.
get_name
()))
logging
.
warn
ing
(
"
Removing {} failed
"
.
format
(
self
.
get_name
()))
def
unmount
(
self
):
logging
.
debug
(
"
unmounting snapshot {}
"
.
format
(
self
.
get_name
()))
...
...
@@ -410,9 +410,9 @@ def update_snapshots():
snapshots
=
Snapshot
.
list_snapshots
()
periods
,
min_interval
=
Config
.
periods
,
Config
.
min_interval
for
volume
in
set
(
periods
.
keys
())
-
set
(
snapshots
.
keys
()):
logging
.
warn
(
"
Warning: Volume {} is configured but does not exist or has no snapshots.
"
.
format
(
volume
))
logging
.
warn
ing
(
"
Warning: Volume {} is configured but does not exist or has no snapshots.
"
.
format
(
volume
))
for
volume
in
set
(
snapshots
.
keys
())
-
set
(
periods
.
keys
()):
logging
.
warn
(
"
Warning: Volume {} does exist but is not configured.
"
.
format
(
volume
))
logging
.
warn
ing
(
"
Warning: Volume {} does exist but is not configured.
"
.
format
(
volume
))
snapshots
.
pop
(
volume
)
for
volume
in
snapshots
:
unmarked_snapshots
=
mark_snapshots
(
snapshots
[
volume
],
periods
[
volume
],
min_interval
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment