mandriva
 

Pulse 2 Package server configuration file

Olivier Roussy

$Id: pulse2-package-server-configuration.xml 182 2009-10-08 13:40:02Z nrueff $

Revision History
Revision 1.2.4 2009-09-21 CD
  • New Pulse 2 release, new use_iocp_reactor option

Revision 1.2.3 2009-07-22 NR
  • New Pulse 2 Release, but no new option

Revision 1.2.2 2009-05-19 NR
  • New Pulse 2 Release, but no new option

Revision 1.2.1 2009-05-12 OR
  • default configuration file has moved from /etc/mmc/pulse2/pserver to /etc/mmc/pulse2/package-server

Revision 1.2.0 2008-21-21 OR
  • Initial official release

Abstract

This document explains the content of the configuration file of the package server service from Pulse 2


1. Introduction

The « package server » service is the Pulse 2 daemon that implement all the package apis, it permit the creation, edition, suppression, share, mirroring... of packages.

The service configuration file is /etc/mmc/pulse2/package-server/package-server.ini

Like all Pulse 2 related configuration file, its file format is INI style. The file is made of sections, each one starting with a « [sectionname] » header. In each section options can be defined like this: « option = value ».

For example:

[section1]
option1 = 1
option2 = 2

[section2]
option1 = foo
option2 = plop      

2. Configuration file sections

For now four sections are available in this configuration file. The section describing the mirror, package_api_get or package_api_put can be duplicated if you need to have more than one api of this kind.

Table 1. package-server.ini available sections

Section name Description Optional
main Common package server configuration directives no
daemon Package server daemon related behaviors yes
ssl Package server ssl related dehaviors yes
mirror_api   yes
user_package_api   yes
scheduler_api   yes
mirror:XX   yes
package_api_get:XX   yes
package_api_put:XX   yes

All the other sections (loggers, handlers, ...) are related to Python language logging framework. See http://docs.python.org/lib/logging-config-fileformat.html .

3. « main » section

This section is used to configure the inventory server services.

Table 2. Available options for the "main" section

Option name Description Optional Default value
host The hostname or ip address where the inventory. yes localhost
port The port on which the inventory listen. yes 9999
use_iocp_reactor Windows XP, Windows 2003 and Windows 2008 only. This option sets the Twisted event loop to use the IOCP reactor for better performance. Please read Section 12, “Pulse 2 Package Server performance on win32 platforms” Yes 0
package_detect_activate Is package autodetection activated yes 0
package_detect_loop Time between two loops of detection yes 60
package_detect_smart_method methods in none, last_time_modification, check_size; for more than 1 method, separate with "," yes none
package_detect_smart_time   yes 60
package_mirror_loop   yes 5
package_mirror_target Package api can synhronise package data to others servers; package synchronisation targets yes  
package_mirror_status_file package synchronisation state file. used only if package_mirror_target is defined. File where pending sync are written so that they can be finished on package server restart. yes /var/data/mmc/status
package_mirror_command package synchronisation command to use yes /usr/bin/rsync
package_mirror_command_options package synchronisation command options yes -ar --delete
package_mirror_level0_command_options package synchronisation command on only one level options yes -d --delete
package_mirror_command_options_ssh_options options passed to SSH via "-o" if specified --rsh is automatically added to package_mirror_command_options yes ""
package_global_mirror_activate loop for the sync of the whole package directory; can only be activated when package_mirror_target is given yes 1
package_global_mirror_loop   yes 3600
package_global_mirror_command_options   yes -ar --delete
real_package_deletion real package deletion yes 0
mm_assign_algo machine/mirror assign algo yes default
up_assign_algo user/packageput assign algo yes default

package_mirror_command_options_ssh_options can be for exemple :

IdentityFile=/root/.ssh/id_dsa StrictHostKeyChecking=no Batchmode=yes PasswordAuthentication=no ServerAliveInterval=10 CheckHostIP=no ConnectTimeout=10

4. « daemon » section

This section sets the package server service run-time options and privileges.

Table 3. Available options for the "daemon" section

Option name Description Optional Default value
pidfile The package server service store its PID in the given file. yes /var/run/pulse2-package-server.pid
user The inventory service runs as this specified user. yes root
group The inventory service runs as this specified group. yes root
umask The inventory service umask defines the right of the new files it creates (log files for example). yes 0077

5. « ssl » section

This section defines some global options..

Table 4. Available options for the "ssl" section

Option name Description Optional Default value
username   yes ""
password   yes ""
enablessl SSL mode support yes 1
verifypeer use SSL certificates yes 0
cacert path to the certificate file describing the certificate authority of the SSL server yes /etc/mmc/pulse2/package-server/keys/cacert.pem
localcert path to the SSL server private certificate yes /etc/mmc/pulse2/package-server/keys/privkey.pem

6. « mirror_api » section

This section define options for the mirror_api api implementation (it assign mirrors and package_api to machines).

Table 5. Available options for the "mirror_api" section

Option name Description Optional Default value
mount_point The api mount point no /rpc

7. « user_package_api » section

This section define options for the user_package_api api implementation (it assign package_api to users, it's used for the package edition permissions).

Table 6. Available options for the "user_package_api" section

Option name Description Optional Default value
mount_point The api mount point no /upaa

8. « scheduler_api » section

This section define options for the scheduler_api api implementation (it assign a scheduler to each machine).

Table 7. Available options for the "scheduler_api" section

Option name Description Optional Default value
mount_point The api mount point no /scheduler_api
schedulers The possible schedulers (can be a url or an id). no  

9. « mirror:XX » section

This section define options for the mirror api implementation.

Table 8. Available options for the "mirror:XX" section

Option name Description Optional Default value
mount_point The api mount point no  
src The root path of the package tree. no  

10. « package_api_get:XX » section

This section define options for the package_api_get api implementation.

Table 9. Available options for the "package_api_get:XX" section

Option name Description Optional Default value
mount_point The api mount point no  
src The root path of the package tree. no  

11. « package_api_put:XX » section

This section define options for the package_api_put api implementation.

Table 10. Available options for the "package_api_put:XX" section

Option name Description Optional Default value
mount_point The api mount point no /rpc
src The root path of the package tree. no  
tmp_input_dir The directory where the data for package creation is put yes  

12. Pulse 2 Package Server performance on win32 platforms

Using the default configuration, the service won't accept more than 64 concurrent TCP connections. The default event loop used by the Python Twisted library use the select() system call, which is limited to waiting on 64 sockets at a time.

Fortunately Twisted allows to choose another reactor instead of the default select() one. If sets to 1 in the package server configuration file, the "use_iocp_reactor" option lets Twisted runs with the IOCP reactor. IOCP (IO completions Ports) is a fast and scalable event loop system available on win32 platform. More informations are available in the Twisted documentation.

But there are some limitations:

  • SSL is not supported (for the moment) by the IOCP reactor, so the package server can't be run with IOCP and SSL enabled at the same time,

  • The IOCP reactor implentation from Twisted only works on win32 platform where the ConnectEx() API is available. So it won't works on Windows NT and Windows 2000 platforms.

Using the IOCP reactor, the package server can handle at least 300 parallel TCP connections, but more benchmarks need to be done to guess its limits.