Merge "Delay introspection between nodes by 5 seconds"

This commit is contained in:
Jenkins 2015-08-07 14:13:29 +00:00 committed by Gerrit Code Review
commit 7844932bb9
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@
# under the License.
import logging
import time
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
@ -266,6 +267,11 @@ class Node(base.APIResourceWrapper):
for uuid in uuids:
discoverd_client.introspect(uuid, IRONIC_DISCOVERD_URL,
request.user.token.id)
# NOTE(dtantsur): PXE firmware on virtual machines misbehaves when
# a lot of nodes start DHCPing simultaneously: it ignores NACK from
# DHCP server, tries to get the same address, then times out. Work
# around it by using sleep, anyway introspection takes much longer.
time.sleep(5)
@classmethod
def set_maintenance(cls, request, uuid, maintenance):