浏览代码

Ticket 47337 - mep_pre_op: Unable to fetch origin entry

Bug Description:  After installing IPA, and adding a hostgroup, an error will be written
                  to the error log if you delete this host group(Unable to fetch origin entry).
                  This is caused by the referential integrity plugin trying to cleanup
                  the deleted entry's membership.  This causes the mep plugin to process the
                  delete operation, but it can not find the origin entry(because it is deleted).

Fix Description:  If the operation is internal(from a server plugin) do not write the error
                  to the standard log level.

https://fedorahosted.org/389/ticket/47337

Reviewed by: richm(Thanks!)
Mark Reynolds 12 年之前
父节点
当前提交
b4a4ef5684
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      ldap/servers/plugins/mep/mep.c

+ 10 - 1
ldap/servers/plugins/mep/mep.c

@@ -2227,9 +2227,18 @@ mep_pre_op(Slapi_PBlock * pb, int modop)
                         slapi_entry_free(origin_e);
                         mep_config_unlock();
                     } else {
-                        slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+                        Slapi_Operation *op;
+
+                        slapi_pblock_get(pb, SLAPI_OPERATION, &op);
+                        if(operation_is_flag_set(op, OP_FLAG_INTERNAL)){
+                            slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
+                                    "mep_pre_op: (internal operation) Unable to fetch "
+                                    "origin entry \"%s\".\n", origin_dn);
+                        } else {
+                            slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
                                     "mep_pre_op: Unable to fetch origin entry "
                                     "\"%s\".\n", origin_dn);
+                        }
                     }
 
                     slapi_ch_free_string(&origin_dn);