Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autoupdate Tester
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
Autoupdate Tester
Commits
ba802bcc
Commit
ba802bcc
authored
4 years ago
by
Nico
Browse files
Options
Downloads
Patches
Plain Diff
remove unused code
parent
c43cdf5e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ffs-updatetest.py
+0
-33
0 additions, 33 deletions
ffs-updatetest.py
with
0 additions
and
33 deletions
ffs-updatetest.py
+
0
−
33
View file @
ba802bcc
...
...
@@ -105,39 +105,6 @@ def create_snapshot_context():
restore_snapshot
(
snap_name
)
delete_snapshot
(
snap_name
)
def
wait_for_unavailable
():
"
Rebooting system
"
logging
.
debug
(
"
Waiting for VM to become unavailable...
"
)
for
i
in
range
(
90
):
result
=
subprocess
.
run
([
"
qm
"
,
"
guest
"
,
"
cmd
"
,
args
.
vmid
,
"
ping
"
])
if
result
.
returncode
==
0
:
logging
.
debug
(
"
Try {}: VM available
"
.
format
(
i
))
else
:
logging
.
debug
(
"
VM has become unavailable after {} tries
"
.
format
(
i
))
return
True
time
.
sleep
(
1
)
logging
.
warning
(
"
Timeout waiting for VM to become unavailable
"
)
return
False
def
wait_for_available
():
logging
.
debug
(
"
Waiting for VM to become available...
"
)
for
i
in
range
(
90
):
result
=
subprocess
.
run
([
"
qm
"
,
"
guest
"
,
"
cmd
"
,
args
.
vmid
,
"
ping
"
])
if
result
.
returncode
!=
0
:
logging
.
debug
(
"
Try {}: VM unavailable
"
.
format
(
i
))
else
:
logging
.
debug
(
"
VM has become available after {} tries
"
.
format
(
i
))
return
True
time
.
sleep
(
1
)
logging
.
warning
(
"
Timeout waiting for VM to become available
"
)
return
False
def
wait_for_reboot
():
if
wait_for_unavailable
()
and
wait_for_available
():
return
True
logging
.
warning
(
"
Timeout waiting for VM reboot
"
)
return
False
def
run_autoupdate
():
logging
.
debug
(
"
Forcing autoupdate
"
)
terminal
=
spawn_console
()
...
...
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