Mikko Vasili Hirvonen | 1 Feb 2012 12:17
Picon
Picon

RHEL6 and stateful firewall inside container

Hello users@...

I'm trying to upgrade our rhel5 based openvz servers to rhel6 but I got
problem with iptables. If I try to use firewall inside container, I can
load rules, but firewall rejects all incoming packets. Host is redhet-6
and container is centos-6. I tested with kernels

vzkernel-2.6.32-042stab044.17.x86_64
vzkernel-2.6.32-042stab048.1.x86_64
vzkernel-2.6.32-042stab049.2.x86_64

My firewall config
# Generated by iptables-save v1.4.7 on Wed Feb  1 13:05:26 2012
*mangle
:PREROUTING ACCEPT [2:381]
:INPUT ACCEPT [2:381]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:559]
:POSTROUTING ACCEPT [4:559]
COMMIT
# Completed on Wed Feb  1 13:05:26 2012
# Generated by iptables-save v1.4.7 on Wed Feb  1 13:05:26 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:559]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
(Continue reading)

Vasily Averin | 1 Feb 2012 13:39
Favicon

Re: RHEL6 and stateful firewall inside container

Hi Mikko,

1) You need to enable conntrack support for container, it is disabled by default.
IIRC following command should be enough to enable conntrack support for specified container only:
# vzctl set <CTID> --iptables iptable_filter --iptables ip_conntrack --save 

2) Also you need to load all modules on the host before loading of rules inside container. Container cannot
load modules, even indirectly. that's why loading of iptables rules failed inside container.
we recommend to add all required modules into iptables service configuration on the host.
on CentOS6 nodes you need to add all used modules into IPTABLES_MODULES variable in
/etc/sysconfig/iptables-config file.

thank you,
	Vasily Averin

On 02/01/2012 03:17 PM, Mikko Vasili Hirvonen wrote:
> Hello users@...
> 
> I'm trying to upgrade our rhel5 based openvz servers to rhel6 but I got
> problem with iptables. If I try to use firewall inside container, I can
> load rules, but firewall rejects all incoming packets. Host is redhet-6
> and container is centos-6. I tested with kernels
> 
> vzkernel-2.6.32-042stab044.17.x86_64
> vzkernel-2.6.32-042stab048.1.x86_64
> vzkernel-2.6.32-042stab049.2.x86_64
> 
> My firewall config
> # Generated by iptables-save v1.4.7 on Wed Feb  1 13:05:26 2012
> *mangle
(Continue reading)

Vasily Averin | 1 Feb 2012 13:41
Favicon

Re: RHEL6 and stateful firewall inside container

On 02/01/2012 04:39 PM, Vasily Averin wrote:
> Hi Mikko,
> 
> 1) You need to enable conntrack support for container, it is disabled by default.
> IIRC following command should be enough to enable conntrack support for specified container only:
> # vzctl set <CTID> --iptables iptable_filter --iptables ip_conntrack --save 

Sorry, I did not noticed that you're using mangle table too, so you need to add also "--iptables
iptable_mangle" into command above.

> 2) Also you need to load all modules on the host before loading of rules inside container. Container cannot
load modules, even indirectly. that's why loading of iptables rules failed inside container.
> we recommend to add all required modules into iptables service configuration on the host.
> on CentOS6 nodes you need to add all used modules into IPTABLES_MODULES variable in
/etc/sysconfig/iptables-config file.
> 
> thank you,
> 	Vasily Averin
> 
> On 02/01/2012 03:17 PM, Mikko Vasili Hirvonen wrote:
>> Hello users@...
>>
>> I'm trying to upgrade our rhel5 based openvz servers to rhel6 but I got
>> problem with iptables. If I try to use firewall inside container, I can
>> load rules, but firewall rejects all incoming packets. Host is redhet-6
>> and container is centos-6. I tested with kernels
>>
>> vzkernel-2.6.32-042stab044.17.x86_64
>> vzkernel-2.6.32-042stab048.1.x86_64
>> vzkernel-2.6.32-042stab049.2.x86_64
(Continue reading)

Scott Dowdle | 1 Feb 2012 21:31
Favicon

Re: Problems doing live migration

Greetings,

----- Original Message -----
> I'm trying to do a manual live migration on a Linux
> 2.6.32-5-openvz-amd64 and
> openvz 3.0.24, but I'm getting some troubles:
> 
> .- Container's suspend seems OK.
> .- But I'm not able to dump the container:
> "Can not dump container: Invalid argument
> Error: iptables-save exited with 255
> Checkpointing failed"
> .- I can issue iptables-save command with no problem.
> .- Also, I'm not able to resume the container:
> "Can not resume container: No such file or directory"
> .- After this happens, vzctl complains about quota issues.
> 
> Here's is a session log:
> 
> ~# vzctl chkpnt 114 --suspend
> Setting up checkpoint...
>         suspend...
>         get context...
> Checkpointing completed succesfully
> ~# vzctl chkpnt 114 --dump --dumpfile /tmp/114.dump
> Setting up checkpoint...
>         join context..
>         dump...
> Can not dump container: Invalid argument
> Error: iptables-save exited with 255
(Continue reading)

Scott Dowdle | 1 Feb 2012 21:36
Favicon

Re: Share container's HD space over servers

Blau,

----- Original Message -----
> I've setup a mirrored GlusterFs to share container's disc space and to
> have a spare fisical server in case it's needed.
> I only share the "private" directory over two servers, is it OK or I
> should share whole "lib/vz" directory? Now I switched from original HN
> to it's backup, most of CT works fine, but others not, but I don't know
> if it's due the shared disc space or it's related to the new HN configuration.
> Can I share vz disc space over two servers and switch from one to
> another? What directory should I share?

OpenVZ doesn't really support this sort of thing with any features that it offers... and any solution you
come up with, you'll have to engineer yourself.  Of course that doesn't mean that there aren't a number of
OpenVZ users out there who have done such a thing.  I haven't done it and I don't know anyone who has.

I occasionally see people trying to do the shared storage type thing with NFS and to the best of my knowledge,
that doesn't work well... but then again, the last time I saw someone trying it was quite a while ago so maybe
it is doable now.

So to answer your question... I don't know.  If you figure it out, please write up a wiki post on the openvz
website to share the information with others.  I believe some are using drbd and there is a wiki page for
that... but I haven't read it and I don't know if that is the same use case or not.

Good luck.  Sorry I didn't have any answers for you.

TYL,
--

-- 
Scott Dowdle
704 Church Street
(Continue reading)

Maoke | 2 Feb 2012 04:52
Picon

vmstat FPE

hi all, 

we recently found the vmstat in container result in Float Point Exception (but it is not a problem in the host). the kernel is 2.6.32-042stab044.11 and the procps version 3.2.7. any suggestions and hints? thanks a lot in advance!

best,
maoke
_______________________________________________
Users mailing list
Users@...
https://openvz.org/mailman/listinfo/users
Maoke | 2 Feb 2012 05:56
Picon

sync in container

hi all, 

we found sync in container may cause high disk I/O load (not able to supress it even with blkio throttle settings). 

do anyone have the similar experience and information to share? thanks a lot in advance. 

best,
maoke
_______________________________________________
Users mailing list
Users@...
https://openvz.org/mailman/listinfo/users
Mikko Vasili Hirvonen | 2 Feb 2012 09:51
Picon
Picon

Re: RHEL6 and stateful firewall inside container

Thank you Vasily. It is functioning now. I saw it is documented in vzctl
man page too.

On 02/01/2012 02:41 PM, Vasily Averin wrote:
> On 02/01/2012 04:39 PM, Vasily Averin wrote:
>> Hi Mikko,
>>
>> 1) You need to enable conntrack support for container, it is disabled by default.
>> IIRC following command should be enough to enable conntrack support for specified container only:
>> # vzctl set <CTID> --iptables iptable_filter --iptables ip_conntrack --save 
> 
> Sorry, I did not noticed that you're using mangle table too, so you need to add also "--iptables
iptable_mangle" into command above.
>  
>> 2) Also you need to load all modules on the host before loading of rules inside container. Container
cannot load modules, even indirectly. that's why loading of iptables rules failed inside container.
>> we recommend to add all required modules into iptables service configuration on the host.
>> on CentOS6 nodes you need to add all used modules into IPTABLES_MODULES variable in
/etc/sysconfig/iptables-config file.
>>
>> thank you,
>> 	Vasily Averin
>>
>> On 02/01/2012 03:17 PM, Mikko Vasili Hirvonen wrote:
>>> Hello users@...
>>>
>>> I'm trying to upgrade our rhel5 based openvz servers to rhel6 but I got
>>> problem with iptables. If I try to use firewall inside container, I can
>>> load rules, but firewall rejects all incoming packets. Host is redhet-6
>>> and container is centos-6. I tested with kernels
>>>
>>> vzkernel-2.6.32-042stab044.17.x86_64
>>> vzkernel-2.6.32-042stab048.1.x86_64
>>> vzkernel-2.6.32-042stab049.2.x86_64
>>>
>>> My firewall config
>>> # Generated by iptables-save v1.4.7 on Wed Feb  1 13:05:26 2012
>>> *mangle
>>> :PREROUTING ACCEPT [2:381]
>>> :INPUT ACCEPT [2:381]
>>> :FORWARD ACCEPT [0:0]
>>> :OUTPUT ACCEPT [4:559]
>>> :POSTROUTING ACCEPT [4:559]
>>> COMMIT
>>> # Completed on Wed Feb  1 13:05:26 2012
>>> # Generated by iptables-save v1.4.7 on Wed Feb  1 13:05:26 2012
>>> *filter
>>> :INPUT ACCEPT [0:0]
>>> :FORWARD ACCEPT [0:0]
>>> :OUTPUT ACCEPT [4:559]
>>> -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>>> -A INPUT -p icmp -j ACCEPT
>>> -A INPUT -i lo -j ACCEPT
>>> -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
>>> -A INPUT -j REJECT --reject-with icmp-host-prohibited
>>> -A FORWARD -j REJECT --reject-with icmp-host-prohibited
>>> COMMIT
>>> # Completed on Wed Feb  1 13:05:26 2012
>>>
>>> Is it know problem or is it my misconfiguration? Firewall on redhat-5 is
>>> functioning fine.
>>>
>>>
>>
> 

--

-- 
Mikko Hirvonen <Mikko.V.Hirvonen@...>
Helsingin yliopisto / Tietotekniikkakeskus / Verkkopalvelut
lxnf98mm | 2 Feb 2012 15:29
Picon

howto device by-id

How do I pass a device to a VE using the by-id link

# vzctl set 3261 --devnodes /dev/tape/by-id/scsi-200900de606413000:rw
Bad parameter for --devnodes: /dev/tape/by-id/scsi-200900de606413000:rw

Richard
Aleksandar Ivanisevic | 6 Feb 2012 16:43
X-Face
Picon
Gravatar

Re: A question about Node RAM

Tim Small <tim@...> writes:

> It also allows you to move nodes around easily and should allow you to
> carry out things like host node kernel updates without bringing down
> containers (using live migration to other HNs) - although we've not
> gotten around to testing this.

I've tested this and its terrible ;) Migration across two drbd volumes
syncing at the same time -- disaster in terms of latency and I/O
speed for the remaining node(s) in the cluster.

> Our machines are in pairs, but really it'd be better to have them in
> something like groups of four, so that when a HN fails, the remaining 3
> HNs each end up running a third of the evicted containers...  This would
> require corosync instead of heartbeat of course (heartbeat supports 2
> nodes only).

Groups of four might work ok provided that the drbd devices are on
separate disks and you are careful always to migrate to an unrelated
machine that doesn't have the standby volume from the source.

Gmane