mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 16:05:42 +07:00
[FIX] runbot: limit port search to local host.
With the increasing number of runbot servers (17), the total number of docker instances can reach more than 3570 only for running build. Starting at 2000, this covers the posrt 5432 used by postgress and make the build run step fail. This commit simply limit the port unicity constraint by host.
This commit is contained in:
parent
5297ac0f5f
commit
2e44c51678
@ -511,7 +511,7 @@ class runbot_build(models.Model):
|
||||
|
||||
def _find_port(self):
|
||||
# currently used port
|
||||
ids = self.search([('local_state', 'not in', ['pending', 'done'])])
|
||||
ids = self.search([('local_state', 'not in', ['pending', 'done']), ('host', '=', fqdn())])
|
||||
ports = set(i['port'] for i in ids.read(['port']))
|
||||
|
||||
# starting port
|
||||
|
Loading…
Reference in New Issue
Block a user