comments inline
On 08/16/2015 07:43 PM, Alexandre Derumier wrote:
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/API2/LXC.pm | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 7eb0afb..870da69
yes, I see that, could be used to mount an encryptet rootfs.
I'll do tests.
I have done a lot of tests, I'm unable to do it in pre-mount hook.
If I mount the root manually, I have error after when lxc try to mount rootfs.
and I need the root, to mount others mountpoints.
So, the mount hook
I currently use $scfg-{path} to test for filesystem based storages
(that also works with glusterfs).
But you need to exclude volumes with format 'subvol'. See code inside
PVE::LXC::update_lxc_config(
Oh, ok. I'll fix this.
(Sorry I don't have zfs on my dev server currently)
- Mail
---
src/PVE/HA/CRM.pm |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/HA/CRM.pm b/src/PVE/HA/CRM.pm
index 9feda05..4196bba 100644
--- a/src/PVE/HA/CRM.pm
+++ b/src/PVE/HA/CRM.pm
@@ -16,7 +16,7 @@ use PVE::HA::Manager;
my $valid_states = {
wait_for_quorum =
---
www/manager/ha/Fencing.js |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager/ha/Fencing.js b/www/manager/ha/Fencing.js
index f6bd365..1238fbc 100644
--- a/www/manager/ha/Fencing.js
+++ b/www/manager/ha/Fencing.js
@@ -16,7 +16,7 @@
I currently use $scfg-{path} to test for filesystem based storages
(that also works with glusterfs).
But you need to exclude volumes with format 'subvol'. See code inside
PVE::LXC::update_lxc_config(
Oh, ok. I'll fix this.
(Sorry I don't have zfs on my dev server currently)
You can now
---
PVE/API2/Qemu.pm | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 5d3b352..60687e1 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -674,7 +674,8 @@ __PACKAGE__-register_method({
next if
I can try, but I'm not sure if lxc will not thrown error after, as it'll try
to mount the rootfs again.
Maybe there is a way to avoid that. man lxc.container.conf mentions
that it can be used for for manipulation of the rootfs
___
pve-devel
Maybe there is a way to avoid that. man lxc.container.conf mentions
that it can be used for for manipulation of the rootfs
yes, I see that, could be used to mount an encryptet rootfs.
I'll do tests.
- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier aderum...@odiso.com
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 56 ++--
1 file changed, 34 insertions(+), 22 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index c68207b..1a0a514 100644
--- a/src/PVE/LXC.pm
+++
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 51 ++
src/lxc-pve-mount-hook | 2 ++
2 files changed, 53 insertions(+)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 1a0a514..086dc60 100644
---
It's better to vm_stop_cleanup inside poststop hook,
in case of CT failure (wrong start for example)
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/Makefile | 6 ++-
src/PVE/API2/LXC.pm | 4 --
src/lxc-pve-poststop-hook | 128
changelog:
- add pre-start hook and move activate volumes code inside
- don't write lxc.cgroup.devices.allow in conf, but directly write to cgroup in
mount hook
- move setup_mountpoints for LXC::Setup::Base to LXC::
This is tested with loop raw file, subvol and rbd volume.
lxc-start correctly
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/Makefile | 6 +-
src/PVE/API2/LXC.pm | 17 --
src/lxc-pve-prestart-hook | 153 ++
src/lxc-pve.conf | 1 +
4 files changed, 159 insertions(+), 18
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/API2/LXC.pm | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 7eb0afb..b395af3 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1007,7
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 10a89f2..c68207b 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1266,9 +1266,28 @@ sub
I Think I can solve lxc.cgroup.devices.allow, by simply writing
/sys/fs/cgroup/devices/lxc/VMID/devices.list
in hook.
So, I can move the activate part to pre_start hook.
I'll do tests today.
- Mail original -
De: aderumier aderum...@odiso.com
À: dietmar diet...@proxmox.com
Cc:
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 10a89f2..c68207b 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1266,9 +1266,28 @@ sub
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/API2/LXC.pm | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 7eb0afb..b395af3 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1007,7
It's better to vm_stop_cleanup inside poststop hook,
in case of CT failure (wrong start for example)
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/Makefile | 6 ++-
src/PVE/API2/LXC.pm | 4 --
src/lxc-pve-poststop-hook | 135
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 55 +--
1 file changed, 33 insertions(+), 22 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index c68207b..de9dff3 100644
--- a/src/PVE/LXC.pm
+++
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXCSetup/Base.pm | 47 +++
1 file changed, 47 insertions(+)
diff --git a/src/PVE/LXCSetup/Base.pm b/src/PVE/LXCSetup/Base.pm
index b4d8286..b4215f1 100644
--- a/src/PVE/LXCSetup/Base.pm
Get a understandble message,
if someone try to increase a qcow2 image where one or more snapshots reside
---
PVE/API2/Qemu.pm | 6 ++
1 file changed, 6 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 24a066f..5caaf1a 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
changelog :
- add support for subvols
- remove lxc.aa_profile = lxc-container-default-with-mounting
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
So it is no longer possible to start such containers using lxc-start?
On August 17, 2015 at 3:18 PM Alexandre Derumier aderum...@odiso.com wrote:
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/API2/LXC.pm | 14 +-
1 file changed, 13 insertions(+), 1
You can now create 'subvol' with normal directory storage, by passing zero
size
with pct create, or simply:
Ok, I'll improve my patches, because it don't work currently with subvol. (I
have only tested with loop raw and block device).
It's a little bit different with subvol.
- Mail
@@ -721,7 +722,7 @@ __PACKAGE__-register_method({
},
delete = {
description = Indicated a pending delete request.,
- type = 'boolean',
+ type = 'integer',
optional = 1,
},
I Think I can solve lxc.cgroup.devices.allow, by simply writing
/sys/fs/cgroup/devices/lxc/VMID/devices.list
in hook.
So, I can move the activate part to pre_start hook.
AFAIK we write the LXC conf file at create time, and when we do 'pct start'.
So there is no real need to rewrite it
OK, I applied the patches -
I am testing now, an try to apply cleanups when I think I can improve code.
Please can you test if those patches works for you:
https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=9459f07d921d224dd6ba059e3d08b29908f01eb6
AFAIK we write the LXC conf file at create time, and when we do 'pct start'.
So there is no real need to rewrite it again in pre-start hook?
I don't write it again in pre-start hook.
(I only move activate volumes code to pre-start hook , and keep write lxc
config in vm_start) : (patch 4/5)
Just found a feature request here:
https://github.com/lxc/lxc/issues/195
I guess that would also simplify your code?
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
So it is no longer possible to start such containers using lxc-start?
mmm, activate could be done could be done in a pre-start hook.
But I need to access real device devices path to configure
lxc.cgroup.devices.allow, and lxc.mount.entry for subvol, so before lxc-start.
- Mail original
On August 17, 2015 at 8:26 PM Alexandre DERUMIER aderum...@odiso.com wrote:
So it is no longer possible to start such containers using lxc-start?
mmm, activate could be done could be done in a pre-start hook.
But I need to access real device devices path to configure
I guess that would also simplify your code?
Yes, I have already see this tracker (from 2014).
Definiltiity, it could simplify a lot the code.
I think it should be too diffcult to implement, as rootfs already implement
almost all the features.
But I don't have skill to patch lxc ;)
- Mail
But I need to access real device devices path to configure
lxc.cgroup.devices.allow, and lxc.mount.entry for subvol, so before
lxc-start.
That does not work in the pre-start hook? We can configure before, so that it
is
still possible to use lxc-start directly?
Do you want to rewrite
Yes sure we need this clean up.
On 08/17/2015 09:13 AM, Dietmar Maurer wrote:
- system(/sbin/tc filter del dev $iface parent : protocol ip prio
50 estimator 1sec 8sec /dev/null 21);
+system(/sbin/tc filter del dev $iface parent : protocol all
pref 50 u32 /dev/null 21);
I think we need this cleanup?
diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index e1e22b0..ff4a89c 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -67,7 +67,7 @@ sub setup_tc_rate_limit {
my ($iface, $rate, $burst, $debug) = @_;
system(/sbin/tc class del dev $iface
in the pvesm and pvesh we are giving the correct size of the used space from a
disk.
this change make the output of Gui and CLI consistent.
---
bin/pvestatd |5 +
www/manager/storage/StatusView.js |7 +--
2 files changed, 2 insertions(+), 10 deletions(-)
in the pvesm and pvesh we are giving the correct size of the used space from a
disk.
this change make the output of Gui and CLI consistent.
---
bin/pvestatd |5 +
www/manager/storage/StatusView.js |7 +--
2 files changed, 2 insertions(+), 10 deletions(-)
why do we need this? I thought we do all mounts on the host?
On 08/16/2015 07:43 PM, Alexandre Derumier wrote:
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 04ff00d..c3f6685
Not sure if we should mix that into the LXSetup code. Maybe it is better
to use
the lxc.hook.pre-mount hook? (see man lxc.container.conf)
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Not sure if we should mix that into the LXSetup code. Maybe it is better to
use
the lxc.hook.pre-mount hook? (see man lxc.container.conf)
AFAIK, the rootfs is not yet mounted in pre-mount hook.
So I can't mount other mountpoints.
Maybe we should also mount rootfs there? I mean, we do it
why do we need this? I thought we do all mounts on the host?
Indeed, you are right, this is not needed.
you can't remove this patch.
(I think I had tried in past to mount from the guest).
- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier aderum...@odiso.com, pve-devel
Maybe we should also mount rootfs there? I mean, we do it for all other
mountpoint, so why not for rootfs?
I can try, but I'm not sure if lxc will not thrown error after, as it'll try to
mount the rootfs again.
- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier
applied patch 1-3
On 08/16/2015 07:43 PM, Alexandre Derumier wrote:
Signed-off-by: Alexandre Derumier aderum...@odiso.com
---
src/PVE/LXC.pm | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index fbdc5bb..10a89f2 100644
--- a/src/PVE/LXC.pm
+++
45 matches
Mail list logo