Ispmanager module at work
After a client has ordered and paid for the service, BILLmanager will start the activation process that includes several steps:
Checking a domain name
The system checks that the client has really specified a domain name during the order. If he/she left the "Domain names" field blank, BILLmanager will generate a domain based on the template specified in the tariff configuration form. When the domain is generated automatically, the system will "remember" that it should be created on the special server for free domain names.
Allocating an IP address
If a service requires an IP address, BILLmanager will send the API request to IPmanager to allocate a free IP address.
Creating a user
The system sends the API request (user.add.finish) for adding a new user to ispmanager. The resources specified in the ispmanager account template and the tariff plan in BILLmanager are sent as request parameters.
One of the parameters is a domain name. The domain name specified during the service order (or generated automatically) is sent as the parameter. Therefore, a WWW-domain, domain (DNS), and mail domain will be created along with the user in ispmanager.
If the number of WWW-domains that can be created for this user is set to 0, the system won't create a WWW-domain (however, a mail domain and domain name (DNS) will be created). The same procedure is performed with a mail domain and domain name (DNS).
Processing user creation results
The user creation procedure in ispmanager may fail with one of the following responses:
- ERROR Error: Type: 'exists' Object: 'user' Value: '
'— the username already exists. The system will try to create the user once again and add 1 to his/her name, e.g. user_665 will become user_6651. If user_6651 already exists too, the system will try to create the user and add 2 to the name - user_6652, until the process completes successfully.
- ERROR Error: Type: 'exists' Object: 'name' Value: '
'— the WWW-domain already exists. The system will try to create a user without a domain name.
- OK — the user has been created successfully.
If the billing platform doesn't get any response from ispmanager, BILLmanager will try to access ispmanager 10 times, once in a second, and search for the username in the user list. If the user is found, the operation will be completed successfully. Otherwise, the operation will fail (it will be added to the "Current operations" section with an error message).
After the user is created, BILLmanager will start collecting data about the newly created service.
Collecting service data
BILLmanager sends the API request (domain.record) to ispmanager to get the domain's name servers. This information will be used for service activation notification. If the request fails, the error will be ignored.
If the user account in ispmanager is created without a dedicated IP address, the billing platform will send the API request (ipaddr , ipaddr.list for Lite) to define a list of IP addresses available to the user. This information will be used for service activation notification. If the request fails, the service activation is considered unsuccessful and marked with an error message.
After the information is collected successfully, the service will be activated.
Activating the service
The service status in BILLmanager will change to "Active". The client will receive a service activation email.
Creating a free domain name
To create a subdomain record, the system sends the API request (domain.record.edit) to the server for free domain names.
Specifying a PTR record
If the service is created with a dedicated IP address, the system sends the API request (ip.edit) to IPmanager to specify the service domain as PTR for the IP address.
ispmanager processing module synchronizes service statuses and resources (limits) on a regular basis. The service in BILLmanager is bound to the user in ispmanager by the username. The Username field in Products → Shared hosting corresponds to the username in ispmanager.
Service status synchronization
When synchronizing service statuses, the system will select all the services in BILLmanager connected to the ispmanager processing module and compare the service status in BILLmanager with the user status in ispmanager.
If the service is "Active" in BILLmanager but the corresponding user is disabled in ispmanager, the billing platform will activate it. If the service in BILLmanager is "Suspended" but the user is active in ispmanager, the user suspension request will be sent.
Synchronization starts every day.
Once in three days, the system synchronizes account templates. Be sure to specify the same template in the tariff configuration form in BILLmanager and user parameters in ispmanager.
If they match, the system will check resources. The resource values specified in BILLmanager must match the values in ispmanager. If any value doesn't match, BILLmanager sends the API request (user.edit) to ispmanager and replaces the value with the one specified in the billing platform.
If templates do not match, BILLmanager sends the API request (user.edit) to ispmanager, applies the template from the billing platform, and applies the values specified in BILLmanager.
If you use ispmanager business, resource synchronization will get the name of the cluster node where the user is created and save information in BILLmanager.
Synchronization of statuses and resources starts with the cron job processing.syncserver.cron.
The log of interaction between the billing platform and ispmanager is saved in the '/usr/local/mgr5/var/pmispmgr5.log' file.
You can identify certain operations in the log by using the following records:
- 'processing/pmispmgr5 --runningoperation
--command open' — service activation;
- 'processing/pmispmgr5 --runningoperation
--command close' — service deactivation;
- 'processing/pmispmgr5 --command sync_server --module
' — data synchronization;
- 'processing/pmispmgr5 --command stat --module
' — statistics collection.
Ispmanager processing module collects statistics for some resources. Statistics is always collected for the previous day.
The process starts with the cron job statdaily.cron.