www.FOSS-Cloud.org
Personal tools
Patches

From FOSS-Cloud

Master Index  |  Administration  |  Support

Handling Logfiles OpenLDAP

Valid FOSS-Cloud Versions

This patch should be implemented on

  • FOSS-Cloud 1.3.0
  • FOSS-Cloud 1.3.1
Within FOSS-Cloud 1.3.2, the patch is integrated

Overview

Dynamic machines are generating a lot of information which are stored in log files on /var/lib/openldap-hdb/foss-cloud/log.0000000001 to log.0000000xxx. Each log file has arround 10MB. If there is some missconfiguration in LDAP, slapd is generating some 100 files the day. As FOSS-Cloud is storing a backup of your LDAP in /var/backup/ldap every day, old backup files in /var/lib/openldap-hdb/foss-cloud/ are useless, but without the active archive file, usually the file with the highest number, OpenLDAP will not continue to work.

Solution

Add a cron job to delete only the inactive archive log files.

root # echo "*/5 * * * * /usr/bin/db4.8_archive -a -h /var/lib/openldap-hdb/foss-cloud/ | xargs rm -v" >> /etc/cron.d/log-backup

Rename the file

root # mv /etc/cron.d/log-backup /etc/cron.d/fc-log-maintenance

Restart the cron daemon

root # service dcron restart

Multinode Environment

On a multinode environment repead this steps on the secondary master node.

Overflow folder /var

Valid FOSS-Cloud Versions

This patch should be implemented on

  • FOSS-Cloud 1.2.20
  • FOSS-Cloud 1.3.0
Within FOSS-Cloud 1.3.1, the patch is integrated

Overview

The directory / var is 3 GB in size. The reason for the overflow is, that in some log files are growing to fast, for example if a virtual machine is in a undefined state. The patch fc-patch-var-log is checking all log files and will backup them to /var/backup if they become more than 50MB.

Installation

Please login via ssh in to the node as root and follow the instructions below.

Get the patch
root # wget http://www.foss-cloud.org/download/patch/fc-patch-var-log/fc-patch-var-log
Set permissions
root # chmod 755 fc-patch-var-log
Install the patch
root # ./fc-patch-var-log
Remove the installation file
root # rm fc-patch-var-log

Repeat this installation on all nodes, including storage nodes.

Files

  • /etc/cron.d/log-backup
  • /usr/sbin/fc-log-backup
Go Top

Missing roles of VM-User

Valid FOSS-Cloud Versions

This patch should be implemented on

  • FOSS-Cloud 1.3.0
This patch is only needed on new installed FOSS-Cloud releases 1.3.0.
If you update a FOSS-Cloud 1.2.20 to 1.3.0 it is fixed yet.

Commands

Please login via ssh in to the node as root and follow the instructions below. In a cluster installation, do it on the primary master node.

Go to /root
root # cd /root
Get the needed script
root # wget http://packages.foss-cloud.org/files/fc-roles-vm-user-import
Set permission
root # chmod 750 /root/fc-*
Run the script
root # /root/fc-roles-vm-user-import

Output

You should get:



                     __________  __________       ________                __
                    / ____/ __ \/ ___/ ___/      / ____/ /___  __  ______/ /
                   / /_  / / / /\__ \\__ \______/ /   / / __ \/ / / / __  /
                  / __/ / /_/ /___/ /__/ /_____/ /___/ / /_/ / /_/ / /_/ /
                 /_/    \____//____/____/      \____/_/\____/\__,_/\__,_/



Please enter your ADMIN password of the LDAP

Password: 

ldap_initialize( ldaps://10.1.130.8:636/??base )
add objectclass:
        top
        sstUserRightSetting
add sstuserrightsectionaction:
        dynamicVM.view
add sstuserrightvalue:
        owner
adding new entry "sstUserRightSectionAction=dynamicVM.view,uid=4000019,ou=roles,dc=foss-cloud,dc=org"
modify complete

add objectclass:
        top
        sstUserRightSetting
add sstuserrightsectionaction:
        persistentVM.view
add sstuserrightvalue:
        owner
adding new entry "sstUserRightSectionAction=persistentVM.view,uid=4000019,ou=roles,dc=foss-cloud,dc=org"
modify complete

add objectclass:
        top
        sstUserRightSetting
add sstuserrightsectionaction:
        vmPool.view
add sstuserrightvalue:
        owner
adding new entry "sstUserRightSectionAction=vmPool.view,uid=4000019,ou=roles,dc=foss-cloud,dc=org"
modify complete
Go Top