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
Klaus Wölfel
slapos.core
Commits
15c91309
Commit
15c91309
authored
Apr 24, 2015
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapgrid: define global-ipv4-network parameter useful when configuring cluster of VM
parent
41a62737
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+4
-1
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+9
-1
slapos/grid/templates/buildout-tail.cfg.in
slapos/grid/templates/buildout-tail.cfg.in
+3
-0
No files found.
slapos/grid/SlapObject.py
View file @
15c91309
...
...
@@ -344,7 +344,8 @@ class Partition(object):
certificate_repository_path
=
None
,
retention_delay
=
'0'
,
instance_min_free_space
=
None
,
instance_storage_home
=
''
instance_storage_home
=
''
,
ipv4_global_network
=
''
,
):
"""Initialisation of class parameters"""
self
.
buildout
=
buildout
...
...
@@ -362,6 +363,7 @@ class Partition(object):
self
.
server_url
=
server_url
self
.
software_release_url
=
software_release_url
self
.
instance_storage_home
=
instance_storage_home
self
.
ipv4_global_network
=
ipv4_global_network
self
.
key_file
=
''
self
.
cert_file
=
''
...
...
@@ -517,6 +519,7 @@ class Partition(object):
'key_file'
:
self
.
key_file
,
'cert_file'
:
self
.
cert_file
,
'storage_home'
:
self
.
instance_storage_home
,
'global_ipv4_network_prefix'
:
self
.
ipv4_global_network
,
}
open
(
config_location
,
'w'
).
write
(
buildout_text
)
os
.
chmod
(
config_location
,
0o640
)
...
...
slapos/grid/slapgrid.py
View file @
15c91309
...
...
@@ -233,7 +233,8 @@ def create_slapgrid_object(options, logger):
computer_partition_filter_list
=
op
.
get
(
'only-cp'
,
op
.
get
(
'only_cp'
)),
software_min_free_space
=
software_min_free_space
,
instance_min_free_space
=
instance_min_free_space
,
instance_storage_home
=
op
.
get
(
'instance_storage_home'
))
instance_storage_home
=
op
.
get
(
'instance_storage_home'
),
ipv4_global_network
=
op
.
get
(
'ipv4_global_network'
))
def
check_required_only_partitions
(
existing
,
required
):
...
...
@@ -288,6 +289,7 @@ class Slapgrid(object):
software_min_free_space
=
None
,
instance_min_free_space
=
None
,
instance_storage_home
=
None
,
ipv4_global_network
=
None
,
):
"""Makes easy initialisation of class parameters"""
# Parses arguments
...
...
@@ -343,6 +345,10 @@ class Slapgrid(object):
self
.
instance_storage_home
=
os
.
path
.
abspath
(
instance_storage_home
)
else
:
self
.
instance_storage_home
=
""
if
ipv4_global_network
:
self
.
ipv4_global_network
=
ipv4_global_network
else
:
self
.
ipv4_global_network
=
""
def
_getWatchdogLine
(
self
):
invocation_list
=
[
WATCHDOG_PATH
]
...
...
@@ -651,6 +657,7 @@ class Slapgrid(object):
retention_delay
=
retention_delay
,
instance_min_free_space
=
self
.
instance_min_free_space
,
instance_storage_home
=
self
.
instance_storage_home
,
ipv4_global_network
=
self
.
ipv4_global_network
,
)
computer_partition_state
=
computer_partition
.
getState
()
...
...
@@ -1110,6 +1117,7 @@ class Slapgrid(object):
buildout
=
self
.
buildout
,
logger
=
self
.
logger
,
instance_storage_home
=
self
.
instance_storage_home
,
ipv4_global_network
=
self
.
ipv4_global_network
,
)
local_partition
.
stop
()
try
:
...
...
slapos/grid/templates/buildout-tail.cfg.in
View file @
15c91309
...
...
@@ -25,4 +25,7 @@ cert_file = %(cert_file)s
[storage-configuration]
storage-home = %(storage_home)s
[network-information]
global-ipv4-network = %(global_ipv4_network_prefix)s
# This is end of zc.builodout profile's tail added by slapgrid
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