Proxmox 4.0 lxc container process trouble

dw2412

Renowned Member
Mar 14, 2013
22
0
66
Hi,

just set up first proxmox 4.0 system and encountered the following problem:

In case you have nrpe / postfix running in lxc containers the processes will not start in node. Only self-made solution was to create propper systemd service startup scripts and remove the once from the debian packages in rc.d startup.

Maybe this happens to other processes, too. Didn't test, but it looks to me that the debian startup scripts check for processes running in process list without comparing the pid in corresponding pid files written in node /var/run. Since processes started in lxc containers are being listed in node too the services on node will not start.

Best regards

Andreas
 
which template do you use here?
 
Hi Tom,

thanks for your reply. It is Ubuntu 14.04 template. But I don't think it is template related since I've found some similar rpcbind issue in older Proxmox 3.4 that occured with latest rpcbind update a few weeks ago...

Andreas
 
if you used our integrated template downloader, you got the right template.
 
if you used our integrated template downloader, you got the right template.

OK. So template seems to be right.

For Porxmox 4.0 issue - maybe you could give it simply a try if you have some 15 minutes using postfix as an example. Configure it to listen on ip address other than just localhost on node (Sattelite + Smarthost), start it up in any container (to keep compabile with my setup use a 14.04 Ubuntu), start postfix in lxc container, restart it on node. Even after a reboot the postfix service will not start up on node.

For Proxmox 3.4 issue (just if this is still in support and interest exist to analyse and fix it) - just install glusterfs in a OpenVZ container, have portmapper running in there (rpcbind), configure nfs-kernel-server in node, try to restart rpcbind service in node. It will not work with default startup scripts, rpcbind will maybe only start after reboot in case the containers start afterwards.

Andreas
 
Here's why it's a good thing debian's moving to systemd, if only they'd speed up the process a bit. Do you experience this behavior all the time or just randomly? Because what I can immediately see is that debian's postfix init scripts don't ever remove the pid files. So if you stop the postfix service you still have a /var/spool/postfix/pid/master.pid file. Now if a container happens to start a postfix process under that PID the host will believe that its own postfix is running... *sigh*
This is a debian bug and should thus be reported on the debian bug tracker. (And probably for some more packages...)
 
Here's why it's a good thing debian's moving to systemd, if only they'd speed up the process a bit. Do you experience this behavior all the time or just randomly? Because what I can immediately see is that debian's postfix init scripts don't ever remove the pid files. So if you stop the postfix service you still have a /var/spool/postfix/pid/master.pid file. Now if a container happens to start a postfix process under that PID the host will believe that its own postfix is running... *sigh*
This is a debian bug and should thus be reported on the debian bug tracker. (And probably for some more packages...)

Yeah - Debian would be another good point to start. Just I don't have an account there and no experience how to report it at all there. May I ask you at proxmox for assistence?

And yes - I experience this problem always as long as the process is started in container it will not start in node.

Thanks

Andreas
 
Yeah - Debian would be another good point to start. Just I don't have an account there and no experience how to report it at all there. May I ask you at proxmox for assistence?
:-(
Since it's probably not just that one package I guess the debian-user mailing list would be a good place to start.

And yes - I experience this problem always as long as the process is started in container it will not start in node.

Even if you restart the container in question? (The problem I saw in the init scripts (there may be more, I only checked one file and that was immediately obvious) would persist as long as the container's postfix' host-side PID matches the one in the host's leftover PID files.)

EDIT: I also found an old post about a problem with postfix's pid file... does explicitly doing `service postfix stop` before starting it change anything? (Provided you can reproduce the situation easily...)
http://www.linuxquestions.org/quest...ix-master-is-dead-but-pid-file-exists-851700/
 
:-(


EDIT: I also found an old post about a problem with postfix's pid file... does explicitly doing `service postfix stop` before starting it change anything? (Provided you can reproduce the situation easily...)
http://www.linuxquestions.org/quest...ix-master-is-dead-but-pid-file-exists-851700/

Well - if the containers in question running postfix / nrpe are stopped, the process on node will start. Starting containers afterwards results in postfix / nrpe running in containers. But honestly - who wants to stop a container just to restart a service on node?

Writing systemd service scripts and removing the crappy rc.d scripts helped actually and seems for me the more logical solution.

Andreas
 
Oh I meant running `service postfix stop` on the host, not the container... the link above led me to believe that the stop action deletes the pid file.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!