'Update the container when objects are updated.
:param op: operation performed (ex: \'PUT\', or \'DELETE\')
:param account: account name for the object
:param container: container name for the object
:param obj: object name
:param request: the original request object driving the update
:param headers_out: dictionary of headers to send in the container
request(s)
:param objdevice: device name that the object is in
:param policy:  the BaseStoragePolicy instance'

def container_update(self, op, account, container, obj, request, headers_out, objdevice, policy):

    headers_in = request.headers
    conthosts = [h.strip() for h in headers_in.get('X-Container-Host', '').split(',')]
    contdevices = [d.strip() for d in headers_in.get('X-Container-Device', '').split(',')]
    contpartition = headers_in.get('X-Container-Partition', '')
    if (len(conthosts) != len(contdevices)):
        self.logger.error((_('ERROR    Container    update    failed:    different    numbers    of    hosts    and    devices    in    request:    "%(hosts)s"    vs    "%(devices)s"') % {'hosts': headers_in.get('X-Container-Host', ''), 'devices': headers_in.get('X-Container-Device', '')}))
        return
    if contpartition:
        updates = zip(conthosts, contdevices)
    else:
        updates = []
    headers_out['x-trans-id'] = headers_in.get('x-trans-id', '-')
    headers_out['referer'] = request.as_referer()
    headers_out['X-Backend-Storage-Policy-Index'] = int(policy)
    update_greenthreads = []
    for (conthost, contdevice) in updates:
        gt = spawn(self.async_update, op, account, container, obj, conthost, contpartition, contdevice, headers_out, objdevice, policy, logger_thread_locals=self.logger.thread_locals)
        update_greenthreads.append(gt)
    try:
        with Timeout(self.container_update_timeout):
            for gt in update_greenthreads:
                gt.wait()
    except Timeout:
        self.logger.debug('Container    update    timeout    (%.4fs)    waiting    for    %s', self.container_update_timeout, updates)
