self created problem with OpenVZ control

Discussion in 'Installation/Configuration' started by voidzero, Jul 12, 2012.

  1. voidzero

    voidzero New Member

    Hi everyone,

    I installed ispconfig, then I changed a few things and now I need some help with OpenVZ. So first I'll describe how I initially installed ISPConfig 3 and then I'll describe the changes. Finally I'll explain what the problem is.

    At first I installed nginx, mysql and OpenVZ and installed ispconfig. The initial purpose was to use nginx only for OpenVZ control and I was indeed able to control the containers.

    Then I installed apache and ftp to container one, email on container two and DNS on container 3. I had set up container one to be the master and the other containers to use that master. All containers use the controller's mysql server. Everything works so far with no problems.

    So now I was able to reach ispconfig(openVZ) via IP address 1 where I could control OpenVZ, and, with the use of NAT, I could reach ispconfig(rest) via IP address 2.

    Then I decided that I wanted the OpenVZ controller to also be the database server. I did that so I could get rid of the the service warning "mysql is down" and also because then I didn't need to setup a second mysql server on container one. So I took the following steps:

    1. Backup the ISPConfig database of the OpenVZ controller;
    2. Backup /usr/local/ispconfig
    3. Uninstall ispconfig
    4. Reinstall ispconfig and join an existing multiserver configuration on container one;
    5. Copy the openvz_* tables from the old database to Container one's database
    6. Update server_ip in those tables to match the ID of the controller's server_id (being 4)
    7. Manually edit and save each option in Container one's OpenVZ settings.

    I should probably add that I (accidentally) answered yes to the question "will this server host the ispconfig interface." I'm not sure if that will cause any problem..?

    Anyway, I see the OpenVZ hosts in the control panel now. The only thing that does not work is, well, every OpenVZ setting I change. So starting/stopping containers, creating them, et cetera. And now I also notice that all actions in the sys_remoteaction table of container one are stuck in the pending state, for all server_id's 1-4 i.e. http/ftp, email, DNS and OpenVZ.

    I would appreciate help with solving this. The server is not in production so if it's better to reinstall the whole thing I'll go and do that. But maybe it is something that can be easily fixed.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not a problem, as long as you dont login to the inteface on the slave server.

    ISPConfig uses the mysql instances as cache to speed up operations and to ensure that your services dont get down when the master mysql is down. So this configuration that you did is not recommended for several reasons:

    1) It introduces a single point of failure, so your whole cluster will be down now when a single mysql database fails.
    2) It is slower as you disabled the caching.
    3) I might fail with connection errors under higher load.

    Please use thed ebugging instructions from FAQ to find out whats wrong.

    A Reinstall should not be nescessary.
     
  3. voidzero

    voidzero New Member

    Hi Till,

    So in reply to your suggestions re mysql, would you suggest to put a MySQL server on all OpenVZ containers, or only on the http container? I can see the benefit of caching so I will make use of that.

    I've tried to enable Debug logging, I forgot to mention it. For some reason this doesn't work, it looks like something went wrong when I did manual database manipulations. Which leads me to believe I have introduced other bugs and I think it's better to set it up again, properly, from the beginning.

    Finally, I'm worried about one other thing -- OpenVZ support on Debian. I noticed that Debian will drop OpenVZ support in Wheezy. I have some experience with LXC (Linux Containers). Any recommendations from your side?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    LXC containers are not ready for hosting enviromets yet as the lack the config options to restrict cpu, buffer, memory and quota usage in detail. Openvz kernels are also available from the openvz project directly and there is a repository from proxmox which offers openvz kernels as well whch are even newer then the ones from debian, so it does not matter if debian drops them in their main repository
     
  5. voidzero

    voidzero New Member

    Thanks for that info! I'll be on my way to reinstall the box in a better way then :)
     
  6. voidzero

    voidzero New Member

    There. Box reinstalled, OpenVZ containers for web, mail and DNS, moved all the important things from the old production box and everything is working very well so far. :) I have just copied all of ISPConfig's settings (I re-entered everything in the ISPConfig control panel manually!)

    One thing left: I want to restore the old passwords for email, web and so forth. How can I do that? I have the old server's database dumps, can I restore the password only in the master or should this also be done on the slaves? It is very important for one user because I don't have any clue how to reach the user other than via email hosted by me :)

    (You know, as an aside, an elaborate import/export would be so very nice to have.. is this something on the roadmap?)
     

Share This Page