Commit f7eebb0c authored by Antoine Catton's avatar Antoine Catton

Put the instance status into lxc.conf

parent 15a75cf3
...@@ -128,6 +128,8 @@ class Recipe: ...@@ -128,6 +128,8 @@ class Recipe:
for key, value in self.buildout['slap_connection'].iteritems(): for key, value in self.buildout['slap_connection'].iteritems():
# XXX: Waiting for SlapBaseRecipe to use dash instead of underscores # XXX: Waiting for SlapBaseRecipe to use dash instead of underscores
buildout.set('slap-connection', key.replace('_', '-'), value) buildout.set('slap-connection', key.replace('_', '-'), value)
# XXX: Needed for lxc. Use non standard API
buildout.set('slap-connection', 'requested', self.computer_partition._requested_state)
work_directory = os.path.abspath(self.buildout['buildout'][ work_directory = os.path.abspath(self.buildout['buildout'][
'directory']) 'directory'])
......
...@@ -36,6 +36,7 @@ bridge = $${slap-connection:bridge-name} ...@@ -36,6 +36,7 @@ bridge = $${slap-connection:bridge-name}
interface = lxc$${slap-network-information:network-interface} interface = lxc$${slap-network-information:network-interface}
name = $${uuid:uuid} name = $${uuid:uuid}
rootfs = $${rootfs:downloaded-file} rootfs = $${rootfs:downloaded-file}
requested = $${slap-connection:requested}
[uuid] [uuid]
recipe = slapos.cookbook:uuid recipe = slapos.cookbook:uuid
......
# %(requested)s
lxc.utsname = %(name)s lxc.utsname = %(name)s
lxc.network.type = veth lxc.network.type = veth
......
...@@ -29,7 +29,7 @@ mode = 0644 ...@@ -29,7 +29,7 @@ mode = 0644
[template-lxc] [template-lxc]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-lxc.cfg url = ${:_profile_base_location_}/instance-lxc.cfg
md5sum = 7be7335c6d6d26a6e1f22717bba89769 md5sum = 5ecbded7dacfa66964a2172bbfddfb5f
output = ${buildout:directory}/template-lxc.cfg output = ${buildout:directory}/template-lxc.cfg
mode = 0644 mode = 0644
...@@ -37,8 +37,8 @@ mode = 0644 ...@@ -37,8 +37,8 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
filename = lxc.conf.in filename = lxc.conf.in
md5sum = 47cf7520c17c964d4d93608d6785a6a3
download-only = true download-only = true
md5sum = e9e6b23609a522d55ef44fb8efd87b44
[slapos-toolbox] [slapos-toolbox]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment