Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Paul Graydon
slapos.core
Commits
9d6bd566
Commit
9d6bd566
authored
Nov 30, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos.cli.boot: remove code duplication
parent
2a0975a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
slapos/cli/boot.py
slapos/cli/boot.py
+4
-11
No files found.
slapos/cli/boot.py
View file @
9d6bd566
...
...
@@ -159,11 +159,8 @@ class BootCommand(ConfigCommand):
master_hostname
=
master_url
.
hostname
# Check that we have IPv6 ready
if
configp
.
get
(
'slapformat'
,
'ipv6_interface'
):
interface_name
=
configp
.
get
(
'slapformat'
,
'ipv6_interface'
)
else
:
interface_name
=
configp
.
get
(
'slapformat'
,
'interface_name'
)
_waitIpv6Ready
(
interface_name
)
_waitIpv6Ready
(
configp
.
get
(
'slapformat'
,
'ipv6_interface'
)
or
configp
.
get
(
'slapformat'
,
'interface_name'
))
# Check that node can ping master
if
valid_ipv4
(
master_hostname
):
...
...
@@ -176,17 +173,13 @@ class BootCommand(ConfigCommand):
app
=
SlapOSApp
()
# Make sure slapos node format returns ok
is_ready
=
_runFormat
(
app
)
while
is_ready
==
0
:
while
not
_runFormat
(
app
):
print
"[BOOT] [ERROR] Fail to format, try again in 15 seconds..."
sleep
(
15
)
is_ready
=
_runFormat
(
app
)
# Make sure slapos node bang returns ok
is_ready
=
_runBang
(
app
)
while
is_ready
==
0
:
while
not
_runBang
(
app
):
print
"[BOOT] [ERROR] Fail to bang, try again in 15 seconds..."
sleep
(
15
)
is_ready
=
_runBang
(
app
)
_removeTimestamp
(
instance_root
)
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