def acknowledge_problem(self, notification_period, hosts, services, sticky, notify, author,
                            comment, end_time=0):
        comm = None
        logger.debug("Acknowledge requested for %s %s.", self.my_type, self.get_name())
        if self.state != self.ok_up:
            if self.problem_has_been_acknowledged and self.acknowledgement:
                self.del_comment(getattr(self.acknowledgement, 'comment_id', None))
            if notify:
                self.create_notifications('ACKNOWLEDGEMENT',
                                          notification_period, hosts, services)
            self.problem_has_been_acknowledged = True
            sticky = sticky == 2
            data = {
                'ref': self.uuid, 'sticky': sticky, 'author': author, 'comment': comment,
                'end_time': end_time, 'notify': notify
            }
            self.acknowledgement = Acknowledge(data)
            if self.my_type == 'host':
                comment_type = 1
                self.broks.append(self.acknowledgement.get_raise_brok(self.get_name()))
            else:
                comment_type = 2
                self.broks.append(self.acknowledgement.get_raise_brok(self.host_name,
                                                                      self.get_name()))
            data = {
                'author': author, 'comment': comment, 'comment_type': comment_type, 'entry_type': 4,
                'source': 0, 'expires': False, 'ref': self.uuid
            }
            comm = Comment(data)
            self.acknowledgement.comment_id = comm.uuid
            self.comments[comm.uuid] = comm
            self.broks.append(self.get_update_status_brok())
            self.raise_acknowledge_log_entry()
        else:
            logger.debug("Acknowledge requested for %s %s but element state is OK/UP.",
                         self.my_type, self.get_name())
        if self.my_type == 'host':
            for service_uuid in self.services:
                if service_uuid not in services:
                    continue
                services[service_uuid].acknowledge_problem(notification_period, hosts, services,
                                                           sticky, notify, author, comment,
                                                           end_time)
        return comm