burnley
Regular Pleskian
TITLE:
ACTUAL RESULT:
Plesk keeps mail service attached to a dedicated IP after receiving release request from WHMCS
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Onyx Version 17.5.3 Update #72, last updated on May 7, 2019 04:49 PM
CentOS Linux 7.6.1810 (Core)
PROBLEM DESCRIPTION:CentOS Linux 7.6.1810 (Core)
We're using WHMCS with Plesk API to deploy hosting on shared/dedicated IP addresses and we've noticed this behaviour, which we strongly believe is a bug. Test case follows:
Very important!! At the time of the test, Plesk is configured with Server-Wide Mail Settings -> Outgoing mail mode -> Send from domain IP addresses
Shared IP: 192.168.1.240
Dedicated IP: 192.168.10.245
In WHMCS I create an order for a test hosting which is configured to use a dedicated IP (192.168.10.245 here). All good, the subscription gets deployed on the dedicated IP and I can see it in Tools & Settings -> IP Addresses attached to the dedicated IP.
This is what I see in psa:
MariaDB [psa]> SELECT d.name, d.webspace_id, ipac.ipCollectionId,ds.type,ip.ip_address FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and d.name='000adidedicatedip2.local';
+--------------------------+-------------+----------------+------+----------------+
| name | webspace_id | ipCollectionId | type | ip_address |
+--------------------------+-------------+----------------+------+----------------+
| 000dedicatedip2.local | 0 | 1096 | mail | 192.168.10.245 |
| 000dedicatedip2.local | 0 | 1097 | web | 192.168.10.245 |
+--------------------------+-------------+----------------+------+----------------+
2 rows in set (0.00 sec)
Next, I go in WHMCS and, for the selected product, I click "Release dedicated Ip" "Confirm Release" button, which reconfigures the subscription in Plesk to use the shared IP. When I can into Plesk Tools & Settings -> IP Addresses I see 0 sites for the dedicated IP that's just been released.
At this point I should be able to reuse the dedicated IP for another subscription. But this is not the case, Plesk still thinks it's in use and we've found that, even after reconfiguring the subscription with the shared IP, Plesk keeps the mail service bound to the dedicated IP. The sam query now returns:
MariaDB [psa]> SELECT d.name, d.webspace_id, ipac.ipCollectionId,ds.type,ip.ip_address FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and d.name='000adidedicatedip2.local';
+--------------------------+-------------+----------------+------+----------------+
| name | webspace_id | ipCollectionId | type | ip_address |
+--------------------------+-------------+----------------+------+----------------+
| 000dedicatedip2.local | 0 | 1096 | mail | 192.168.10.245 |
| 000dedicatedip2.local | 0 | 1097 | web | 192.168.1.240 |
+--------------------------+-------------+----------------+------+----------------+
2 rows in set (0.00 sec)
How can I *fix* the database inconsistency in order to be able to reuse dedicated IP 192.168.10.245?
STEPS TO REPRODUCE:Very important!! At the time of the test, Plesk is configured with Server-Wide Mail Settings -> Outgoing mail mode -> Send from domain IP addresses
Shared IP: 192.168.1.240
Dedicated IP: 192.168.10.245
In WHMCS I create an order for a test hosting which is configured to use a dedicated IP (192.168.10.245 here). All good, the subscription gets deployed on the dedicated IP and I can see it in Tools & Settings -> IP Addresses attached to the dedicated IP.
This is what I see in psa:
MariaDB [psa]> SELECT d.name, d.webspace_id, ipac.ipCollectionId,ds.type,ip.ip_address FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and d.name='000adidedicatedip2.local';
+--------------------------+-------------+----------------+------+----------------+
| name | webspace_id | ipCollectionId | type | ip_address |
+--------------------------+-------------+----------------+------+----------------+
| 000dedicatedip2.local | 0 | 1096 | mail | 192.168.10.245 |
| 000dedicatedip2.local | 0 | 1097 | web | 192.168.10.245 |
+--------------------------+-------------+----------------+------+----------------+
2 rows in set (0.00 sec)
Next, I go in WHMCS and, for the selected product, I click "Release dedicated Ip" "Confirm Release" button, which reconfigures the subscription in Plesk to use the shared IP. When I can into Plesk Tools & Settings -> IP Addresses I see 0 sites for the dedicated IP that's just been released.
At this point I should be able to reuse the dedicated IP for another subscription. But this is not the case, Plesk still thinks it's in use and we've found that, even after reconfiguring the subscription with the shared IP, Plesk keeps the mail service bound to the dedicated IP. The sam query now returns:
MariaDB [psa]> SELECT d.name, d.webspace_id, ipac.ipCollectionId,ds.type,ip.ip_address FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and d.name='000adidedicatedip2.local';
+--------------------------+-------------+----------------+------+----------------+
| name | webspace_id | ipCollectionId | type | ip_address |
+--------------------------+-------------+----------------+------+----------------+
| 000dedicatedip2.local | 0 | 1096 | mail | 192.168.10.245 |
| 000dedicatedip2.local | 0 | 1097 | web | 192.168.1.240 |
+--------------------------+-------------+----------------+------+----------------+
2 rows in set (0.00 sec)
How can I *fix* the database inconsistency in order to be able to reuse dedicated IP 192.168.10.245?
- Make sure that, at the time of the test, Plesk is configured with Server-Wide Mail Settings -> Outgoing mail mode -> Send from domain IP addresses
- Use WHMCS to deploy hosting on a dedicated IP attached
- Verify the successful deployment in Plesk
- Go into WHMCS and release the dedicated IP
- Verify the release in Plesk. In our case, web service is reconfigured on the shared IP, but mail stays on the dedicated one. <- THIS is the issue.
When receiving the release request from WHMCS, Plesk reconfigures the subscriptions on the shared IP for the web service only, mail service stays on dedicated.
EXPECTED RESULT:When receiving the release request from WHMCS, Plesk reconfigures the subscriptions on the shared IP for both web and mail services.
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug