mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Add backing if vgname is defined
This commit is contained in:
parent
cdc0f480fc
commit
a20d1b0617
@ -322,7 +322,9 @@ def init(name,
|
||||
profile=profile, **kwargs)
|
||||
if not ret.get('created', False):
|
||||
return ret
|
||||
rootfs = info(name)['rootfs']
|
||||
lxc_info = info(name)
|
||||
rootfs = lxc_info['rootfs']
|
||||
#lxc_config = lxc_info['config']
|
||||
if seed:
|
||||
ret['seeded'] = __salt__['lxc.bootstrap'](
|
||||
name, config=salt_config, approve_key=approve_key, install=install)
|
||||
@ -396,6 +398,8 @@ def create(name, config=None, profile=None, options=None, **kwargs):
|
||||
vgname = tvg if tvg else __salt__['config.option']('lxc.vgname')
|
||||
template = select('template')
|
||||
backing = select('backing')
|
||||
if vgname and not backing:
|
||||
backing = 'lvm'
|
||||
lvname = select('lvname')
|
||||
fstype = select('fstype')
|
||||
size = select('size', '1G')
|
||||
@ -924,6 +928,7 @@ def info(name):
|
||||
ret['ipv4_ips'] = []
|
||||
ret['ipv6_ips'] = []
|
||||
ret['size'] = None
|
||||
ret['config'] = f
|
||||
|
||||
if ret['state'] == 'running':
|
||||
limit = int(get_parameter(name, 'memory.limit_in_bytes').get(
|
||||
|
@ -23,6 +23,10 @@ lxc_network_link="br0"
|
||||
default_path="/var/lib/lxc"
|
||||
|
||||
deploy_tar() {
|
||||
if [ -f ${path}/config]
|
||||
then
|
||||
cp ${path}/config ${path}/_orig_config
|
||||
fi
|
||||
tar xvf ${imgtar} -C ${path}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user